Network Flow and Connectivity in Wireless Sensor Networks

Slides:



Advertisements
Similar presentations
COMP 482: Design and Analysis of Algorithms
Advertisements

Max Flow Problem Given network N=(V,A), two nodes s,t of V, and capacities on the arcs: uij is the capacity on arc (i,j). Find non-negative flow fij for.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
MAXIMUM FLOW Max-Flow Min-Cut Theorem (Ford Fukerson’s Algorithm)
Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2012 Lecture 19.
CSCI 256 Data Structures and Algorithm Analysis Lecture 18 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
1 Maximum Flow w s v u t z 3/33/3 1/91/9 1/11/1 3/33/3 4/74/7 4/64/6 3/53/5 1/11/1 3/53/5 2/22/2 
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
1 COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf.
Advanced Algorithms Piyush Kumar (Lecture 2: Max Flows) Welcome to COT5405 Slides based on Kevin Wayne’s slides.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Maximum Flows Lecture 4: Jan 19. Network transmission Given a directed graph G A source node s A sink node t Goal: To send as much information from s.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Advanced Algorithms Piyush Kumar (Lecture 4: MaxFlow MinCut Applications) Welcome to COT5405.
1 COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf.
Max Flow – Min Cut Problem. Directed Graph Applications Shortest Path Problem (Shortest path from one point to another) Max Flow problems (Maximum material.
1 WEEK 11 Graphs III Network Flow Problems A Simple Maximum-Flow Algorithm Izmir University of Economics.
Chapter 7 April 28 Network Flow.
15.082J and 6.855J March 4, 2003 Introduction to Maximum Flows.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 25.
Chapter 7 May 3 Ford-Fulkerson algorithm Step-by-step walk through of an example Worst-case number of augmentations Edmunds-Karp modification Time complexity.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
CSCI 256 Data Structures and Algorithm Analysis Lecture 20 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 23.
CSEP 521 Applied Algorithms Richard Anderson Lecture 8 Network Flow.
1 Network Flow CSC401 – Analysis of Algorithms Chapter 8 Network Flow Objectives: Flow networks –Flow –Cut Maximum flow –Augmenting path –Maximum flow.
Fall 2003Maximum Flow1 w s v u t z 3/33/3 1/91/9 1/11/1 3/33/3 4/74/7 4/64/6 3/53/5 1/11/1 3/53/5 2/22/2 
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Prof. Swarat Chaudhuri COMP 382: Reasoning about Algorithms Fall 2015.
Iterative Improvement for Domain-Specific Problems Lecturer: Jing Liu Homepage:
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
Network Flow What is a network? Flow network and flows
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Maximum Flow Chapter 26.
Data Structures and Algorithms (AT70. 02) Comp. Sc. and Inf. Mgmt
CS4234 Optimiz(s)ation Algorithms
V12: Network Flows V12 follows closely chapter 12.1 in
Algorithm Design and Analysis
Algorithms and Networks Hans Bodlaender
Richard Anderson Lecture 23 Network Flow
Maximum Flow 9/13/2018 6:12 PM Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015.
Lecture 22 Network Flow, Part 2
CSCI 3160 Design and Analysis of Algorithms Tutorial 8
COMP 382: Reasoning about Algorithms
Network Flow 2016/04/12.
Instructor: Shengyu Zhang
Edmonds-Karp Algorithm
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Network Flow and applications
Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 21 Network Flow
Max Flow Min Cut, Bipartite Matching Yin Tat Lee
Piyush Kumar (Lecture 6: MaxFlow MinCut Applications)
Algorithms (2IL15) – Lecture 7
Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Network Flow CSE 373 Data Structures.
EE5900 Advanced Embedded System For Smart Infrastructure
Max Flow / Min Cut.
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Lecture 21 Network Flow, Part 1
Introduction to Maximum Flows
Richard Anderson Lecture 22 Network Flow
Lecture 21 Network Flow, Part 1
Introduction to Maximum Flows
Richard Anderson Lecture 22 Network Flow
Presentation transcript:

Network Flow and Connectivity in Wireless Sensor Networks Youn-Hee Han yhhan@kut.ac.kr Korea University of Technology and Education Laboratory of Intelligent Networks (LINK) http://link.kut.ac.kr Edited and Copied From Slides by Kevin Wayne

Max Flow [Definition] Flow network: Features: an edge-capacitated directed graph, with two distinguished vertices called the source and the sink. Features: Abstraction for material flowing through the edges. G = (V, E) = directed graph Two distinguished nodes: s = source, t = sink. c(e) = capacity of edge e. s 2 3 4 5 6 7 t 15 30 10 8 9 capacity source sink

Max Flow [Definition] flow: A flow in a network X is a function f that assigns to each edge e of the network a real number f(e), in such a way that: 4 capacity flow s 2 3 5 6 7 t 15 30 10 8 9

Max Flow [Definition] flow (or s-t flow): A flow in a network X is a function f that assigns to each edge e of the network a real number f(e), in such a way that: 4 capacity flow s 2 3 5 6 7 t 15 30 10 8 9

Max Flow [Definition] Value Q : The value Q of a flow in a network X is: 4 capacity flow s 2 3 5 6 7 t 15 30 10 8 9 Value Q = 4

Max Flow [Definition] Value Q : The value Q of a flow in a network X is: 10 6 11 1 3 8 capacity flow s 2 4 5 7 t 15 30 9 Value Q = 24

Max Flow [Definition] Max Flow Problem: find the maximum possible value Q of a flow in X and find a flow route of that value. 10 9 14 4 8 1 capacity flow s 2 3 5 6 7 t 15 30 Value Q = 28 (Max)

Min Cut [Definition] cut (A,B) (or s-t cut) : By a cut (A,B), we mean a partition (A, B) of V with s  A and t  B. [Definition] capacity of a cut The capacity of a cut (A, B) is: s 2 3 4 5 6 7 t 15 30 10 8 9 A cap(A,B) = 9 + 15 + 8 + 30 = 62

Min Cut [Definition] Min Cut Problem: find a cut of the minimum capacity in X s 2 3 4 5 6 7 t 15 30 10 8 9 A cap(A,B) = 10 + 8 + 10 = 28

Min Cut [Definition] Min Cut Problem: find a cut of the minimum capacity in X cut(U,V) is a minimum cut : its capacity is the sum of the capacities crossing the cut = 1+2=3=cap(U,V). : the edge (i,j) is not included in cap(U,V) because it is going in the wrong direction.

Flows and Cuts [Lemma 1] Let f be “any” flow, and let cut(A, B) be “any” cut. Then, the net flow sent across the cut is equal to the value Q. 6 2 9 5 10 6 10 15 15 4 4 10 3 8 8 s 5 3 8 6 10 t A 1 10 4 6 15 10 15 11 11 Net flow across the cut = 10+3+11 = 24 (= Value Q) 4 30 7

Flows and Cuts [Lemma 1] Let f be “any” flow, and let cut(A, B) be “any” cut. Then, the net flow sent across the cut is equal to the value Q. 6 2 9 5 10 6 10 15 15 4 4 10 3 8 8 s 5 3 8 6 10 t A 1 10 4 6 15 10 15 11 11 Net flow across the cut = 6 + 0 + 8 - 1 + 11 = 24 (= Value Q) 4 30 7

Flows and Cuts [Lemma 1] Let f be “any” flow, and let cut(A, B) be “any” cut. Then, the net flow sent across the cut is equal to the value Q. 2 9 5 10 6 10 15 15 4 4 10 3 8 8 s 5 3 8 6 10 t A 1 10 4 6 15 10 15 11 11 Net flow across the cut = 10 - 4 + 8 - 0 + 10 = 24 (= Value Q) 4 30 7

Flows and Cuts [Lemma 1] Let f be “any” flow, and let cut(A, B) be “any” cut. Then, the net flow sent across the cut is equal to the value Q. Proof] The net flow out of s is Q. The net flow out of any other vertex v in A is 0. So, we obtain:

Flows and Cuts [Lemma 2] Let f be “any” flow, and let cut(A, B) be “any” cut. Then the value Q of the flow is at most the capacity cap(A,B) of the cut. 6 2 9 5 10 6 10 15 15 4 4 10 3 8 8 s 5 3 8 6 10 t A 1 10 4 6 15 10 15 11 11 4 30 7 Value Q = 24  cap(A,B) = 30

Flows and Cuts [Lemma 2] Let f be “any” flow, and let cut(A, B) be “any” cut. Then the value Q of the flow is at most the capacity cap(A,B) of the cut. 6 2 9 5 10 6 10 15 15 4 4 10 3 8 8 s 5 3 8 6 10 t A 1 10 4 6 15 10 15 11 11 4 30 7 Value Q = 24  cap(A,B) = 64(=9+15+8+30)

Flows and Cuts [Lemma 2] Let f be “any” flow, and let cut(A, B) be “any” cut. Then the value Q of the flow is at most the capacity cap(A,B) of the cut. 2 9 5 10 6 10 15 15 4 4 10 3 8 8 s 5 3 8 6 10 t A 1 10 4 6 15 10 15 11 11 4 30 7 Value Q = 24  cap(A,B) = 28(=10+8+10)

Flows and Cuts [Lemma 2] Let f be “any” flow, and let cut(A, B) be “any” cut. Then the value Q of the flow is at most the capacity cap(A,B) of the cut. Proof]

Max Flow = Min Cut [Theorem] The maximum flow value Q in a network X is equal to the minimum capacity of any cut in X. In other words, Let f be “any” flow, and let (A, B) be “any” cut. If Q= cap(A, B), then the flow f is a max flow and cut(A, B) is a min cut. Value Q = 28 Cut capacity = 28 9 2 9 5 10 1 9 10 15 15 4 10 4 8 9 s 5 3 8 6 10 t 4 10 A 4 6 15 10 15 14 14 4 30 7

Max Flow = Min Cut [Theorem] The maximum flow value Q in a network X is equal to the minimum capacity of any cut in X. In other words, Let f be “any” flow, and let (A, B) be “any” cut. If Q= cap(A, B), then the flow f is a max flow and cut(A, B) is a min cut. Value Q = 3 Cut capacity = 3 1 1 1 1 1 2 2 2 2 2

Max Flow Algorithm: Greedy Greedy algorithm. Start with f(e) = 0 for all edge e  E. Find an s-t path P where each edge has f(e) < c(e). Augment flow along path P. Repeat until you get stuck. 1 20 10 s 30 t 10 20 Flow value = 0 2

Max Flow Algorithm: Greedy Greedy algorithm. Start with f(e) = 0 for all edge e  E. Find an s-t path P where each edge has f(e) < c(e). Augment flow along path P. Repeat until you get stuck. 1 20 X 20 10 s 30 X 20 t 10 20 Flow value = 20 X 20 2

Max Flow Algorithm: Greedy Greedy algorithm. Start with f(e) = 0 for all edge e  E. Find an s-t path P where each edge has f(e) < c(e). Augment flow along path P. Repeat until you get stuck. locally optimality ≠ global optimality 1 1 20 20 10 20 10 20 10 s 30 20 t s 30 10 t 10 20 10 20 20 10 20 greedy = 20 2 opt = 30 2

Max Flow Algorithm: Ford-Fulkerson Original edge: e = (u, v)  E. Flow f(e), capacity c(e). Residual edge. "Undo" flow sent. e = (u, v) and eR = (v, u). Residual capacity: Residual graph: Gf = (V, Ef ). Residual edges with positive residual capacity. Ef = {e}  {eR : c(e) > 0}. capacity u 17 v 6 flow residual capacity u 11 v 6 residual capacity

Max Flow Algorithm: Ford-Fulkerson Original edge: e = (u, v)  E. Flow f(e), capacity c(e). Residual edge. "Undo" flow sent. e = (u, v) and eR = (v, u) Residual capacity: Residual graph: Gf = (V, Ef ). Residual edges with positive residual capacity. Ef = {e}  {eR : c(e) > 0}. 1 2 5 1 1 1 1 1 1 s 4 t 1 1 1 3

Max Flow Algorithm: Ford-Fulkerson Original edge: e = (u, v)  E. Flow f(e), capacity c(e). Residual edge. "Undo" flow sent. e = (u, v) and eR = (v, u) Residual capacity: Residual graph: Gf = (V, Ef ). Residual edges with positive residual capacity. Ef = {e}  {eR : c(e) > 0}. 1 2 5 1 1 1 1 1 1 s 4 t 1 1 1 3 Find any augmenting path in G(x) A augmenting path is a path from s to t along with we can push some additional flow

Max Flow Algorithm: Ford-Fulkerson Original edge: e = (u, v)  E. Flow f(e), capacity c(e). Residual edge. "Undo" flow sent. e = (u, v) and eR = (v, u) Residual capacity: Residual graph: Gf = (V, Ef ). Residual edges with positive residual capacity. Ef = {e}  {eR : c(e) > 0}. 1 2 5 1 1 1 1 1 1 s 4 t 1 1 1 1 1 1 3 Determine the bottleneck of the path. : the bottleneck is the flow of the path Update residual capacities.

Max Flow Algorithm: Ford-Fulkerson Original edge: e = (u, v)  E. Flow f(e), capacity c(e). Residual edge. "Undo" flow sent. e = (u, v) and eR = (v, u) Residual capacity: Residual graph: Gf = (V, Ef ). Residual edges with positive residual capacity. Ef = {e}  {eR : c(e) > 0}. 1 2 5 1 1 1 1 1 s 4 t 1 1 1 1 3 Find any s-t path in G(x)

Max Flow Algorithm: Ford-Fulkerson Original edge: e = (u, v)  E. Flow f(e), capacity c(e). Residual edge. "Undo" flow sent. e = (u, v) and eR = (v, u) Residual capacity: Residual graph: Gf = (V, Ef ). Residual edges with positive residual capacity. Ef = {e}  {eR : c(e) > 0}. 1 2 5 1 1 1 1 1 s 4 t 1 1 2 1 1 1 1 1 3 Determine the bottleneck of the path. : the bottleneck is the flow of the path Update residual capacities.

Max Flow Algorithm: Ford-Fulkerson Original edge: e = (u, v)  E. Flow f(e), capacity c(e). Residual edge. "Undo" flow sent. e = (u, v) and eR = (v, u) Residual capacity: Residual graph: Gf = (V, Ef ). Residual edges with positive residual capacity. Ef = {e}  {eR : c(e) > 0}. 1 2 5 1 1 1 1 2 1 1 1 s 4 t 1 1 1 1 1 1 1 1 1 1 3 Find any s-t path in G(x)

Max Flow Algorithm: Ford-Fulkerson Original edge: e = (u, v)  E. Flow f(e), capacity c(e). Residual edge. "Undo" flow sent. e = (u, v) and eR = (v, u) Residual capacity: Residual graph: Gf = (V, Ef ). Residual edges with positive residual capacity. Ef = {e}  {eR : c(e) > 0}. 1 2 5 1 1 1 1 1 1 1 s 4 t 1 1 1 1 1 1 1 1 1 1 3 Determine the bottleneck of the path. : the bottleneck is the flow of the path Update residual capacities.

Max Flow Algorithm: Ford-Fulkerson Original edge: e = (u, v)  E. Flow f(e), capacity c(e). Residual edge. "Undo" flow sent. e = (u, v) and eR = (v, u) Residual capacity: Residual graph: Gf = (V, Ef ). Residual edges with positive residual capacity. Ef = {e}  {eR : c(e) > 0}. 2 5 1 1 1 1 1 s 4 t 1 1 1 1 1 1 1 1 1 1 3 There is no s-t path in the residual network. This flow is optimal

Max Flow Algorithm: Ford-Fulkerson 1 s 2 4 5 3 t Here is the optimal flow

Ford-Fulkerson Algorithm flow 2 4 4 capacity G: 10 8 6 2 10 s 10 3 9 5 10 t value Q = 0 34

Ford-Fulkerson Algorithm flow 2 4 4 capacity G: 8 X 10 8 6 2 10 s 10 3 9 5 10 t value Q = 0 2 4 4 residual capacity Gf: 10 8 6 2 10 s 10 3 9 5 10 t 35

Ford-Fulkerson Algorithm 2 4 4 G: 10 2 X 8 8 10 8 6 2 10 8 s 10 3 9 5 10 t value Q = 8 2 4 4 Gf: 8 2 8 6 2 10 s 10 3 9 5 2 t 8 36

Ford-Fulkerson Algorithm 2 4 4 G: X 6 8 10 8 10 8 6 2 10 2 2 10 s 10 3 9 5 10 t value Q = 10 2 4 4 Gf: 10 8 6 2 10 s 10 3 7 5 10 t 2 37

Ford-Fulkerson Algorithm X 8 2 2 4 4 G: 10 8 6 10 8 6 6 2 10 2 6 8 10 s 10 3 9 5 10 t value Q = 16 2 4 4 Gf: 6 10 8 6 2 4 s 4 3 1 5 10 t 6 8 38

Ford-Fulkerson Algorithm X 9 7 3 2 2 4 4 G: 10 8 8 10 8 6 6 2 10 8 8 10 s 10 3 9 5 10 t value Q = 18 2 2 2 4 Gf: 8 10 8 6 2 2 s 2 3 1 5 10 t 8 8 39

Ford-Fulkerson Algorithm 3 2 4 4 G: 10 7 9 10 8 6 6 2 10 9 9 10 s 10 3 9 5 10 t value Q = 19 3 2 1 4 Gf: 9 1 10 7 6 2 1 s 1 3 9 5 10 t 9 40

Ford-Fulkerson Algorithm 3 2 4 4 G: 10 7 9 10 8 6 6 2 10 9 9 10 s 10 3 9 5 10 t Cut capacity = 19 value Q = 19 3 2 1 4 Gf: 9 1 10 7 6 2 1 s 1 3 9 5 10 t 9 The partition A becomes the set of vertices reachable from s in residual graph. 41

Max Flow Algorithm: Ford-Fulkerson Ford-Fulkerson(G(V,E), s, t, c) { Gf(V,Ef) G(V,E) while (there exists augmenting path P) { b  bottleneck(P) foreach e  P { if (e  E) c(e)  c(e) - b else c(eR)  c(eR) + b } update G return the current flow value Q //forward edge update Gf //reverse edge

Max-Flow Min-Cut Theorem Augmenting path theorem. Flow f is a max flow iff there are no augmenting paths. Max-flow min-cut theorem. [Ford-Fulkerson 1956] The value of the max flow is equal to the value of the min cut. Proof strategy. We prove both simultaneously by showing the TFAE: (i) There exists a cut (A, B) such that Q = cap(A, B). (ii) Flow f is a max flow. (iii) There is no augmenting path relative to f. (i)  (ii) This was the corollary to weak duality lemma. (ii)  (iii) We show contrapositive. Let f be a flow. If there exists an augmenting path, then we can improve f by sending flow along path.

Proof of Max-Flow Min-Cut Theorem (iii)  (i) Let f be a flow with no augmenting paths. Let A be set of vertices reachable from s in residual graph. By definition of A, s  A. By definition of f, t  A.

K-Edge-Connectivity [Definition] k-edge-connectivity The network will remain connected after removing any arbitrary k-1 edges from network. k-edge-connected:  any pair of nodes are connected by k disjoint paths disjoint paths: 45

Edge Disjoint Paths Disjoint path problem. Given a digraph G = (V, E) and two nodes s and t, find the max number of edge-disjoint s-t paths. [Def] Two paths are edge-disjoint if they have no edge in common. Ex: communication networks. 2 5 s 3 6 t 4 7

Edge Disjoint Paths Disjoint path problem. Given a digraph G = (V, E) and two nodes s and t, find the max number of edge-disjoint s-t paths. [Def] Two paths are edge-disjoint if they have no edge in common. Ex: communication networks. 2 5 s 3 6 t 4 7

Edge Disjoint Paths Max flow formulation: assign unit capacity to every edge. [Theorem] Max number edge-disjoint s-t paths equals max flow value. Proof  Suppose there are k edge-disjoint paths P1, . . . , Pk. Set f(e) = 1 if e participates in some path Pi ; else set f(e) = 0. Since paths are edge-disjoint, f is a flow of value Q=k. ▪ s t 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Edge Disjoint Paths Max flow formulation: assign unit capacity to every edge. [Theorem] Max number edge-disjoint s-t paths equals max flow value. Proof  Suppose max flow value Q is k. Then, there exists 0-1 flow f of value k. Consider edge (s, u) with f(s, u) = 1. by conservation, there exists an edge (u, v) with f(u, v) = 1 continue until reach t, always choosing a new edge Produces k (not necessarily simple) edge-disjoint paths. s t 1 1 1 1 1 1 1 1 1 1 1 1 1 1 can eliminate cycles to get simple paths if desired

Network Connectivity [Network connectivity] Given a digraph G = (V, E) and two nodes s and t, find min number of edges whose removal disconnects t from s. Def. A set of edges F  E disconnects t from s if all s-t paths uses at least one edge in F. 2 5 2 5 s 3 6 t s 3 6 t 4 7 4 7 F

Edge Disjoint Paths and Network Connectivity Theorem. [Menger 1927] The max number of edge-disjoint s-t paths is equal to the min number of edges whose removal disconnects t from s. [Proof]  Suppose the removal of F  E disconnects t from s, and |F| = k. All s-t paths use at least one edge of F. Hence, the number of edge-disjoint paths is at most k. ▪ 2 5 2 5 s 3 6 t s 3 6 t 4 7 4 7 F

Edge Disjoint Paths and Network Connectivity Theorem. [Menger 1927] The max number of edge-disjoint s-t paths is equal to the min number of edges whose removal disconnects t from s. [Proof]  Suppose max number of edge-disjoint paths is k. Then max flow value is k. Max-flow min-cut  cut (A, B) of capacity k. Let F be set of edges going from A to B. |F| = k and disconnects t from s. ▪ A 2 5 2 5 s 3 6 t s 3 6 t 4 7 4 7 F