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.

F. Ipate, C. Dragomir, R. Lefticaru, L. Mierla, M.J. Pérez-Jiménez<br />

red and green, respectively, that can be associated with the n vertices; a is<br />

used <strong>on</strong>ly in cell 1; S is a flag, X is used to mark that cell divisi<strong>on</strong> has been<br />

completed, Y is used after cell divisi<strong>on</strong> and T, F at the end; yes, no are the<br />

two possible answers - <strong>on</strong>e of them being sent to the envir<strong>on</strong>ment at the end<br />

of the computati<strong>on</strong>; X 1 , . . . , X n+3 are used to count the maximum number<br />

of steps, 2n + 2, requested for the last possible input from C 2 ;<br />

– L = {1, 2};<br />

– IO is not relevant in this case; at the end <strong>on</strong>e of two possible answers will<br />

be sent out;<br />

– C 1 = (1, w 1,0 , R1 σ ), C 2 = (2, w 2,0 , R2 σ ), where w 1,0 = aX 1 , w 2,0 = A 1 S code(n),<br />

with code(n) being the multiset of edges of the graph to be coloured;<br />

– µ is given by the graph with edge (1, 2)<br />

– R1 σ and R2 σ are given by<br />

• R 1 c<strong>on</strong>tains <strong>on</strong>ly rewriting and communicati<strong>on</strong> rules:<br />

∗ X i → X i+1 , 1 ≤ i ≤ n + 2; these rules are used for counting the first<br />

n + 2 steps;<br />

∗ aT → (yes, 0); in the first n + 2 steps, for each soluti<strong>on</strong> found, an<br />

object T will be sent from C 2 to C 1 ; when <strong>on</strong>e or more T ′ s are<br />

received from compartments C 2 , i.e., there is at least <strong>on</strong>e soluti<strong>on</strong>,<br />

then this rule is used to release yes into the envir<strong>on</strong>ment;<br />

∗ aX n+3 → (no, 0) {≥ ¯T }; when no T ’s are received after n + 3 steps,<br />

a no is sent out into the envir<strong>on</strong>ment.<br />

• R 2 c<strong>on</strong>tains<br />

∗ membrane divisi<strong>on</strong> rules: [A i ] 2 → [B i A i+1 ] 2 [G i A i+1 ] 2 [R i A i+1 ] 2 {=<br />

S}, 1 ≤ i ≤ n − 1 and [A n ] 2 → [B n X] 2 [G n X] 2 [R n X] 2 {= S}; these<br />

are applied in n steps and all the possible combinati<strong>on</strong>s of colouring<br />

n vertices with three colours are obtained;<br />

∗ rewriting and communicati<strong>on</strong> rules<br />

· S → λ{= A 1,2 = B 1 = B 2 | = A 1,2 = G 1 = G 2 | = A 1,2 = R 1 =<br />

R 2 | . . . | = A n−1,n = B n−1 = B n | = A n−1,n = G n−1 = G n | =<br />

A n−1,n = R n−1 = R n } (<strong>on</strong>e rule but with a c<strong>on</strong>diti<strong>on</strong> c<strong>on</strong>taining<br />

3 ∗ n ∗ (n − 1)/2 terms) and X → Y ; the first rule checks, for any<br />

pair 1 ≤ i < j ≤ n, that the colour of i and j is the same and<br />

S is available; if so, S is erased; when S disappears, no further<br />

verificati<strong>on</strong>s are performed in the corresp<strong>on</strong>ding cell; when all<br />

the verificati<strong>on</strong>s are completed, X is transformed into Y by the<br />

sec<strong>on</strong>d rule X → Y ;<br />

· Y S → (T, 1); this rule is applied in the (n + 2)th step: if S is<br />

available, i.e, there is a soluti<strong>on</strong> in the current cell 2, T is sent<br />

to cell 1.<br />

The rule executi<strong>on</strong> strategy for compartment 1 is the well-known maximal<br />

parallelism mode, i.e. the associated regular expressi<strong>on</strong> is R ∗ 1. Similarly, the rules<br />

are applied in a maximal parallel manner in compartment 2, with the c<strong>on</strong>straint<br />

that cell divisi<strong>on</strong> rules may <strong>on</strong>ly be applied <strong>on</strong>ce per computati<strong>on</strong> step, at the<br />

end of the step. That is, if the cell divisi<strong>on</strong> rules of compartment 2 are denoted by<br />

248

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

Saved successfully!

Ooh no, something went wrong!