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.

Fast distributed DFS soluti<strong>on</strong>s for edge-disjoint paths in digraphs<br />

11 β = NW DFS(σ sr, σ t, G r−1, 1) // see Pseudocode 4<br />

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

13 fork Discard(σ sr, G r−1)<br />

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

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

16 else // successful round<br />

17 α = σ s.β<br />

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

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

19<br />

−1<br />

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

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

21 endif<br />

22 endfor<br />

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

Pseudocode 4: NW-DFS, adapted for G r−1 = (V, E r−1 )<br />

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

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

3 the residual digraph, G r−1, and σ i’s depth, depth<br />

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

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

6 set σ i as temporarily visited<br />

7 σ i.reach = σ i.depth = depth<br />

8 foreach unvisited arc (σ j, σ i) ∈ E r−1 // see Cid<strong>on</strong>’s DFS<br />

9 set (σ j, σ i) as temporarily visited<br />

10 endfor<br />

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

12 i f (σ i, σ k ) is permanently visited then c<strong>on</strong>tinue<br />

13 e l s e i f (σ i, σ k ) is temporarily visited then<br />

14 σ i.reach = min(σ i.reach, σ k .reach)<br />

15 else // unvisited<br />

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

17 β = NW DFS(σ k , σ t, G r−1, depth + 1)<br />

18 i f β = null then<br />

19 σ i.reach = min(σ i.reach, σ k .reach)<br />

20 i f σ k .reach > σ i.depth then fork Discard(σ k , G r−1) // see PC 5<br />

21 else<br />

22 return σ i.β<br />

23 endif<br />

24 endif<br />

25 endfor<br />

26 return null<br />

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

179

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

Saved successfully!

Ooh no, something went wrong!