08.01.2013 Views

LNCS 2950 - Aspects of Molecular Computing (Frontmatter Pages)

LNCS 2950 - Aspects of Molecular Computing (Frontmatter Pages)

LNCS 2950 - Aspects of Molecular Computing (Frontmatter Pages)

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.

Solving Graph Problems by P Systems 19<br />

and the set R contains the following rules (we also give explanations about the<br />

use <strong>of</strong> these rules during the computations):<br />

1. [ 2ai] 0<br />

2 → [ 0<br />

2ti] 2 [ 2<br />

2. [ 2 di → di+1] 0<br />

2<br />

0<br />

fi] 2 , 1 ≤ i ≤ n.<br />

, 1 ≤ i ≤ n − 1.<br />

3. [ 2 dn → qqh0] 0<br />

2 .<br />

We omit the explanations about the use <strong>of</strong> the rules <strong>of</strong> types 1, 2, and 3,<br />

because they are the same as the explanations in the pro<strong>of</strong> <strong>of</strong> Theorem 2.<br />

Now we pass to the next phase <strong>of</strong> computation – counting the number <strong>of</strong><br />

objects ti (1 ≤ i ≤ n) in each membrane with label 2, which corresponds to<br />

the cardinality <strong>of</strong> each subset.<br />

4. [ 2 q] 0<br />

2 → [ 2<br />

5. [ 2 q] −<br />

2 → [ 2<br />

] −<br />

2 u.<br />

] 0<br />

2 u.<br />

6. [ 2ti → ab] −<br />

2 , 1 ≤ i ≤ n.<br />

7. [ 2hi → h ′ 0<br />

i ] 2 , 0 ≤ i ≤ k.<br />

8. [ 2h ′ +<br />

i → hi+1]<br />

2 , 0 ≤ i ≤ k − 1.<br />

9. [ 2a] 0<br />

2 → [ +<br />

2 ] 2 u.<br />

10. [ 2b] +<br />

2 → [ 0<br />

2 ] 2u. The rules <strong>of</strong> types 4-10 are used in the same way as the corresponding rules<br />

from the pro<strong>of</strong> <strong>of</strong> Theorem 2, the only difference is that at step n +2, ti<br />

evolves to ab.<br />

The rules <strong>of</strong> types 7, 8, 9, and 10 are applied as many times as possible (in<br />

one step rules <strong>of</strong> types 7 and 9, in the next one rules <strong>of</strong> types 8 and 10, and<br />

then we repeat the cycle). Clearly, at step n +2+2k, a membrane contains<br />

object hk if and only if the cardinality <strong>of</strong> the corresponding subset is at least<br />

k. Atstepn +3+2k, in the membrane whose corresponding subset has<br />

cardinality more than k, hk evolves to h ′ k , and one copy <strong>of</strong> a changes its<br />

polarization to positive. This membrane will no longer evolve, as no further<br />

rule can be applied to it. In the membrane whose corresponding subset has<br />

cardinality exactly k, hk evolves to h ′ k , and its polarization remains neutral,<br />

because there is no copy <strong>of</strong> a which can be used. We pass to the next phase<br />

<strong>of</strong> computation – checking whether a subset with cardinality k is a clique.<br />

(A subset A <strong>of</strong> vertices is a clique if and only if for each edge (vi,vj) ∈ E ′ ,<br />

xi ∈ V − A or xj ∈ V − A, i.e., E ′ ⊆ V × (V − A) ∪ (V − A) × V . The process<br />

<strong>of</strong> checking whether a subset with cardinality k is a clique is based on this<br />

fact.)<br />

11. [ 2h ′ 0<br />

k → qqg] 2 .<br />

12. [ 2fi → yizi] −<br />

2 ,1≤ i ≤ n.<br />

13. [ 2g → g0] −<br />

2 ,<br />

[ 2ei,j,l → ei,j,l−1] α<br />

2 ,1≤ i, j ≤ n, 1 ≤ l ≤ n +2k +5,α∈{+, −, 0}.<br />

At step n +4+2k, in the membranes with label 2 and polarization 0, h ′ k<br />

evolves to qqg. Atstepn+5+2k,onecopy<strong>of</strong>qexits the membrane, changing<br />

its polarization to negative. At step n +6+2k, in parallel, fi (1 ≤ i ≤ n)<br />

evolves to yizi, g evolves to g0 and an object ei,j,0 appears for each (vi,vj) ∈

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

Saved successfully!

Ooh no, something went wrong!