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.

M.A. Martínez-del-Amor, I. Pérez-Hurtado, M. García-Quism<strong>on</strong>do,<br />

L.F. Macías-Ramos, L. Valencia-Cabrera, A. Romero-Jiménez, C. Graciani,<br />

A. Riscos-Núñez, M.A. Colomer, M.J. Pérez-Jiménez<br />

In order to repeat efficiently the loop for A, and also before going to the<br />

next phase (maximality), Filters 2 and 3 are applied again. This way, <strong>on</strong>ce<br />

the c<strong>on</strong>figurati<strong>on</strong> is updated, the blocks that are not applicable any more are<br />

discarded from the table.<br />

Algorithm 5 SELECTION PHASE 2: MAXIMALITY<br />

1: for j = 1 to m do ⊲ (For each envir<strong>on</strong>ment e j)<br />

2: Set a random order to the blocks remaining in the last updated table Tj,z t in<br />

Phase 1, step 13.<br />

3: C t ′ ← Ct A ⊲ (Copy the last updated c<strong>on</strong>figurati<strong>on</strong> in Phase 1, step 11 )<br />

4: for each block B, following the previous random order do<br />

5: Calculate the number of applicati<strong>on</strong>s, N B, of B in C t.<br />

′<br />

6: B j sel<br />

← B j sel<br />

+ {B N B<br />

}<br />

7: C t ′ ← C t ′ − LHS(B) · N B<br />

⊲ (Add N B to B j sel<br />

from phase 1, step 10 )<br />

⊲ (Delete the LHS of block B, N B times.)<br />

8: end for<br />

9: end for<br />

After phase 1, some objects may be left without being c<strong>on</strong>sumed. This<br />

can be caused by a low A value or by rounding artefacts when calculating<br />

sums and minimums of inverse numbers in the distributi<strong>on</strong> process. Due to<br />

the requirements of P systems semantics, a maximality phase is now applied<br />

(algorithm 5). Following a random order, a maximal number of applicati<strong>on</strong>s is<br />

calculated for each block still applicable. As a c<strong>on</strong>sequence, no object that can be<br />

c<strong>on</strong>sumed is left in the current c<strong>on</strong>figurati<strong>on</strong>. In order to minimize the distorti<strong>on</strong><br />

towards the most probable blocks, this phase is performed after phase 1, as a<br />

residual number of objects is expected to be c<strong>on</strong>sumed in this phase.<br />

After the applicati<strong>on</strong> of phases 1 and 2, a maximal multiset of selected<br />

(mutually c<strong>on</strong>sistent) blocks has been computed. The output of the selecti<strong>on</strong><br />

stage has to be, however, a maximal multiset of selected rules. Hence, phase<br />

3 (algorithm 6) passes from blocks to rules, by applying the corresp<strong>on</strong>ding<br />

probabilities (at the local level of blocks). The rules bel<strong>on</strong>ging to a block are<br />

selected according to a multinomial distributi<strong>on</strong> M(N, g 1 , . . . , g l ), where N is the<br />

number of applicati<strong>on</strong>s of the block, and g 1 , . . . , g l are the probabilities associated<br />

with the rules r 1 , . . . , r l within the block, respectively.<br />

Once the rules to be applied <strong>on</strong> the current simulati<strong>on</strong> step are selected, the<br />

executi<strong>on</strong> stage (algorithm 7) is applied. This stage c<strong>on</strong>sists <strong>on</strong> executing the<br />

previously selected multiset of rules. As the objects present <strong>on</strong> the left hand<br />

side of these rules have already been c<strong>on</strong>sumed, the <strong>on</strong>ly operati<strong>on</strong> left is the<br />

applicati<strong>on</strong> of the RHS of the selected rules. Therefore, for each selected rule,<br />

the objects present <strong>on</strong> the RHS are added to the corresp<strong>on</strong>ding membranes and<br />

the indicated membrane charge is set.<br />

300

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

Saved successfully!

Ooh no, something went wrong!