由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
CS版 - Dijkstra SSSP@CLR的疑问 (转载)
相关主题
shortest path algorithm(dijkstra)的变形问问Boost library, 尤其是Boost Graph Library (BGL)
求问时间复杂度偶长度最短路径
关于CS的一个问题UT Austin的CS到底怎样?
How to pronunciate dijkstraDynamic programming 如果要求限制次数如何解
[转载]Computer Science Research到了最危险的时刻罗列了CS领域的几乎所有大牛的网页。。。
谁用过LEDA的最短路径算法?程序英雄传(二)(左眼新作) (转载)
This Woman is really cuteThe h Index for Computer Science
一个图的任意两点之间的最短路径求法这就是传说中让理科生沉默,让文科生落泪的文史综合题 (转载)
相关话题的讨论汇总
话题: dijkstra话题: clr话题: sssp话题: extractmin话题: 疑问
进入CS版参与讨论
1 (共1页)
h*********n
发帖数: 915
1
【 以下文字转载自 JobHunting 讨论区 】
发信人: heavyburden (nothing), 信区: JobHunting
标 题: Dijkstra SSSP@CLR的疑问
发信站: BBS 未名空间站 (Fri Dec 14 12:07:54 2007)
这个算法基本想法是用一个优先队列,每次取最小的节点,然后修改相邻节点的key。
直到队列为空。
我的疑问是,在修改了相邻节点之后,优先队列的性质已经无法保持了。比如如果是用
堆实现的优先队列,那么修改过key之后需要重新建堆才行。
但是这一步在哪里完成呢?算法里没有,在extractMin里?但这本书上关于堆的
extractMin是先取最小值,再重建堆。当然,可以额外加一步,在取最小值之前多建一
次堆也不影响复杂度。但是这样对通用的堆操作来说效率不高。
有哪位牛牛能解释解释?
z*l
发帖数: 30
2
did you read thru the section? It mentioned that use DecreaseKey operation
to
update the key values. Each edge may incur one DecreaseKey with time
complexity of O(lgV). Each vertex will incur one ExtractMin with time
complexity of O(lgV).
The total is O(ElgV + VlgV). To improve this bound, they further introduce
Fib Heap to make the total complexity O(E + VlgV).

【在 h*********n 的大作中提到】
: 【 以下文字转载自 JobHunting 讨论区 】
: 发信人: heavyburden (nothing), 信区: JobHunting
: 标 题: Dijkstra SSSP@CLR的疑问
: 发信站: BBS 未名空间站 (Fri Dec 14 12:07:54 2007)
: 这个算法基本想法是用一个优先队列,每次取最小的节点,然后修改相邻节点的key。
: 直到队列为空。
: 我的疑问是,在修改了相邻节点之后,优先队列的性质已经无法保持了。比如如果是用
: 堆实现的优先队列,那么修改过key之后需要重新建堆才行。
: 但是这一步在哪里完成呢?算法里没有,在extractMin里?但这本书上关于堆的
: extractMin是先取最小值,再重建堆。当然,可以额外加一步,在取最小值之前多建一

j***n
发帖数: 301
3
z@n~

【在 z*l 的大作中提到】
: did you read thru the section? It mentioned that use DecreaseKey operation
: to
: update the key values. Each edge may incur one DecreaseKey with time
: complexity of O(lgV). Each vertex will incur one ExtractMin with time
: complexity of O(lgV).
: The total is O(ElgV + VlgV). To improve this bound, they further introduce
: Fib Heap to make the total complexity O(E + VlgV).

h*********n
发帖数: 915
4
呵呵,谢谢了。我在复习,所以只是大致抓算法看了看,然后写点算法。确实没仔细读
文字。

【在 z*l 的大作中提到】
: did you read thru the section? It mentioned that use DecreaseKey operation
: to
: update the key values. Each edge may incur one DecreaseKey with time
: complexity of O(lgV). Each vertex will incur one ExtractMin with time
: complexity of O(lgV).
: The total is O(ElgV + VlgV). To improve this bound, they further introduce
: Fib Heap to make the total complexity O(E + VlgV).

1 (共1页)
进入CS版参与讨论
相关主题
这就是传说中让理科生沉默,让文科生落泪的文史综合题 (转载)[转载]Computer Science Research到了最危险的时刻
高德纳教授为什么得奖 (转载)谁用过LEDA的最短路径算法?
Edsger W. Dijkstra 还要过几年才能退休This Woman is really cute
Wiki 战争(修改版)一个图的任意两点之间的最短路径求法
shortest path algorithm(dijkstra)的变形问问Boost library, 尤其是Boost Graph Library (BGL)
求问时间复杂度偶长度最短路径
关于CS的一个问题UT Austin的CS到底怎样?
How to pronunciate dijkstraDynamic programming 如果要求限制次数如何解
相关话题的讨论汇总
话题: dijkstra话题: clr话题: sssp话题: extractmin话题: 疑问