Dijkstra算法计算N条最短路径
Dijkstra's Algorithm to calculate N shortest paths
是否可以使用Dijkstra's Algorithm
来计算从单个源到单个目的地的N条最短路径,其中N是节点数?我知道 Dijkstra 输出从单个源到图中所有节点的最短路径,但是当我阅读研究论文时,作者提到使用 Dijkstra 计算 s
和 [=12= 之间的 N 条最短路径] 这让我有点困惑。
以下引用原文:
利用基于 SDN 的 SCADA 系统:反窃听案例研究还发现 here
Dijkstra’s algorithm [22] is used to calculate the N shortest routes (step 5), in N stages. Considering N = 2, in the first stage, Dijkstra’s algorithm identifies the shortest route between the two network devices, and subsequently all link costs have their weight increased by a tenfold factor. Immediately after, in the second stage (and with the link costs increased), Dijkstra’s algorithm is executed again to return the second shortest route. Finally, also in the second stage, the link costs of the first route are reestablished to the original values. As explained later, the N shortest routes will be used to deliver a communication flow using different paths and, for this reason, they are stored to be used afterwards
这里的N
好像是作者控制的一个参数,不是图遍历算法特有的。他们使用该算法找到源站和目标站之间的最短路径。
Next, the algorithm
calculates the N shortest routes between the master station and
the specific substation, ...
N
是阶段数。他们只做一次,找到最短路径,然后增加 link 的成本(乘以 10)。然后他们 运行 算法再次在新更新的 link 成本上找到第二条最短(最低成本)路径,依此类推 N
次。
然后在最后他们将 link 成本重置为其原始值。
他们并没有描述一些花哨的 N 对最短路径,而仅仅是相同的经典最短路径-s
-和-t
算法的应用 N
次(每次 运行 的成本不同 link)。
其他变体
在 this 上引用维基百科:
The algorithm exists in many variants; Dijkstra's original variant found the shortest path between two nodes,[2] but a more common variant fixes a single node as the "source" node and finds shortest paths from the source to all other nodes in the graph, producing a shortest path tree.
您可以使用一个 运行 的 Dijkstra 来计算从一个选定的源节点到所有其他节点的最短路径,但在本文的例子中,它总是在相同的源(主站)之间,并且目的地(变电站)。
是否可以使用Dijkstra's Algorithm
来计算从单个源到单个目的地的N条最短路径,其中N是节点数?我知道 Dijkstra 输出从单个源到图中所有节点的最短路径,但是当我阅读研究论文时,作者提到使用 Dijkstra 计算 s
和 [=12= 之间的 N 条最短路径] 这让我有点困惑。
以下引用原文: 利用基于 SDN 的 SCADA 系统:反窃听案例研究还发现 here
Dijkstra’s algorithm [22] is used to calculate the N shortest routes (step 5), in N stages. Considering N = 2, in the first stage, Dijkstra’s algorithm identifies the shortest route between the two network devices, and subsequently all link costs have their weight increased by a tenfold factor. Immediately after, in the second stage (and with the link costs increased), Dijkstra’s algorithm is executed again to return the second shortest route. Finally, also in the second stage, the link costs of the first route are reestablished to the original values. As explained later, the N shortest routes will be used to deliver a communication flow using different paths and, for this reason, they are stored to be used afterwards
这里的N
好像是作者控制的一个参数,不是图遍历算法特有的。他们使用该算法找到源站和目标站之间的最短路径。
Next, the algorithm calculates the N shortest routes between the master station and the specific substation, ...
N
是阶段数。他们只做一次,找到最短路径,然后增加 link 的成本(乘以 10)。然后他们 运行 算法再次在新更新的 link 成本上找到第二条最短(最低成本)路径,依此类推 N
次。
然后在最后他们将 link 成本重置为其原始值。
他们并没有描述一些花哨的 N 对最短路径,而仅仅是相同的经典最短路径-s
-和-t
算法的应用 N
次(每次 运行 的成本不同 link)。
其他变体
在 this 上引用维基百科:
The algorithm exists in many variants; Dijkstra's original variant found the shortest path between two nodes,[2] but a more common variant fixes a single node as the "source" node and finds shortest paths from the source to all other nodes in the graph, producing a shortest path tree.
您可以使用一个 运行 的 Dijkstra 来计算从一个选定的源节点到所有其他节点的最短路径,但在本文的例子中,它总是在相同的源(主站)之间,并且目的地(变电站)。