# P System with Fractional Reduction
## 4 Fractional Simplification P System
### P System for Fraction Simplification in the Division Algorithm
#### 4.3.3 Examples of Fractional Simplification by Combining the Two Methods  
In this subsection, we will give an example to describe in detail how to implement fractional simplification in a P System using a combination of the more phase derogation algorithm and the division algorithm. For example, the reduction process for a P System taking a manifold of \(15/40\) with \(\xi=20\) is shown in Figure 10:  
The following details the execution process of rules in this P System. (1) Initial pattern  
First, put the multiset \(a^{15}b^{40}ct\) in the membrane \(M_{1}\); where: the number of object \(a\) is \(15\), which is used to represent the numerator of the partition; the number of object \(b\) is \(40\), which is used to represent the denominator. Preprocessing in membrane \(M_{1}\), executing rules in the order \(r_{1}\to r_{3}\to r_{4}\): execute rule \(r_{1}\) fifteen times until object \(a\) is fully consumed, generating \(g^{15}\); execute rule \(r_{3}\) twenty-five times in the presence of object \(g\), converting multiset \(b^{25}\) to multiset \(b_{2}\)\({}^{25}\) and generating multiset \(a^{25}Num^{25}\) to be fed into submembranes \(A_{1},B_{1}\); after executing rule \(r_{4}\), the multiset \(g^{15}\) generates the multiset \(a^{15}b^{15}Num^{15}\) and feeds it into submembrane \(A_{1},B_{1}\); at this point, the multiset in membrane \(M_{1}\) is \(b_{2}\)\({}^{25}ct\). (2) More phase derogation algorithm  
(i) At this time, the multiset in membrane \(A_{1}\) is \(a^{40}b^{15}d^{20}cNum^{40}\)\(CreateSubMem\), and the order of execution of the rules is: \(\{r_{1},r_{2}\}\to r_{3}\to r_{4}\to r_{5}\to r_{6}\to\{r_{7},r_{13}\}\to\{r_{8},r_{10},r_{14},r_{15}\}\). (a) Execute the rule \(r_{1}\), and the multiset \(a^{15}b^{15}\) evolves to \(x^{15}y^{15}\); while executing the rule \(r_{2}\), the object \(c\) evolves to \(k,e,j\); (b) Execute the rule \(r_{3}\), and the multiset \(a^{25}\) evolved to \(a_{1}\)\({}^{25}\)\({}^{u25}\)\({}^{i25}\); then the rule \(r_{4}\) is executed to compare the numerical values of \(25\) and \(\xi\), and generate the multiset \(g^{20}\); (c) Because of the remaining \(i^{5}\), the conditional execution rule \(r_{5}\) is met and the multiset \(i^{5}g^{5}\) evolves to \(f^{5}\); (d) Under the condition that the object \(f\) exists, execute the rule \(r_{6}\), and the multiset \(y^{15}u^{15}\) evolves to generate the multiset \(\lambda^{15}\); (e) If object \(\lambda\) exists, the System executes the rule \(r_{7}\) to generates a new submembrane \(A_{2}\), while executing \(r_{13}\) to evolve \(u\) and \(e\) into object \(h\); (f) Simultaneous execution of rules \(r_{8},r_{10},r_{14},r_{15}\) and \(a^{25}b^{15}Num^{39}c\) is passed directly into the newly created submembrane \(A_{2}\). At which point, the remaining multiset in membrane \(A_{1}\) is \(\lambda^{15}u^{9}f^{5}g^{15}j\). (ii) At this point, the initialized multiset in membrane \(A_{2}\) is \(a^{25}b^{15}Num^{39}c\)\(CreateSubMem\), and the rules are executed in the order \(\left\{r_{1},r_{2}\right\}\to r_{3}\to r_{4}\to r_{18}\to\{r_{19},r_{20}\}\). Figure 10: Simplified flow chart for approximate differentiation of the two combined examples. . Execute the rule \(r_{1}\), and the multiset \(a^{15}b^{15}\) evolves to multiset \(x^{15}y^{15}\); while executing the rule \(r_{2}\), \(c\) evolves to multiset \(k\),\(e\),\(j\); Execute the rule \(r_{3}\), and the multiset \(a^{10}\) is evolved to \(a_{1}{}^{10}u^{10}i^{10}\); then execute the rule \(r_{4}\) to evolve \(d^{10}i^{10}\) to multiset \(g^{10}\); then the multiset in the membrane \(A_{2}\) is \(x^{15},y^{15},a_{1}{}^{10},u^{10},g^{10},d^{10},k,e,j,Num^{39},CreateSubMem\). 3. Execute the rule \(r_{18}\) in the absence of object \(i\) and object \(f\). The multiset \(g^{10}\) evolves into \(o^{10}\); by executing rule \(r_{19},r_{20}\) in the presence of \(o\), the multisets \(x^{15}\) and \(a_{1}{}^{10}\) evolve into the multisets \(m^{15}n^{15}\) and \(m^{10}\), respectively, which are transferred to the parent membrane \(A_{1}\).