09.09.2014 Views

13th International Conference on Membrane Computing - MTA Sztaki

13th International Conference on Membrane Computing - MTA Sztaki

13th International Conference on Membrane Computing - MTA Sztaki

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

S. Verlan, J. Quiros<br />

Using similar ideas it is possible to describe with regular languages sequences<br />

of rules forming more complicated structures. For example, the following structure<br />

r 1<br />

2 ❊ r 2<br />

2 ❊ r 3<br />

2 ❊ r 4<br />

2 ❊<br />

a 0 a 1 a 2 a 3 a<br />

❊❊<br />

4<br />

r 5<br />

2<br />

a 5<br />

can be represented as regular language over the binary alphabet if the number of<br />

symbols a 2 is known. This language can be c<strong>on</strong>structed in a similar way as the<br />

language above for circular dependency. This permits to compute the functi<strong>on</strong><br />

NBV ariants(Π, C, smax) by first choosing the appropriate automat<strong>on</strong> based<br />

<strong>on</strong> the value of N a2 and after that computing its generating functi<strong>on</strong>. Clearly,<br />

this can be d<strong>on</strong>e in c<strong>on</strong>stant time <strong>on</strong> FPGA.<br />

In a similar way it is possible to describe the regular languages for the applicability<br />

of rules having the dependency graph that has no intersecting cycles.<br />

We would like to point out another algorithm for the rule applicati<strong>on</strong>, applicable<br />

to any type of rule dependency.<br />

Let Π be a P system evolving in the set-maximal derivati<strong>on</strong> mode. Let R be<br />

the set of rules of Π and n = |R|. Let C be a c<strong>on</strong>figurati<strong>on</strong>.<br />

Algorithm 3<br />

1. Compute a permutati<strong>on</strong> of rules of R: σ = (r i1 , . . . , r in ), i k ≠ i m , k ≠ m.<br />

2. For j = 1, 2, . . . , n if r ij is applicable then apply r ij to C.<br />

The step 1 of the above algorithm can be optimized using the Fisher-Yates<br />

shuffle algorithm [4] (Algorithm P). However, the implementati<strong>on</strong> of Algorithm 3<br />

is slower than the implementati<strong>on</strong> we presented in Secti<strong>on</strong> 4.2 because the computati<strong>on</strong><br />

of the rules’ permutati<strong>on</strong> needs a register usage, so it cannot be d<strong>on</strong>e<br />

in <strong>on</strong>e clock cycle and it is dependent <strong>on</strong> the number of rules.<br />

By extending Algorithm 3 it is possible to c<strong>on</strong>struct a similar algorithm for<br />

the maximally parallel derivati<strong>on</strong> mode.<br />

Algorithm 4<br />

1. Compute a permutati<strong>on</strong> of rules of R: σ = (r i1 , . . . , r in ), i k ≠ i m , k ≠ m.<br />

2. Compute the applicability vector of rules V = (m 1 , . . . , m n ), where m j , 1 ≤<br />

j ≤ n is the number of times rule r ij can be applied.<br />

3. If the vector V is null, then stop.<br />

4. Otherwise, repeat step 5 for j = 1, . . . , n<br />

5. Compute a random number t between 0 and V [j]. Apply r ij t times.<br />

6. Goto step 2.<br />

This algorithm has similar drawbacks and the number of clock cycles it uses<br />

is at least proporti<strong>on</strong>al to the number of rules.<br />

450

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!