擅长:python、mysql、java
<p>python图只找到一个循环,而不是所有可能的循环。参见:</p>
<p><a href="http://groups.google.com/group/python-graph/browse_thread/thread/9170926f1bdd097b" rel="nofollow">http://groups.google.com/group/python-graph/browse_thread/thread/9170926f1bdd097b</a></p>
<p>另一篇文章似乎解决了这个问题:</p>
<p><a href="http://www.bitformation.com/art/python_toposort.html" rel="nofollow">http://www.bitformation.com/art/python_toposort.html</a></p>
<p>它使用的是R.E.Tarjan在1972年设计的算法</p>