当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

香港中文大学:《Design and Analysis of Algorithms》课程教学资源(辅导课件)tutorial 08

资源类别:文库,文档格式:PPTX,文档页数:21,文件大小:579.26KB,团购合买
点击下载完整版文档(PPTX)

CSCI 3160 Design and Analysis of Algorithms Tutorial 8 Chengyu Lin

CSCI 3160 Design and Analysis of Algorithms Tutorial 8 Chengyu Lin

Maximum Network Flow Maximize the flow from the source to the sink 561w M人 Disclaimer:Most of the slides are taken from last year's tutorial of this course

Maximum Network Flow • Maximize the flow from the source to the sink Disclaimer: Most of the slides are taken from last year’s tutorial of this course

Network Flow 3/3 ·Capacity constraint 3/3 2/2 Flow value(nonnegative)on an edge 0/2 1/4 (u,v)cannot exceed c(u,v) 2/3 3/3 2/2 。Flow conservation Incoming Outgoing 5/30 No leakage 20/40 NO! 15/30 06

Network Flow • Capacity constraint – Flow value (nonnegative) on an edge (u,v) cannot exceed c(u,v) • Flow conservation – Incoming = Outgoing – No leakage 20/40 5/30 15/30

Residual Network ·Residual network 20/20 0/40 40 20 20/30 t 2010 20 0/40 20/40 40 20 。Residual capacity The amount of flow you can push or undo

Residual Network • Residual network • Residual capacity – The amount of flow you can push or undo s t 40 20 40 20 20 20 s t 20/20 0/40 20/40 0/40 20/30 10

Augmenting path A path from source to sink in the residual network Different ways of finding augmenting path yield different performances Method Complexity Ford-Fulkerson DFS (|E|maxlfl) Edmonds-Karp BFS O(IVIJE12)

Augmenting path • A path from source to sink in the residual network • Different ways of finding augmenting path yield different performances Method Complexity Ford-Fulkerson DFS O(|E| max|f|) Edmonds-Karp BFS O(|V||E| 2 )

How slow can Ford-Fulkerson be? 0/9999 0/9999 0/1 t 0/9999 0/9999 0 绝

How slow can Ford-Fulkerson be? s t 0/9999 0/9999 0/9999 0/9999 0/1

How slow can Ford-Fulkerson be? *These are residual networks 9999 9999 9998 9999 s 1 t 9999 9999 9999 9998 9998 9999 9998 9998 t t M 9999 9998 9998 9998

How slow can Ford-Fulkerson be? *These are residual networks s t 9999 9999 9999 9999 1 s t 9998 9999 9998 9999 1 1 1 s t 9998 9999 9998 9999 1 1 1 s t 9998 9998 9998 9998 1 1 1 1 1

How slow can Ford-Fulkerson be? *These are residual networks 9998 9998 9997 9998 9998 9998 9998 9997 9997 9998 9997 9997 t t 9998 9997 9997 9997

How slow can Ford-Fulkerson be? *These are residual networks s t 9998 9998 9998 9998 1 1 1 1 1 s t 9997 9998 9997 9998 2 2 1 1 1 s t 9997 9998 9997 9998 2 2 1 1 1 s t 9997 9997 9997 9997 1 2 2 2 2

What about Edmonds-Karp? 0/9999 0/9999 0/1 t 0/9999 0/9999

What about Edmonds-Karp? s t 0/9999 0/9999 0/9999 0/9999 0/1

What about Edmonds-Karp? *These are residual networks 9999 9999 9999 9999 1 s 1 t t 9999 9999 9999 9999 9999 9999 9999 9999 1 十 s 1 t 9999 9999 9999 9998

What about Edmonds-Karp? *These are residual networks s t 9999 9999 9999 9999 1 s t 9999 9998 9999 1 9999 s t 9999 9999 9999 1 9999 s 1 t 9999 9999 9999 9999

点击下载完整版文档(PPTX)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共21页,试读已结束,阅读完整版请下载
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有