360 likes | 492 Views
Discrete Optimization Lecture 3 – Part 1. M. Pawan Kumar pawan.kumar@ecp.fr. Slides available online http:// cvn.ecp.fr /personnel/ pawan /. Questions?. Solutions for the knapsack problems?. Outline. Path Packing Description of the Algorithm Analysis of the Algorithm.
E N D
Discrete OptimizationLecture 3 – Part 1 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online http://cvn.ecp.fr/personnel/pawan/
Questions? Solutions for the knapsack problems?
Outline • Path Packing • Description of the Algorithm • Analysis of the Algorithm
Arc Disjoint s-t Paths v0 v8 s v1 v2 v3 v4 v5 v6 t v7 v9 Set of s-t Paths with no common arcs
s-t Cut v0 v8 s v1 v2 v3 v4 v5 v6 t v7 v9 t not in U C = out-arcs(U) s in U
An Interesting Operation on Digraphs Find an s-t path P v0 v8 s v1 v2 v3 v4 v5 v6 t v7 v9
An Interesting Operation on Digraphs Find an s-t path P v0 v8 s v1 v2 v3 Reverse the arcs of P v4 v5 v6 t v7 v9
An Interesting Operation on Digraphs Find an s-t path P v0 v8 s v1 v2 v3 Reverse the arcs of P v4 v5 v6 For U, s in U, t not in U |out-arcs(U)| decreases by 1. t v7 v9 Size of each s-t cut decreases by 1
Reversing vs. Removing Find an s-t path P v0 v8 s v1 v2 v3 Reverse the arcs of P v4 v5 v6 For U, s in U, t not in U |out-arcs(U)| decreases by 1. t v7 v9 Size of each s-t cut decreases by 1
Reversing vs. Removing U = {v0, v4} v0 v8 s v1 v2 v3 |out-arcs(U)| decreases by 1. v4 v5 v6 t v7 v9
Reversing vs. Removing U = {v0, v4} v0 v8 s v1 v2 v3 |out-arcs(U)| decreases by 2. v4 v5 v6 t v7 v9
Reversing vs. Removing U = {v0} v0 v8 s v1 v2 v3 |out-arcs(U)| decreases by 1. v4 v5 v6 t v7 v9
Reversing vs. Removing U = {v0} v0 v8 s v1 v2 v3 |out-arcs(U)| decreases by 1. v4 v5 v6 Unknown decrease in cut size. t v7 v9 Cannot construct an algorithm.
Another Example U v0 s v1 v2 v3 v4 v5 v6 v7 v8 v9 Corresponds to minimum s-t cut … of size 3 t v10
Another Example U v0 s v1 v2 v3 v4 v5 v6 v7 v8 v9 Corresponds to minimum s-t cut … of size 3 t v10 Why is (v2,v6) not included?
Find an s-t Path U v0 s v1 v2 v3 v4 v5 v6 v7 v8 v9 t v10
Find an s-t Path U v0 s v1 v2 v3 v4 v5 v6 v7 v8 v9 t v10
Reversing vs. Removing U v0 s v1 v2 v3 v4 v5 v6 v7 v8 v9 t v10
Reversing vs. Removing U v0 s v1 v2 v3 v4 v5 v6 v7 v8 v9 Reduces minimum s-t cut … by 1 t v10
Reversing vs. Removing U v0 s v1 v2 v3 v4 v5 v6 v7 v8 v9 Reduces minimum s-t cut … by 1 t v10
Reversing vs. Removing U v0 s v1 v2 v3 v4 v5 v6 v7 v8 v9 t v10
Reversing vs. Removing U v0 s v1 v2 v3 v4 v5 v6 v7 v8 v9 Reduces minimum s-t cut … by 2 t v10
Reversing vs. Removing U v0 s v1 v2 v3 v4 v5 v6 v7 v8 v9 Reduces minimum s-t cut … by 2 t v10
Reversing vs. Removing Removing the arcs doesn’t decrease cut size by a constant Reversing the arcs does decrease cut size by a constant A simple algorithm made possible by reversing
Outline • Path Packing • Description of the Algorithm • Analysis of the Algorithm
Algorithm Find an s-t path P v0 v8 s v1 v2 v3 v4 v5 v6 t v7 v9
Algorithm Find an s-t path P v0 v8 s v1 v2 v3 Reverse the arcs of P v4 v5 v6 t v7 v9
Algorithm Find an s-t path P v0 v8 s v1 v2 v3 Reverse the arcs of P v4 v5 v6 For U, s in U, t not in U |out-arcs(U)| decreases by 1. t v7 v9 Size of each s-t cut decreases by 1
Algorithm Find an s-t path P v0 v8 s v1 v2 v3 Reverse the arcs of P v4 v5 v6 For U, s in U, t not in U |out-arcs(U)| decreases by 1. t v7 v9 Size of each s-t cut decreases by 1
Algorithm Find an s-t path P v0 v8 s v1 v2 v3 Reverse the arcs of P v4 v5 v6 For U, s in U, t not in U |out-arcs(U)| decreases by 1. t v7 v9 Size of each s-t cut decreases by 1
Algorithm Find an s-t path P v0 v8 s v1 v2 v3 Reverse the arcs of P v4 v5 v6 For U, s in U, t not in U |out-arcs(U)| decreases by 1. t v7 v9 Size of each s-t cut decreases by 1
Algorithm Find an s-t path P v0 v8 s v1 v2 v3 Reverse the arcs of P v4 v5 v6 For U, s in U, t not in U |out-arcs(U)| decreases by 1. t v7 v9 Size of each s-t cut decreases by 1
Algorithm Find an s-t path P v0 v8 s v1 v2 v3 No more s-t paths v4 v5 v6 Size of minimum cut = 0 t v7 v9 Size of minimum cut for original digraph = 3
Algorithm While there exist s-t paths Find an s-t path P Reverse the arcs of P End U is the set of vertices reachable by s in the end Minimum s-t cut = out-arcs(U)
Outline • Path Packing • Description of the Algorithm • Analysis of the Algorithm
Computational Complexity O(m) While there exist s-t paths Find an s-t path P O(m) Reverse the arcs of P End O(m2)