p>Let's look at breadth first search too, using a different example.</p><pre class="codeinput">load_gaimc_graph(<span class="string">'bfs_example'</span>);
figure(1); clf; graph_draw(A,xy,<span class="string">'labels'</span>,labels);
</pre><img vspace="5" hspace="5" src="demo_03.png" alt=""> <p>The breadth first search algorithm records the distance from the starting vertex to each vertex it visits in breadth first
            order.  This means it visits all the vertices in order of their distance from the