A petri net is basically a glorified state machine (see Figure 1). The places (the correct petri net term for states) are not limited to being active or inactive but may contain any number of tokens. Petri nets also have transitions that, when fired, remove one or more tokens from a place and insert one or more tokens into another place. These quantities are defined by the weight of the directed arcs that connect the places and the transitions. The number of tokens removed does not necessarily equal the number of tokens inserted. This means that the total number of tokens in a petri net is not necessarily constant. Arcs between two places or two transitions are not allowed. Arcs may only begin at a place and end at a transition, or begin at a transition and end at a place.
There can be more than one arc beginning at the same transition, in which case tokens will be inserted at every place the arcs end whenever the transition fires. Similarly, there can be more than one arc ending at a transition, in which case tokens are removed from every place the arcs begin. Since places cannot have a negative number of tokens, a transition can only fire if every place from which it will remove tokens contains enough tokens to be removed.
Firings of transitions are considered instantaneous, implying that no two transitions may fire simultaneously.