Fig. 6

A graphical visualization of line 7 in Algorithm 4 which extends the path P with a node u. When P is not empty, four different cases can arise, as illustrated in a–d. In cases b and d, change-orientation(u) is called to match one of the two path’s end-points