**4. On a solution to the cigarette smoker's problem with colored Petri nets**

In 1971 Patil proved that P and V actions have insufficient capacity for resolving synchronization issues. His proposed solution to model problem is called smoking a cigarette [9].

The actions of the smokers without the coordination are as follows.

Let X be the smoker with tobacco, Y the smoker with paper, Z the smoker with matches, and A the agent (see **Table 1**).

It is proven that the problem of smokers has no solution using semaphores [9].

Patil showed that there is no sequence of P and V actions to correctly solve the problem [1, 2]. Modeling the problem using the classical Petri net, we get an inactive network. Since all tokens in classical Petri nets are of the same type, the ingredients will not differ from each other.

The author simulated a problem with the colored Petri net (see**Figure 9**) [3–6, 9, 18, 19].

The operation of the colored Petri net shown in **Figure 9** is described in more detail in the literature [9].

If we were to represent this problem using the classical Petri net, then we need to use three transitions instead of one **T** transition. It also means that minimization of the network is ensured, which implies a reduction in costs due to the reduction of arches in positions and transitions.


**Table 1.** *The actions of the smokers.* *The Possibilities of Modeling Petri Nets and Their Extensions DOI: http://dx.doi.org/10.5772/intechopen.90275*

**Figure 9.** *The modeling of cigarette smoker's problem with colored petri nets.*
