BreadthFirstTraversal

As of Version 10, most of the functionality of the Combinatorica package is built into the Wolfram System. >>


performs a breadth-first traversal of graph g starting from vertex , and gives the breadth-first numbers of the vertices.

BreadthFirstTraversal[g,v,Edge]
returns the edges of the graph that are traversed by breadth-first traversal.

BreadthFirstTraversal[g,v,Tree]
returns the breadth-first search tree.

BreadthFirstTraversal[g,v,Level]
returns the level number of the vertices.

DetailsDetails