正在加载图片...
广度优先 Given a graph G=(V,E)and a disting 一定是棵树 adth-first search systematically explores the edges of 吗? ex that is reachable from s.It computes the distance (sm number of edges)from s to each reachable vertex.It also produces a"breadth-first tree"with roots that contains all reachable vertices.For any vertex v reachable from s,the simple path in the breadth-first tree from s to v corresponds to a"shortest path"from s tov in G,that is,a path containing the smallest number of edges.algorithm works on both directed and undirected graphs. 定最短吗? 显然?广度优先 一定是棵树 吗? 一定最短吗? 显然?
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有