Consider the following:

sage: Q = DiGraph({1: {2:'a'}, 2: {1: 'b', 3: 'c'}, 3: {2: 'd'}})
sage: Q.all_simple_paths([1], [2])
[[1, 2], [1, 2, 3, 2]]
sage: Q.all_simple_paths([2], [1])
[[2, 1]]

First, the documentation to all_simple_paths says that a simple path
is one in which no vertex appears twice *except possibly the starting
and ending one*.  This is not what I understand to be a simple path,
why the exception for the starting and ending vertex?

Second, if there indeed should be such an exception, why isn't [2, 3,
2, 1] a simple path?  It appears that sage is only letting the end
vertex repeat.

-Jim Stark

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to