最短路径算法__Floyd算法.pptVIP

  • 9
  • 0
  • 约6.68千字
  • 约 27页
  • 2016-11-24 发布于安徽
  • 举报
Cutler/Head Algorithms CS333 / class 22 Floyd’s Algorithm All pairs shortest path All pairs shortest path The problem: find the shortest path between every pair of vertices of a graph The graph: may contain negative edges but no negative cycles A representation: a weight matrix where W(i,j)=0 if i=j. W(i,j)=¥ if there is no edge between i and j. W(i,j)=“weight of edge” Note: we have shown principle of optimality applies to shortest path problems The weight matrix and the graph The subproblems How can we define the shortest distance di,j in terms of “smaller” problems? One way

文档评论(0)

1亿VIP精品文档

相关文档