Maximum Bipartite Matching Algorithm - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Maximum Bipartite Matching Algorithm

Description:

Maximum Bipartite Matching Algorithm. Explanation and Proof. by Sean Rose ... Konig's Theorem: In a bipartite graph, a matching M is maximum, and a node cover ... – PowerPoint PPT presentation

Number of Views:442
Avg rating:3.0/5.0
Slides: 16
Provided by: Owne1196
Category:

less

Transcript and Presenter's Notes

Title: Maximum Bipartite Matching Algorithm


1
Maximum Bipartite Matching Algorithm
  • Explanation and Proof
  • by Sean Rose

2
Goals of Presentation
  • Show that the algorithm performs as claimed
  • At termination show
  • C found by algorithm is a node cover
  • M found by algorithm is a matching
  • M C
  • Discuss the complexity of the algorithm

3
Finding a Node Cover
X
Y
  • A node cover C ? V is a set of vertices such that
    every edge in G is incident with a node in C
  • Konigs Theorem In a bipartite graph, a matching
    M is maximum, and a node cover C is minimum IFF
    M C
  • If algorithm ends at step 1 then
  • M X Y
  • let C X
  • then M C
  • so C is a minimum node cover

C
M
4
Finding a Node Cover
G
X
Y
Td
a
a
f
f
b
b
c
g
g
d
d
h
Even Odd
e
i
M
5
Finding a Node Cover
X
Y
  • Let P be the nodes not belonging to an
    alternating tree
  • P c,e,h,i
  • Note that half of the nodes in P belong to X and
    the other half to Y
  • Let CP P ? X
  • CP c,e
  • Let No be all odd nodes
  • No f,g
  • Claim C CP ? No is a node cover
  • C c,e,f,g

a
f
M
b
P
No
Ne
c
g
d
h
e
i
6
Finding a Node Cover
X
Y
  • Assume C isnt a node cover
  • then there exists an edge not incident with any
    node in No or any node in Cp
  • 3 possibilities for e uv
  • u?Ne, v?No
  • u?P, v?No
  • u?Ne, v?P
  • such an edge cannot exist, so C is a node cover

a
f
M
P
No
b
e?
Ne
e?
c
g
e?
d
h
e
i
7
Prove M is a matching
  • A matching is a set of edges without common
    vertices
  • Initially
  • M Ø, so M is trivially a matching
  • At each augmentation step
  • M M ? P, for an M-augmenting path P
  • Recall the definition of an M-augmenting path
  • a path joining two nodes u,v such that the edges
    are alternatively in, and not in M, and neither
    u, nor v are saturated by M

8
Prove M is a matching
G
Matching M
Matching M M ? P
M-augmenting path P
9
Prove M is a matching
  • Assume M M ? P isnt a matching?
  • There exists two edges in M that share a vertex
  • 4 possibilities
  • e1,e2 ? M
  • e1,e2 ? P
  • e1 ? M, e2 ? P
  • e1 ? P, e2 ? M
  • M M ? P never contains two such edges, thus M
    is a matching

y
x
z
10
Prove M C
  • Let U be nodes not saturated by M
  • If U Ø then
  • terminate at step 1
  • M X Y V/2
  • C X
  • C X M

11
Prove M C
X
Y
  • If U ? Ø then
  • M 1/2 V\U
  • Each alternating tree has
  • one more even node than odd nodes
  • one node in U (the root)
  • Ne No U
  • Three types of disjoint vertices
  • V Ne ? No ? P
  • V Ne No P
  • V 2No P U
  • V\U 2No P
  • 1/2 V\U No 1/2 P
  • Recall
  • half of the nodes in P are in X
  • CP P?X
  • CP 1/2 P
  • C No ? CP
  • C No CP
  • C No 1/2 P

a
f
U d
M
b
P
No
Ne
c
g
d
h
e
i
12
Algorithm Structure
  • Step 0 Initialization
  • Step 1 Termination Test
  • Step 2 Beginning Forest Growth
  • Step 3 Edge Selection
  • Step 4 Growth
  • Step 5 Augmentation
  • Step 6 Termination

S0
S1
S2
S3
S5
S4
S6
13
Algorithm Complexity
14
Algorithm Complexity
  • Total Complexity max1, n, n2,mn
    O(mn)
  • Hopcroft-Karp algorithm has complexity O(mn1/2)
  • Method based upon fast matrix multiplication has
    complexity O(n2.376)
  • better in theory
  • slower in practice

15
Questions
?
Write a Comment
User Comments (0)
About PowerShow.com