next up previous
Next: Up: Previous:

Breadth-First Search (BFS)



\psfig{figure=figures/f16-7.ps}

Breadth-first search produces breadth-first tree.
Path from s to x in BF tree is the shortest path in terms of the number of edges.

BFS: Given graph G = (V,E) and source s


next up previous
Next: Up: Previous: