正在加载图片...
广度优先 Given a graphG=(V.E)and a distinguished source vertex s,breadth-first search systematically explores the edges of Gto"discoverevery vertex that is reachable from s.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 vertexrechable froms,the simple path in the breadth-first tree froms to corresponds to ashortest path"froms tov n,that is,a path containing the smallest number of edges.The algorithm works on both directed and undirected graphs 两组关键的动词 How?广度优先 两组关键的动词 How?
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有