# Modeling a New AQM Model for Internet Chaotic Behavior Using Petri Nets
## 5 Validation
### Matrix Equation  
In this approach, the validation is described by algebraic equations. First, we present the matrix equations that govern the dynamic behavior of our AQM (Figure 1). For a PN with \(n\) places and \(m\) transitions, the incidence matrix \(C=(C_{ij})\), is a matrix \((n\times m)\) represented in Equation (4) and defined by \(C^{ij}=C^{+}_{ij}-C^{-}_{ij}\), where the post-conditions matrix \(C^{+}_{ij}=w(i,j)\) is the weight of the arc from transition \(j\) to its output place \(i\), and the pre-conditions matrix \(C^{-}_{ij}=w(j,i)\) is the weight of the arc to transition j from its input place \(i\). The PN of our AQM is ordinary, i.e., all of its arc weights are 1s, and the interpretation is as follows:  
\[C^{+}_{ij} =\left\{ \begin{array}{l}1,\,\text{there is arc from $t_{j}$ to $p_{i}$}\\ 0,\,\text{there is arc from $t_{j}$ to $p_{i}$}\end{array} \right.\] \[C^{-}_{ij} =\left\{ \begin{array}{l}1,\,\text{there is arc from $p_{i}$ to $t_{j}$}\\ 0,\,\text{there is arc from $p_{i}$ to $t_{j}$}\end{array} \right.\] \[C =C^{+}-C^{-}\,=\left( \begin{array}{cccccccccccc}0&1&0&0&0&0&0&0&0&0&0 &0&0\\ 1&0&0&0&0&0&0&0&0&0&0&0\\ 0&1&0&0&0&0&0&0&0&0&0&0\\ 0&0&1&0&0&0&0&0&0&0&0&0\\ 0&0&0&1&0&0&0&0&0&0&0&0\\ 0&0&0&0&1&0&0&0&0&0&0&0\\ 0&0&0&0&0&0&0&1&0&0&0&0\\ 0&0&0&0&0&0&0&1&0&0&0\\ 0&0&0&0&0&1&0&0&0&1&1&0\\ 0&0&0&0&0&0&1&0&0&0&1&1\end{array} \right)\] \[-\left( \begin{array}{cccccccccccc}1&0&0&0&0&0&0&0&0&0&0&0\\ 0&1&0&0&0&0&0&0&0&0&0&0\\ 0&0&1&1&1&0&0&0&0&0&0&0\\ 0&0&0&0&0&1&0&0&0&0&0\\ 0&0&0&0&0&0&1&1&0&0&0\\ 0&0&0&0&0&0&1&0&0&0&0\\ 0&0&0&0&0&0&0&0&0&1&0\\ 0&0&0&0&0&0&0&0&0&0&1&0\\ 0&0&0&0&0&0&0&0&0&0&1&0\\ 0&0&0&0&0&0&0&0&0&0&0&1\\ 1&0&0&0&0&0&0&0&0&0&0&0\\ \end{array} \right)\quad= \tag{4}\] \[\left( \begin{array}{cccccccccccc}-1&1&0&0&0&0&0&0&0&0&0&0\\ 1&-1&0&0&0&0&0&0&0&0&0&0\\ 0&1&-1&-1&-1&0&0&0&0&0&0&0\\ 0&0&1&0&0&-1&0&0&0&0&0\\ 0&0&0&1&0&0&-1&-1&0&0&0\\ 0&0&0&0&1&0&-1&0&0&0&0\\ 0&0&0&0&0&0&0&1&0&-1&0&0\\ 0&0&0&0&0&0&0&1&0&-1&0\\ 0&0&0&0&0&1&0&0&0&1&0&-1\\ -1&0&0&0&0&1&0&0&0&1&1\end{array} \right)\]  
Second, the matrix equation approach calculates the PN evolution as a result of firing a transition T from \(M_{0}\) to state \(M\). For the case of one fired transition, this is done with the equation of state:  
\[M=M_{0}+C\cdot t_{j}, \tag{5}\]  
where \(M_{0}\) is the initial marking and \(C\) is the incidence matrix calculated in Equation (4). The vector \(t_{j}\) is called the trigger vector, which contains all transitions as a column. The \(j\)-th component of \(t_{j}\) is 1, which means that the transition T\({}_{j}\) is fired, and the others are 0. In Equation (6), we show the evolution of our PN to the next marking when the transition T1 is fired, i.e., a new packet arrives from the network to the router in ready mode. \[M=M_{0}+C\cdot t_{1}\ =\ \left( \begin{array}{c}1\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 1\end{array} \right)+\left( \begin{array}{cccccccccccc}-1&1&0&0&0&0&0&0&0&0&0&0 \\ 1&-1&0&0&0&0&0&0&0&0&0\\ 1&-1&-1&-1&0&0&0&0&0&0&0\\ 0&0&1&0&0&-1&0&0&0&0&0\\ 0&0&0&1&0&0&0&-1&-1&0&0\\ 0&0&0&0&1&0&-1&0&0&0\\ 0&0&0&0&0&0&1&0&-1&0\\ 0&0&0&0&0&0&1&0&-1&0\\ 0&0&0&0&1&0&0&0&1&0&-1\\ -1&0&0&0&0&0&1&0&0&1&1\end{array} \right)\left( \begin{array}{c}1\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\end{array} \right)\ =\ \left( \begin{array}{c}0\\ 1\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\end{array} \right) \tag{6}\]  
In addition, the matrix equation approach can calculate the PN evolution with a sequence of fired transitions. Thus, a marking \(M\) is said to be reachable from \(M_{0}\) if there exists a sequence of firings \(\sigma\) that transforms \(M_{0}\) into \(M\). This is done with the equation of state:  
\[M=M_{0}+C\cdot\sigma. \tag{7}\]  
The vector \(\sigma=t_{j1}+t_{j2}+\ldots+t_{jk}\) is called the firing vector of the sequence of fired transitions \(t_{j1}t_{j2}\ldots t_{jk}\), where \(j_{i}\in\{1,2,\ldots,m\}\).