知识卡片

普通读书笔记卡 · 3645.d.1.b

BF逐轮松弛并验负环

理解等级:中级
  1. Bellman-Ford 初始化后,对全部边重复松弛 |V|−1 轮;
  2. 末尾再检查是否仍有边可降低估计。

若有,则报告从源点可达的负权环;否则返回最短路结果。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 第22章 单源最短路径 · 查看原书依据

      The Bellman-Ford algorithm solves the single-source shortest-paths problem in the general case in which edge weights may be negative. Given a weighted, directed graph G = (V, E) with source vertex s and weight function w : E

    参考来源

    - 位置:《算法导论(第4版)》第22章《单源最短路径》(OEBPS/chapter022.xhtml,文本字符[15000,20000))。 - 结论依据:原文伪代码先重复扫描边,再用一轮不等式检查并返回布尔值。 - 原始内容:The Bellman-Ford algorithm solves the single-source shortest-paths problem in the general case in which edge weights may be negative. Given a weighted, directed graph G = ( V , E ) with source vertex s and weight function w : E