# Application of an Exact Transversal Hypergraph in Selection of SM-Components

Łukasz Stefanowicz, Marian Adamski, Remigiusz Wisniewski

► To cite this version:

Łukasz Stefanowicz, Marian Adamski, Remigiusz Wisniewski. Application of an Exact Transversal Hypergraph in Selection of SM-Components. 4th Doctoral Conference on Computing, Electrical and Industrial Systems (DoCEIS), Apr 2013, Costa de Caparica, Portugal. pp.250-257, 10.1007/978-3-642-37291-9_27. http://hal-01348761

HAL Id: hal-01348761

https://hal.science/hal-01348761

Submitted on 25 Jul 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Application of an Exact Transversal Hypergraph in Selection of SM-Components

Łukasz Stefanowicz, Marian Adamski, Remigiusz Wisniewski,

¹University of Zielona Góra, Institute of Computer Engineering and Electronics, ul. Licealna 9,65-417 Zielona Góra
L.Stefanowicz@weit.uz.zgora.pl, {M.Adamski,R.Wisniewski}@iie.uz.zgora.pl

**Abstract.** The paper deals with the application of the hypergraph theory in selection of State Machine Components (SM-Components) of Petri nets [1,2]. As it is known, Petri nets are widely used for modeling of concurrency processes. However, in order to implement the concurrent automaton, an initial Petri net ought to be decomposed into sequential automata (SM-Components), which can be easily designed as an Finite-State-Machine (FSM) or Microprogrammed Controller [3]. The last step of the decomposition process of the Petri nets is selection of SM-Components. This stage is especially important because it determines the final number of sequential automata.

In the article we propose a new idea of SM-Components selection. The aim of the method is reduction of the computational complexity from exponential to polynomial. Such a reduction can be done if the selection hypergraph belongs to the exact transversal hypergraphs (xt-hypergraphs) class. Since the recognition and generation of the first transversal in the xt-hypergraphs are both polynomial, the complete selection process can be performed in polynomial time. The proposed ideas are an extension of the concept presented in [1].

The proposed method has been verified experimentally. The conducted investigations have shown that for more than 85% of examined Petri nets the selection process can be done via xt-hypergraphs.

**Keywords:** hypergraph, exact transversal hypergraphs, SM-Components, Petri nets, graphs, transversal, exact cover, exact transversal, concurrency hypergraphs, selection hypergraph, sequentiality hypergraph.

## 1 Introduction

Discrete systems model discrete processes: sequential and concurrent, so they are mostly applied to model and represent controlling systems described by Petri nets [2]. In some cases the designer may encounter a problem: size of system exceeds the frames imposed by the size of prototyped systems thus the system needs to be decomposed into a series of collaborating subsystems. The most frequently applied synthesis method is decomposition of a concurrent automation into sequential automata [4,5].

Petri nets [2,4] are widely used for designing and modeling of the concurrency processes [5,6]. Analysis of the relations (such as concurrency or sequentiality) and
decomposition of a Petri net are very often hard to perform because of exponential dependence between number of states and size of the initial net [2,4,6,7].

The decomposition process can be divided into several stages. At the beginning the concurrency relation is obtained. The operation can be executed via concurrency graph or concurrency hypergraph. The detailed description about those structures can be found in [5,8]. Next, the set of SM-Components is obtained. There are several methods that permit to calculate this stage [1]. Finally, the selection process should be executed to eliminate the redundant elements. The main problem is computational complexity of such an operation. In a general case the selection can be done in an exponential time. Since for some Petri net classes there are polynomial methods for selection of the concurrency graph/hypergraph and generation of SM-Components [1, 9], the selection process is a bottleneck of the whole decomposition process.

In the article we propose anapplication of xt-hypergraphs in the selection process. Initially, the selection hypergraph is formed. Such a structure is determined from the set of SM-Components. Next, if the selection hypergraph is an xt-hypergraph, the first exact transversal is computed. It directly indicates the proper SM-Components that ought to be selected to reach the optimal solution. The proposed idea will be described later in more details.

## 2 Relationship to Internet of Things

Petri nets are widely used for modeling of concurrency processes. Thus, they are very useful in designing and prototyping of concurrent automata. Decomposition of a Petri net permits to split the device into independent finite-state-machines (FSMs) [1]. SM-Components that are obtained during the decomposition process refer to FSMs. Each FSM can be analyzed and designed as a separate module. Since SM-Components ought to be synchronized [1,6], usually they are implemented in the same programmable device (like an FPGA) [1]. However, Internet of Things may revolutionize such an approach. Imagine that SM-Components can be synchronized via Internet. Then, different devices may be applied for implementation of modules. Moreover, each module can be designed with different technology! Since the distance is not important, SM-Components can cooperate all over the World. Therefore, decomposition of Petri nets maybe especially fruitful in relation to Internet of Things.

## 3 Main Definitions

### 3.1 Hypergraph

Hypergraph H is defined by a pair [9]:

$$H=(V,E), \qquad (1)$$

where:

$V=\{v_1,...,v_n\}$ is arbitrary, nonempty set of vertices;
$E=\{E_1,...,E_n\}$ is set of hypergraph edges, i.e., subset of set P(V) of all the possible non-empty sets, elements of which belong to V [9].

## 3.2 Transversal

Transversal (hitting set, vertex cover) of hypergraph H is set [9,10]:

$$T \subseteq V, \qquad (2)$$

containing vertices incident to each edge of hypergraph [9].

A *minimal transversal* is such a transversal which contains no other transversal of hypergraph H.

## 3.3 The Exact Transversal

The exact transversal D of hypergraph H is set [1,10]:

$$D \subseteq V, \qquad (3)$$

of vertices of hypergraph H, which is incident to all edges of hypergraph H, where each edge is incident to exactly one vertex of set D.

## 3.4 Exact Transversal Hypergraph (xt-hypergraph)

Exact transversal hypergraph $H_{xt}$ is hypergraph in which all minimal transversal are also exact transversals [10]. In the other words, hypergraph $H_{xt}$ belongs to class xt.

# 4 Problem Formulation

The decomposition process of a Petri net can be divided into three main steps [1]:

1) Formulation of concurrency graph or concurrency hypergraph.

2) Formulation of SM-Components.

3) Selection of SM-Components.

In the first step of the decomposition process, the concurrency relations are determined. They can be obtained in two ways: via concurrency graph or concurrency hypergraph. The concurrency graph is computed during the analysis of the structure and relations in a Petri net. The graph contains concurrency relations between any two places of a net. It was proved that the concurrency graph can be calculated in a polynomial time [7].

The alternative decomposition method bases on the concurrency hypergraph computation. In opposite to the concurrency graph, hypergraph can hold the information between more than two places in a net. Its vertices represent the places of
an initial Petri net, while hyperedges are related to the concurrency relations. As it was shown in [5], the computation of the concurrency hypergraph may be polynomial, however the main problem is the number of hyperedges, which in some cases can be exponential.

The SM-Components are generated from the concurrency graph or hypergraph. There are several methods; like concurrency graph/hypergraph coloring, application of the graph-search algorithms or computation of exact transversals [1,12,13]. Depending of the structure of an initial Petri net, this process is either polynomial or exponential [1,13].

Most of algorithms generate more SM-Components, that are required to cover the whole Petri net. Then, regardless of the initial structure (concurrency graph or hypergraph), the process of selection ought to be applied.

In the article we propose a new idea of SM-Components selection. The aim of the proposed method is to apply an algorithm that can be performed in polynomial time in most of cases.

# 5 Idea of the Proposed Method

The proposed idea of selection of SM-Components can be divided into the following steps (Fig.1):

1) Formulation of the sequentiality hypergraph that represents the set of achieved SM-Components [1]. Vertices refer to the places of a Petri net while each hyperedge represents one of SM-Components.

2) Calculation of the dual hypergraph to the sequentiality hypergraph obtained in the previous stage. In practice this operation can be done via transposition of an incidence matrix of the sequentiality hypergraph [1].

3) Reduction of dominant edges and dominated vertices and formulation of the selection hypergraph. The dominant edges refer to the two or more places that are covered by the same SM-Components. Analogically, the dominated vertices are also reduced. They refer to the SM-Components that are covered by other SM-Components. Therefore, they can be removed from the further analysis. The concept of presented reduction was taken from [11] and [1], where it was proved that this operation has polynomial computational complexity. Finally, the selection hypergraph is formed which is the result of the reduction process.

4) Examination of the selection hypergraph. If the hypergraph belongs to the xt-hypergraphs class, it means that the selection process can be done via xt-hypergraphs. Otherwise, the selection ought to be performed in the other way (like calculation of transversals, coloring, etc.) [1].

5) If the selection hypergraph belongs to the xt-class, the first exact transversal has to be calculated. Obtained result indicates SM-Components that form the final solution (the selected set of SM-Components). Since the examination and selection of the subsequent exact transversals in the xt-hypergraph are polynomial, the whole selection process is polynomial.
<figure><img src="image_2.png" /><figcaption>Fig. 1. Idea of the proposed method</figcaption></figure>

**6 Example of the Proposed Method**

Figure 2 illustrates Petri net $P_1$ that will be used as an example. It is a simplified version of a controlling system of the preparation to a single heat and race during a speedway tournament [1].

<figure><img src="image_3.png" /><figcaption>Fig. 2. Exemplary Petri net $P_1$</figcaption></figure>
There can be totally five SM-Components found in the presented net: $S_1=\{P_1,P_2\}$, $S_2=\{P_1,P_3,P_5,P_7\}$, $S_3=\{P_1,P_3,P_6,P_7\}$, $S_4=\{P_1,P_4,P_5,P_7\}$, $S_5=\{P_1,P_4,P_6,P_7\}$. According to the conception presented in the previous section, at the beginning, sequentiality hypergraph $H_C$ is formed. An incidence matrix of $H_C$ is presented in fig. 3.

$$A_C = \begin{bmatrix} P_1 & P_2 & P_3 & P_4 & P_5 & P_6 & P_7 \\ 1 & 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 & 0 & 1 & 1 \\ 1 & 0 & 0 & 1 & 1 & 0 & 1 \\ 1 & 0 & 0 & 1 & 0 & 1 & 1 \end{bmatrix} \begin{bmatrix} S_1 \\ S_2 \\ S_3 \\ S_4 \\ S_5 \end{bmatrix}$$

<caption>Fig. 3. Incidence matrix of sequentiality hypergraph $H_C$</caption>

Next, the duality hypergraph to the $H_S$ is calculated. Such an operation can be easily done by transposition of incidence matrix $A_C$. After the reduction of the dominant edges and dominated vertices, the selection hypergraph $H_S$ is reached. In our example the selection hypergraph belongs to the xt-class, thus the proposed idea have sense. Incidence matrix $A_S$ of selection hypergraph $H_S$ is shown in the fig. 4.

$$A_S = \begin{bmatrix} S_1 & S_2 & S_3 & S_4 & S_5 \\ 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 1 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 0 & 1 \end{bmatrix} \begin{bmatrix} P_2 \\ P_3 \\ P_4 \\ P_5 \\ P_6 \end{bmatrix}$$

<caption>Fig. 4. Incidence matrix of selection hypergraph $H_S$</caption>

There are two exact transversals in the selection hypergraph. The first one includes components $S_1$, $S_2$ and $S_5$, while the second is realized by $S_1$, $S_3$ and $S_4$. Since both transversals have the same number of SMCs, it does not matter which one will be selected. For further analysis we chose the first one. Finally, the initial Petri net can be decomposed. The proper SMCs are indicated by the selection process and in our case $P_1$ is decomposed into three SMCs, represented by $S_1$, $S_2$ and $S_5$. Figure 5 illustrates the result of the decomposition process. The initial concurrent automaton has been decomposed into three sequential automata: $S_1(a)$, $S_2$ (b) and $S_5$ (c). The detailed description about formation of the particular automaton can be found in [1].
<figure><img src="image_4.png" /><figcaption>Fig. 5. The result of the decomposition process of Petri net $P_1$</figcaption></figure>

# 7 Results of experiments

The proposed method has been verified experimentally. The library of test modules consist of over than 100 Petri nets that belong to the different classes (such as *Marked Graphs*, *Free-Choice*, *Extended Free-Choice* and *Simple Nets* [2,4]). Most of the nets describe real digital controllers and were taken from literature [1,2,3,4,5,6,14].

The main criterion of the selection was to obtain the minimal (optimal) number of SMCs that are required in order to decompose the initial Petri net. Obtained average results of experiments are shown in Tab. 1. From the table we can see, that 85% of examined Petri nets have xt-selection hypergraphs, thus the selection process for those nets can be done in polynomial time.

<table><caption>**Table 1.** Average results of experiments.</caption><thead><tr><td>Average number of places</td><td>Average number of transitions</td><td>Average number of SM-Components</td><td>Number of achieved xt-selection hypergraphs</td></tr></thead><tbody><tr><td>12</td><td>10</td><td>4</td><td>85%</td></tr></tbody></table>
## 8 Conclusions

In the article the application of the xt-hypergraphs in the selection of SM-components was presented. The main advantage of the proposed idea is availability (in some cases) to perform the whole selection process in polynomial time. The initial experiments have proved the effectiveness of the presented method. According to the results of conducted researches showed that over 85% of examined nets have the selection hypergraph that belongs to the xt-class. It means that the selection process can be executed in polynomial time if hypergraph belongs to xt-class.

At the moment the essence of research was to determine if the selection hypergraph belonged to the xt-class. Further work will include comparison of achieved results with other selection methods (based on the coloring, transversals, etc.)

**Acknowledgment.** The research was partially financed from budget resources intended for science in 2010-2013 as an own research project No. N N516 513939.

## References

1. Wisniewska, M.: Application of hypergraphs in decomposition of discrete systems. Lecture Notes in Control and Computer Science, vol. 23, Univ. of Ziel. Gora Press (2012)

2. Murata, T.: Petri Nets: Properties, Analysis and Applications, In: Proceedings of IEEE, Vol. 77, No. 4, pp. 541--580, Berkeley(1989)

3. Barkalov, A., Titarenko, L., Hebda, O.: Synthesis of Moore finite state machine with nonstandard presentation of state codes. Electrical Review, vol. 9, pp. 134--136 (2010)

4. Karatkevich, A.: Dynamic analysis of Petri net-based discrete systems. Springer, Berlin(2011)

5. Wisniewski, R., Adamski, M., Wisniewska, M.: A polynomial algorithm to compute the concurrency hypergraph in Petri nets. Measurement Automation and Monitoring, vol. 07, pp. 650--652(2012) (in Polish)

6. Karatkevich, A.: SM-Components problem reductions of Petri nets. Telecommunication Review, vol. 6/2008, (2008) (in Polish)

7. Kovalyov, A.: Concurrency Relations and the Safety Problem for Petri Nets. Application and Theory of Petri Nets, Sheffield (1992)

8. Karatkevich, A., Wisniewski, R.: Computation of Petri nets covering by SM-components based on the graph theory. Electrical Review, vol. 8, pp. 141--144 (2012) (in Polish)

9. Berge, C.: Graphs and Hypergraphs, American Elsevier Pub. Co., New York (1989)

10. Eiter, T.: Exact Transversal Hypergraphs and Application to Boolean Functions. Journal of Symbolic Computations, vol. 17, pp. 215--225, Academic Press Ltd(1994)

11. Rudell, R. L.: Logic Synthesis for VLSI Design. PhD Thesis, EECS Department, University of California, Berkeley (1989)

12. Kubale, M., Obszarski, P., Piwakowski, K.: Hypergraphs coloring. Technical Reports of the Silesian Technical University, (2006) (in Polish)

13. Knuth, D.: Dancing Links. Millennial Perspectives in Computer Science, Palgrave, pp. 187-214,(2000)

14. Blanchard, M.: Comprendre, Maîtriser Et Appliquer Le Grafcet Cepadues, Tolouse, (1979) (in French).