广度优先 Given a graphG=(V.E)and a distinguished source vertex s,breadth-first search systematically explores the edges of Gto"discover every vertex that is reachable from It computes the distance (smallest number of edges)from s to each reachable vertex.It also produces a"breadth-first tree"with root s that contains all reachable vertices.For any vertex vrechable froms,the simple path in the breadth-first tree froms tocorresponds to a"shortest path"froms tov in G,that is,a path containing the smallest number of edges.The algorithm works on both directed and undirected graphs 两组关键的动词 How?广度优先 两组关键的动词 How?