# P System with Fractional Reduction
## 4 Fractional Simplification P System
### P System for Fraction Simplification in the Division Algorithm
#### 4.2.3 Example of Fraction Simplification by the Division Algorithm
(iii) At this time, the multiset in membrane A\({}_{2}\) is \(a^{3}b^{3}cNum^{14}\)CreateSubMem, i.e., \(a_{2}=b_{2}=3\), according to \(\{\texttt{r}_{1},\texttt{r}_{7}\}\rightarrow\{\texttt{r}_{2},\texttt{r}_{14 }\}\rightarrow\texttt{r}_{12}\rightarrow\texttt{r}_{13}\); execute the rule r\({}_{1}\) three times, consume all the \(a\) and \(b\) to generate \(x^{3}\), while executing r\({}_{7}\) to generate submembrane A\({}_{3}\); execute the rule r\({}_{2}\), the multiset \(c\) evolves into the multiset \(y\), and at this time, the multiset in the membrane A\({}_{2}\) is \(x^{3}y\), while executing the rule r\({}_{14}\) to pass the remaining \(Num\) values to the submembrane A\({}_{3}\). In this environment, one can only execute the rule r\({}_{12}\) to evolve \(y\) into the multiset \(z\) and \(e\); execute under the condition that the multiset \(z\) exists, and rule r\({}_{13}\) transforms \(x^{3}\) into \(z^{3}x^{3}\) and passes it to membrane A\({}_{1}\); rule r\({}_{13}\) continues in membrane  
Figure 7: Process diagram for solving the example of the division algorithm P System. (**a**) Flowchart for finding the greatest common divisor x in the division algorithm; (**b**) Flowchart for simplifying the result of the division algorithm example. A\({}_{1}\) and passes the multiset \(z^{3}x^{3}\) to membrane M\({}_{1}\), where the number of objects \(x\) is the maximum convention x\({}_{1}\). This concludes the computation of the maximum convention x\({}_{1}\). (3) Calculate \(k\), \(l\)  
At this point, the multiset in the membrane M\({}_{1}\) is \(a^{6}b^{15}z^{3}x^{3}ct\). (i) Execute rule r\({}_{5}\) in membrane M\({}_{1}\), backing up the maximum convention as \(w^{3}v^{3}\) for simultaneous simplification of the numerator and denominator; execute rule r\({}_{6}\) three times, consuming the multiset \(a^{3}w^{3}\) to generate \(i^{3}\), and execute rule r\({}_{12}\) three times simultaneously, consuming the multiset \(b^{3}v^{3}\) to generate \(f^{3}\);  
(ii) Execute rule r\({}_{7}\) to evolve object \(c\) into \(y\) under the condition that object \(i\) exists, and the execution of the rule r\({}_{13}\) involving the evolution of multiset \(f^{3}\) to multiset \(v^{3}\) under the condition that object \(h\) exists;  
(iii) Simultaneous execution of the rules r\({}_{8}\),r\({}_{14}\), evolving y to d in the presence of catalyst \(a\) and \(e\) to \(h\) in the presence of catalyst \(b\). (iv) Simultaneously execute the rules r\({}_{9}\),r\({}_{15}\), under the condition that \(d\) exists, the object \(i^{3}\) evolves into \(w^{3}\), and \(f^{3}\) evolves into \(v^{3}\). Then simultaneously execute the rules r\({}_{10}\), r\({}_{16}\), evolve d into \(k\), \(c\) and h into \(l\), \(t\), respectively; at this time, \(k\) and \(l\) start to accumulate, and the multiset in the membrane M\({}_{1}\) is \(z^{3},a^{3},b^{12},w^{3},v^{3},c,t,k\), \(l\). (v) After the numerator is repeated once in the order \(\{\texttt{r}_{6},\texttt{r}_{11}\}\) and the denominator is repeated once in the order \(\{\texttt{r}_{12},\texttt{r}_{17}\}\), the multiset inside the membrane is \(z^{3}\hat{a}^{3}b^{9}v^{3}k^{2}l^{2}t\). Since a has been completely consumed, the rule \(\{\texttt{r}_{6},\texttt{r}_{11}\}\) is stopped and the denominator continues to be executed. After repeating the execution three times in sequence, the multiset within the membrane is now \(z^{3}\hat{a}^{3}f^{3}k^{2}l^{4}e\), at which point, only rule r\({}_{17}\) can be executed and object \(e\) evolves to \(l\). At this time, the multiset in the membrane is \(z^{3}\hat{a}^{3}f^{3}k^{2}l^{5}\). The execution up to this point has no rules to execute, so the whole system stops. The number of objects \(k\) and \(l\) denote the values of the numerator and denominator after simplification, respectively, so \(6/15\) ends up with a simplification result of \(2/5\). The specific execution process is divided according to the time slice, as shown in Table 2. This table is also partially omitted.