% Given a connected graph G and two vertices a,b in G, 
% find a shortest path from a to b.

function path=find_shortest_path(G,a,b)
   [tree1,tree2,dist]=spanning_tree(G,b);
   path(1)=a;
   while tree1(path(end))>0
      path=[path,tree1(path(end))];
   end % while
return
