知识卡片

普通读书笔记卡 · 3649

广度优先搜索求无权最短边数

理解等级:中级

从源点开始,BFS 按边层层发现所有可达顶点,并求每点到源点所需的最少边数。

其树中根到某顶点的路径对应一条最短边数路径;这不自动求得带权图的最小权路径。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 第20章 基本图算法 · 查看原书依据

      Given a graph G = (V, E) and a distinguished source vertex s, breadth-first search systematically explores the edges of G to “discover” every vertex that is reachable from s. It computes the distance from s to each reachable vertex, where the distance to a vertex v equals the smallest number of edges needed to go from s to v.

    参考来源

    - 位置:《算法导论(第4版)》第20章《基本图算法》(OEBPS/chapter020.xhtml,文本字符[10000,15000))。 - 结论依据:原文明确BFS的可达范围、边数距离与广度优先树路径性质。 - 原始内容:Given a graph G = ( V , E ) and a distinguished source vertex s , breadth-first search systematically explores the edges of G to “discover” every vertex that is reachable from s . It computes the distance from s to each reachable vertex, where the distance to a vertex v equals the smallest number of edges needed to go from s to v .