# Applying Infinite Petri Nets to the Cybersecurity of Intelligent Networks, Grids and Clouds
## 5 Infinite Petri Net of Second Kind: An Infinite Set of Finite Structures  
When modeling real-life computing and communication grids [25; 26], we come to another kind of infinite Petri nets [12; 13; 44]. Here we use such parameters as the model size and the number of dimensions for multidimensional structures. Having open grids as an intermediate auxiliary construct, we specify real-life grids adding specific boundary conditions. In this way we studied three basic types of boundary conditions: connected (opposite) bounds - that makes a hyper torus from hyper cube; terminal (customer) device attached on the border; truncated communication device on the border. In each case, a closed construct of a finite size have been obtained for a given value of the model size--a parameter. In Figure 3, square 2D structures with truncated device on the edge of size 3, 4, and 5 are shown.  
The switching device model [45] is shown in Figure 4. It represents a-state-of-art balance between simplicity and usefulness acknowledged by many papers where similar models allowed us to find deadlocks [46] in real-life grids [14; 25]. The device operates in full-duplex mode having separate input and output tracts; it uses store-and-forward principle. We do not simulate a message (packet) structure, it is represented by a single token. The forwarding decision is made at the packet arrival via storing the packet within the corresponding section of the internal buffer. The internal buffer is represented by the buffer size limitation place \(pbl\) and four places \(pb_{i}\) which model sections of the internal buffer corresponding to the ports. Each tract of each port is represented by a pair of places, for instance for the output tract: \(po_{i}\)--a buffer; \(pol_{i}\)--buffer size limitation; usually the port buffer size equals unit. The packet transmission into a port is implemented by a single transition \(to_{i}\). The packet receiving from a port is modelled by three alternative transitions \(ti_{i,j}\), each corresponding to the packet forwarding into one of three other ports \(j\) except \(j=i\). Transitions' arcs keep the balance of tokens for buffers and their limitations. For instance, a transition \(ti_{1,2}\) takes a packet from place \(pi_{1}\) and puts a token into place \(pil_{1}\) because the port buffer becomes available, then it puts the packet into the internal buffer section \(pb_{2}\) corresponding to the port 2 and takes a token from the internal buffer limitation \(pbl\) because available buffer size has been decreased.  
Having a closed finite construct corresponding to a given value of parameter--say, the grid size as a number of cells in a dimension--and considering infinite countable set of natural values of the parameter, we come to understand the corresponding model as an infinite set of models having incremental size. In those cases in which we find out the model properties that are valid for any value of the parameter, we conclude that we have studied a given structure (topology).  
Figure 3: Modeling square communication grid with truncated devices on edges by infinite Petri net.