Algorithm 4Depth-firstSearch(; ; ; ), . | |
1: | P // The number of path between Rs and Rt |
2: | VISITED[Rc] ← True |
3: | ifRc = Rt then |
4: | P ← P + 1 |
5: | else |
6: | for each adjacent region Rn of Rc do |
7: | if VISITED[Rn] = False then Depth-firstSearch(P, K, Rn, Rt, VISITED[Rn]) |
8: | end if |
9: | end for |
10: | end if |
11: | VISITED[Rc] ← False |