Fleury (Frolles) algorithm popular explanation
1. Definition
2. Illustrative examples
Figure 2 is a connected graph G, now using the Fleury algorithm to find its Oraton path. (Note: Euler path, Euro-pull circuit)
One of the Euler pathways is as follows: 4 5 8 7 6 8 9 1 5 3 2 4 6, as shown in the search path:
Now let's analyze the algorithm implementation process:
Suppose we walk like this: 4,6,8,5, at this time there are three kinds of choices at 5 (3,4,1), then which kind can walk through what kind of walk? The answer is (3,4) pass, 1 does not pass. Why is it? To see ...
Analysis:
Since the edge between (5~1) is a bridge that is removed from the traversed edge (E (G)-{e1 (4~6), E2 (6~8), E3 (8~5)}), the so-called bridge removes that edge, all remaining vertices will not be able to connect, i.e., cannot form a connected graph.
The choice (5~3) and (5~4) satisfy the requirements in second (b) of the definition. Of course, when (5~3) and (5~4) do not exist, that is, the definition says "unless there is no other side to choose", at this point can choose (5~1), in other cases must first select the non-bridge edge, otherwise it may be unable to walk through the situation. This means that the search method cannot form the Oraton path. As a consequence of the choice (5~1):
and (5~3) and (5~4) can successfully complete the Eulerian graph path search, the specific algorithm to achieve a lot of online, not the focus of this paper. I believe that with the algorithm idea, the implementation of the algorithm should not be difficult, there is time I will improve the code.
In addition: for example, the sprinkler problem is also the use of the European pull path to solve the classic problem.
Fleury (Frolles) algorithm popular explanation