知识卡片

普通读书笔记卡 · 3649.c

首次发现决定BFS树父节点

理解等级:中级

扫描灰色顶点 u 的邻接表时,首次遇到白色 v,就把边 u→v 加入广度优先树并令 u 为 v 的父节点。每个可达顶点至多首次发现一次,所以除源点外只有一个树父节点。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

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

      Whenever the search discovers a white vertex v in the course of scanning the adjacency list of a gray vertex u, the vertex v and the edge (u, v) are added to the tree. We say that u is the predecessor or parent of v in the breadth-first tree.

    参考来源

    - 位置:《算法导论(第4版)》第20章《基本图算法》(OEBPS/chapter020.xhtml,文本字符[10000,15000))。 - 结论依据:原文以首次发现白点作为树边建立时机,并说明父节点唯一性。 - 原始内容:Whenever the search discovers a white vertex v in the course of scanning the adjacency list of a gray vertex u , the vertex v and the edge ( u , v ) are added to the tree. We say that u is the predecessor or parent of v in the breadth-first tree.