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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

H. ElGindy, R. Nicolescu, H. Wu<br />

terminates after all cells enter a final state. Pseudocode 8 shows how ruleset R<br />

is applied.<br />

Pseudocode 8: Matrix structured ruleset applicati<strong>on</strong><br />

1 Input : a P module, Π = (V, E, Q, O, R)<br />

2 R = (R 1, . . . R m), 1 ≤ m, and R i = (R i,1, . . . , R i,mi ), 1 ≤ m i<br />

3 applied = f a l s e<br />

4 for i = 1 to m<br />

5 for j = 1 to m i<br />

6 i f R i,j is applicable then<br />

7 apply R i,j: “here” symbols become immediately available<br />

8 outgoing messages are queued<br />

9 applied = true<br />

10 endif<br />

11 endfor<br />

12 i f applied then<br />

13 send all queued messages<br />

14 break<br />

15 endif<br />

16 endfor<br />

For example, c<strong>on</strong>sider the following vector, R 1 = (R 1,1 , R 1,2 , R 1,3 ), in a system<br />

where cell σ 1 c<strong>on</strong>tains <strong>on</strong>e symbol, a, and has <strong>on</strong>e child cell, σ 2 .<br />

R 1,1 : S 0 a → min S 0 c (f)↓ 2<br />

R 1,2 : S 0 b → min S 1 d (g)↓ 2<br />

R 1,3 : S 0 c → min S 0 e (h)↕ 2<br />

For σ 1 , this vector is applied in <strong>on</strong>e step. First, rule R 1,1 is applied: <strong>on</strong>e c<br />

becomes immediately available and message f is queued for transfer to σ 2 . Next,<br />

the lower-priority rule R 1,2 is not applicable, for two distinct reas<strong>on</strong>s: (1) there<br />

is no b in the current c<strong>on</strong>tents and (2) it indicates a target state, S 1 , different<br />

from the <strong>on</strong>e already selected, S 0 .<br />

Finally, rule R 1,3 is applied: <strong>on</strong>e e becomes available and message h is further<br />

queued for transfer to σ 2 . At the end of the step, σ 1 c<strong>on</strong>tains <strong>on</strong>e e and the queued<br />

symbols, f and h, are transferred to σ 2 .<br />

Complex symbols: While atomic symbols seem sufficient for many theoretical<br />

studies (such as computati<strong>on</strong>al completeness), complex algorithms need<br />

adequate complex data structures. We enhance our initial vocabulary, by recursive<br />

compositi<strong>on</strong> of elementary symbols from O into complex symbols, which<br />

are compound terms of the form: t(i, . . . ), where (1) t is an elementary symbol<br />

representing the functor; (2) i can be (a) an elementary symbol, (b) another<br />

complex symbol, (c) a free variable (open to be bound, according to the cell’s<br />

current c<strong>on</strong>figurati<strong>on</strong>), (d) a multiset of elementary and complex symbols and<br />

free variables.<br />

We often abbreviate complex symbols by using subscripts for term arguments.<br />

The following are examples of complex symbols, where a, b, c, d, e, f are<br />

184

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

Saved successfully!

Ooh no, something went wrong!