以下是在欧拉图中找到欧拉路径的给定算法。但是,据说有一个顶点少于10个的反例。给定的欧拉图是无向的,每个顶点的度数都是偶数,它将在同一个顶点开始和结束。
1. Perform a DFS traversal of G and number the vertices in DFS-preorder.
2. Re-initialize all vertices and edges of G as unused.
3. Produce a cycle as follows:
Start from the vertex with preorder number 1 (computed in step 1), and
repeatedly go to the vertex with highest preorder number possible along
an unused edge.
Stop when all edges incident to the current vertex are used.
在过去的 3 天里,我一直在尝试从 6 到 9 的顶点,但我真的想不出一个例子。任何帮助表示赞赏!谢谢你。