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.

The efficiency of tissue P systems with cell separati<strong>on</strong> relies <strong>on</strong> the envir<strong>on</strong>ment<br />

end if<br />

end for<br />

end for<br />

for r ≡ [a] i → [Γ 0] i[Γ 1] i ∈ R S according to the order chosen do<br />

for each (a, i, σ i) ∈ C t, ′ according to the lexicographical order, and<br />

such that (i, σ i) /∈ B do<br />

C t ′ ← C t ′ \ {(a, i, σ i)}<br />

A ← A ∪ {(r, 1, (i, σ i))}<br />

B ← B ∪ {(i, σ i)}<br />

end for<br />

end for<br />

This algorithm is deterministic and works in polynomial time. Indeed, the<br />

cost in time of the previous algorithm is polynomial in the size of Π because the<br />

number of cycles of the rst main loop for is of order<br />

O(|R| · (2M+q)(2M+q−1)<br />

2<br />

), and the number of cycles of the sec<strong>on</strong>d main loop for<br />

is of order O(|R| · |Γ | · (2M + q)). Besides, the last loop includes a membership<br />

test of order O(2M + q).<br />

In order to complete the simulati<strong>on</strong> of a computati<strong>on</strong> step of the system Π,<br />

the executi<strong>on</strong> stage takes care of the eects of applying the rules selected in the<br />

previous stage: updating the objects according to the RHS of the rules.<br />

Executi<strong>on</strong> stage.<br />

Input: The output C t<br />

′ and A of the selecti<strong>on</strong> stage<br />

for each (r, n r, (i, σ i), (j, σ j)) ∈ A do<br />

C t ′ ← C t ′ + n r · RHS(r, (i, σ i), (j, σ j))<br />

end for<br />

for each (r, 1, (i, σ i)) ∈ A do<br />

C t ′ ← C t ′ + {(λ, i, σ i)/σ i0}<br />

C t ′ ← C t ′ + {(λ, i, σ i1)}<br />

for each (x, i, σ i) ∈ C t<br />

′ according to the lexicographical order do<br />

if x ∈ Γ 0 then<br />

C t ′ ← C t ′ + {(x, i, σ i)/σ i0}<br />

else<br />

C t ′ ← C t ′ + {(x, i, σ i)/σ i1}<br />

end if<br />

end for<br />

end for<br />

C t+1 ← C t<br />

′<br />

This algorithm is deterministic and works in polynomial time. Indeed, the<br />

cost in time of the previous algorithm is polynomial in the size of Π because the<br />

number of cycles of the rst main loop for is of order O(|R|), and the number<br />

of cycles of the sec<strong>on</strong>d main loop for is of order O(|R| · |Γ | · (2M + q)). Besides,<br />

inside the body of the last loop there is a membership test of order O(|Γ |).<br />

287

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

Saved successfully!

Ooh no, something went wrong!