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.

DCBA: Simulating populati<strong>on</strong> dynamics P systems with proporti<strong>on</strong>al object<br />

distributi<strong>on</strong><br />

Algorithm 3 INITIALIZATION<br />

1: C<strong>on</strong>structi<strong>on</strong> of the static distributi<strong>on</strong> table T :<br />

– Column labels: c<strong>on</strong>sistent blocks of rules from R: B i,α,α ′ ,u,v<br />

– Row labels: pairs (o, i) and (o ′ , e), for all object o ∈ Γ , o ′ ∈ Σ and membrane<br />

i, e being a generic identifier of the envir<strong>on</strong>ments of the P system.<br />

– For each c<strong>on</strong>sistent block B, each object o ∈ Γ and i, place at row labelled<br />

by (o, i) and column labelled by B the fracti<strong>on</strong> 1 if o appears within i with<br />

k<br />

multiplicity k in the LHS of B, or place a null value otherwise; do the same for<br />

each object x ∈ Σ appearing outside the skin membrane (i.e. the envir<strong>on</strong>ment).<br />

2: for j = 1 to m do ⊲ (C<strong>on</strong>struct the expanded table T j)<br />

3: T j ← T . ⊲ (Initialize the table with the original T )<br />

4: For each communicati<strong>on</strong> rule block B from R E, which is associated with the<br />

envir<strong>on</strong>ment e j, add a column labelled by B to the table T j; place the value 1 at<br />

row (x, e) and column B, x being the object appearing in the LHS of B.<br />

5: end for<br />

6: Initialize the multisets B j sel<br />

← ∅ and R j sel ← ∅<br />

called static table, is used in each time step, so it is initialized <strong>on</strong>ly <strong>on</strong>ce, at the<br />

beginning of the algorithm. The static table has <strong>on</strong>e column per each c<strong>on</strong>sistent<br />

block of rules, and <strong>on</strong>e row per each pair of object and compartment (i.e., each<br />

membrane and the envir<strong>on</strong>ment). An expanded static table T j is also c<strong>on</strong>structed<br />

for each envir<strong>on</strong>ment, to c<strong>on</strong>sider also blocks from envir<strong>on</strong>ment communicati<strong>on</strong><br />

rules. Finally, for each envir<strong>on</strong>ment, two multisets B j sel and Rj sel<br />

, are initialized.<br />

They are used by the algorithm in order to store the selected blocks and the<br />

selected rules, respectively.<br />

The distributi<strong>on</strong> of objects am<strong>on</strong>g the blocks with overlapping LHS is<br />

performed in Selecti<strong>on</strong> Phase 1 (Algorithm 4). The expanded static table T j<br />

is used for this purpose in each envir<strong>on</strong>ment. Three filters are defined in order<br />

to adapt T j to the c<strong>on</strong>figurati<strong>on</strong> C t of the system; that is, to select which<br />

blocks are going to receive objects. Filter 1 discards the columns of the table<br />

corresp<strong>on</strong>ding to n<strong>on</strong>-applicable blocks due to mismatch charges in the LHS.<br />

Filter 2 discards the columns corresp<strong>on</strong>ding to n<strong>on</strong>-applicable blocks due to<br />

the objects from the LHS. The goal of Filter 3 is to save space in the table,<br />

discarding rows that become empty because of the previous filters. These three<br />

filters are applied at the beginning of phase 1, and the result is a dynamic table<br />

Tj t (for the envir<strong>on</strong>ment j and time step t).<br />

Filter procedures for selecti<strong>on</strong> Phase 1<br />

procedure Filter 1(table T , c<strong>on</strong>figurati<strong>on</strong> C) ⊲ (By columns and charges)<br />

Discard columns from table T , according to the charge of the membrane in the<br />

LHS of the corresp<strong>on</strong>ding block and in the c<strong>on</strong>figurati<strong>on</strong> C.<br />

end procedure<br />

procedure Filter 2(table T , c<strong>on</strong>figurati<strong>on</strong> C) ⊲ (By columns and multiplicity)<br />

Discard columns from table T , such that for any row (o, i) or (x, e), the<br />

multiplicity of that object in C multiplied by 1/k (the value in the table), returns a<br />

number κ, 0 ≤ κ < 1. If all the values for that column are null, it is also filtered.<br />

297

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

Saved successfully!

Ooh no, something went wrong!