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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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 />

Definiti<strong>on</strong> 7. A set of blocks B = {B 1 , B 2 , . . . , B s } is self c<strong>on</strong>sistent (or<br />

mutually c<strong>on</strong>sistent) if and <strong>on</strong>ly if ∀i, j (i ≠ j) ⇒ B i and B j are mutually<br />

c<strong>on</strong>sistent.<br />

Remark 2. In such a c<strong>on</strong>text, a set of blocks has an associated set of tuples<br />

(i, α, α ′ ), that is, a relati<strong>on</strong>ship between labels and electrical charges (H × EC)<br />

in EC. Then, a set of blocks is mutually c<strong>on</strong>sistent if and <strong>on</strong>ly if the associated<br />

relati<strong>on</strong>ship H × EC in EC is functi<strong>on</strong>al.<br />

3.2 DCBA Pseudocode<br />

This new simulati<strong>on</strong> algorithm for PDP systems has the same general scheme<br />

than its predecessor, DNDP [10,11]. The main loop (Algorithm 1) is divided into<br />

two stages: selecti<strong>on</strong> and executi<strong>on</strong> of rules, similarly to the DNDP algorithm.<br />

Note that the algorithm selects and executes rules, but not blocks of rules.<br />

Blocks are used by DCBA in order to select rules, and this is made in three<br />

micro-stages as seen in algorithm 2. Phase 1 distributes objects to the blocks<br />

in a certain proporti<strong>on</strong>al way. Phase 2 assures the maximality by checking<br />

the maximal applicati<strong>on</strong>s of each block. Finally, Phase 3 passes from block<br />

applicati<strong>on</strong>s to rule applicati<strong>on</strong>s by computing random numbers following the<br />

multinomial distributi<strong>on</strong> with the corresp<strong>on</strong>ding probabilities.<br />

Algorithm 1 DCBA MAIN PROCEDURE<br />

Require: A Populati<strong>on</strong> Dynamics P system of degree (q, m), T ≥ 1 (time units), and<br />

A ≥ 1 (Accuracy). The initial c<strong>on</strong>figurati<strong>on</strong> is denoted by C 0.<br />

1: INITIALIZATION ⊲ (Algorithm 3).<br />

2: for t ← 1 to T do<br />

3: C t ′ ← C t−1<br />

4: Calculate probability functi<strong>on</strong>s f r,j(t) and p(t) associated to the rules.<br />

5: SELECTION of rules. ⊲ (Algorithm 2)<br />

6: EXECUTION of rules. ⊲ (Algorithm 7)<br />

7: C t ← C t<br />

′<br />

8: end for<br />

Algorithm 2 SELECTION<br />

1: Selecti<strong>on</strong> PHASE 1 : distributi<strong>on</strong> ⊲ (Algorithm 4)<br />

2: Selecti<strong>on</strong> PHASE 2 : maximality ⊲ (Algorithm 5)<br />

3: Selecti<strong>on</strong> PHASE 3 : probabilities ⊲ (Algorithm 6)<br />

Before starting to select and execute rules in the system, some data<br />

initializati<strong>on</strong> is required (Algorithm 3). For instance, the selecti<strong>on</strong> stage uses<br />

a table in order to distribute the objects am<strong>on</strong>g the blocks. This table T , also<br />

296

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

Saved successfully!

Ooh no, something went wrong!