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.

H. ElGindy, R. Nicolescu, H. Wu<br />

8 r = r + 1<br />

9 set σ s and (σ s, σ q) as visited<br />

10 β = DFS(σ q, σ t, G r−1) // see Pseudocode 2<br />

11 i f β = null then // failed round<br />

12 G r = G r−1<br />

13 endif<br />

14 endwhile<br />

15 i f β ≠ null then // successful round<br />

16 α = σ s.β<br />

17 P r = (P r−1 \ α −1 −1<br />

) ∪ (α \ P r−1 )<br />

18<br />

−1<br />

G r = (V, E r), where E r = (E \ P r) ∪ P r<br />

19 reset all visited cells and arcs to unvisited<br />

20 endif<br />

21 until α = null<br />

22 Output : P r, which is a maximum cardinality set of edge-disjoint paths<br />

Pseudocode 2: Classical DFS, for residual digraph G r−1 = (V, E r−1 )<br />

1 DFS(σ i, σ t, G r−1)<br />

2 Input : the current cell, σ i ∈ V , the target cell, σ t ∈ V<br />

3 and the residual digraph, G r−1<br />

4 i f σ i = σ t then return σ t<br />

5 i f σ i is visited then return null<br />

6 set σ i as visited<br />

7 foreach unvisited (σ i, σ k ) ∈ E r−1<br />

8 set (σ i, σ k ) as visited<br />

9 β = DFS(σ k , σ t, G r−1)<br />

10 i f β ≠ null return σ i.β<br />

11 endfor<br />

12 return null<br />

13 Output : a σ i-to-σ t path, if any; otherwise, null<br />

Our new Algorithm C is described by Pseudocodes 3–6 and uses the same<br />

variables as Algorithm A; additi<strong>on</strong>ally, this algorithm works in d successive<br />

search rounds, defined by successive iterati<strong>on</strong>s of its for loop (line 3.8), where d<br />

is the outdegree of σ s . Without loss of generality, we assume that σ s ’s children<br />

are represented by the set {σ s1 , σ s2 , . . . , σ sd }.<br />

Pseudocode 3: Algorithm C<br />

1 Input : a digraph G = (V, E), a source cell, σ s ∈ V ,<br />

2 and a target cell, σ t ∈ V<br />

3 P 0 = ∅, G 0 = G<br />

4 set σ s as permanently visited<br />

5 foreach unvisited arc (σ j, σ s) ∈ E<br />

6 set (σ j, σ s) as permanently visited<br />

7 endfor<br />

8 for r = 1 to d<br />

9 i f σ sr is permanently visited then c<strong>on</strong>tinue<br />

10 set (σ s, σ sr) as permanently visited<br />

178

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

Saved successfully!

Ooh no, something went wrong!