Get the treee obtained by the BFS on a graph

19 views
Skip to first unread message

François Thiré

unread,
Jun 13, 2014, 5:24:46 AM6/13/14
to sage-s...@googlegroups.com
Hi,
I need to construct a BFS order (rooted in v0 for example) from a graph, Then, I need to obtain the vertex at distance min{r, d(v,v0)} from v on the path of the BFS-tree from v to v0.

I'd like to know if I have to build myself the tree from the list obtained by the function breadth_first_search of Sage or if there is an easiest way to get this vertex.

Thanks,

François 
Reply all
Reply to author
Forward
0 new messages