最短路径问题

Shortest-Paths Algorithms

One of the classic problems in graph theory is to find the shortest path between two vertices in a graph. Formally, a path is a sequence of vertices <v0,v1,...,vk> ia graph G = (V, E) such that each vertex is connected to the next vertex in the sequence (the edges (vi,vi+1) for i=0,1,...,k-1 are in the edge set E). In the shortest-path problem, each edge is given a real-valued weight. We can therefore talk about the weight of a path
w(p) = sum from i=1..k of w(vi-1,vi)

The shortest path weight from vertex u to v is then
delta (u,v) = min { w(p) : u --> v } if there is a path from u to v
delta (u,v) = infinity otherwise.

A shortest path is any path who's path weight is equal to the shortest path weight.
There are several variants of the shortest path problem. Above we defined the single-pair problem, but there is also the single-source problem (all shortest paths from one vertex to every other vertex in the graph), the equivalent single-destination problem, and the all-pairs problem. It turns out that there are no algorithms for solving the single-pair problem that are asymptotically faster than algorithms that solve the single-source problem.

  A shortest-paths tree rooted at vertex in graph G=(V,E) is a directed subgraph where V' is a subset of V and E' is a subset of E, V' is the set of vertices reachable from , G' forms a rooted tree with root , and for all v in V' the unique simple path from to v in G' is a shortest path from to v in . The result of a single-source algorithm is a shortest-paths tree.

 

   翻译最后一段:

一个最短路径生成树是从原来的图graph G=(V,E)的一个点出发的一个有向子图,它有一下属性:V' 是 V 的子集,E' 是 E 的子集,V' 对于树根来说是可达的, G' 是由树根确定的树,V' 中的所有节点 v 到根结点的唯一路径就是根结点到 v 的最短路径。单源点最短路径算法的结果就是一个最短路径生成树。

 

注:最短路径问题的提法很多,其它的最短路径问题均可用单源最短路径算法予以解决:
  ①单目标最短路径问题(Single-Destination Shortest-Paths Problem):找出图中每一顶点v到某指定顶点u的最短路径。只需将图中每条边反向,就可将这一问题变为单源最短路径问题,单目标u变为单源点u。
  ②单顶点对间最短路径问题(Single-Pair Shortest-Path Problem):对于某对顶点u和v,找出从u到v的一条最短路径。显然,若解决了以u为源点的单源最短路径问题,则上述问题亦迎刃而解。而且从数量级来说,两问题的时间复杂度相同。
  ③所有顶点对间最短路径问题(All-Pairs Shortest-Paths Problem):对图中每对顶点u和v,找出u到v的最短路径问题。这一问题可用每个顶点作为源点调用一次单源最短路径问题算法予以解决。

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值