Vertex covers and matchings
Download
1 / 15

Vertex Covers and Matchings - PowerPoint PPT Presentation


  • 114 Views
  • Uploaded on

Vertex Covers and Matchings. Given an undirected graph G=(V,E), a vertex cover of G is a subset of the vertices C such that for every edge (i,j) in E i is in C and/or j is in C. -a matching in G is a subset of the edges M such that no two edges in M share the same vertex. Example.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Vertex Covers and Matchings' - allen-perez


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Vertex covers and matchings
Vertex Covers and Matchings

  • Given an undirected graph G=(V,E),

    • a vertex cover of G is a subset of the vertices C such that for every edge (i,j) in E i is in C and/or j is in C.

      -a matching in G is a subset of the edges M such that no two edges in M share the same vertex.


Example
Example

C = {1, 2, 3, 4}

M = {(1,5), (2,3), (4,6)}

1

2

5

6

3

4


Maximum cardinality matching
Maximum Cardinality Matching

  • Find the largest matching in a given graph G.

  • Tricky (put polynomial) in general, but “easy” in a bipartite graph.

    • A bipartite network has two sets of nodes N1 and N2 such that all edges have one endpoint in N1 and the other in N2.


A bipartite graph

1

2

3

4

5

6

7

8

A Bipartite Graph

N2

N1


Max flow network g

2

1

1

1

1

4

1

1

6

1

1

8

Max Flow Network G’

capacity = 

1

3

s

t

5

7


Mapping flows into matchings
Mapping Flows into Matchings

  • Given a feasible flow in G’, let (i,j) be an edge in M if and only if xij = 1.

  • Observe that |M| = value of the flow.

  • If two edges in E, (i,j) and (k,j), share a node, then either xij = 0, or xkj = 0, or both. Otherwise the arc capacity of (j,t) will be violated.

  • If two edges in E, (i,j) and (i,k), share a node, then either xij = 0, or xik = 0, or both.


Mapping matchings into flows
Mapping Matchings into Flows

  • Start with a zero flow.

  • If (i,j) is an edge in M, then let xsi=1, xij=1, and xjt=1.

  • Consider a pair of matched nodes i and j.

    • The flow x sends exactly one unit of flow to node i on arc (s,i) and exactly one unit of flow into the sink on arc (j,t)

    • Thus, a matching of size |M| gives a feasible s-t flow of value |M|.


Max flow in network g

2

1

1

1

4

1

6

1

1

8

Max Flow in Network G’

1

1

3

1

s

t

5

1

7


Matching in g

1

2

3

4

5

6

7

8

Matching in G


Residual network
Residual Network

S ={S, 1, 2, 3, 5, 6}

1

2

3

4

s

t

5

6

T ={T, 4, 7, 8}

7

8


Minimum cardinality vertex covers
Minimum Cardinality Vertex Covers

  • Find a vertex cover with a minimum number of nodes.

  • Hard in general, but polynomial in bipartite graphs.

    • Solve max flow problem as described earlier and find min cut [S,T].

    • C = {i in N1  T}  {i in N2  S} is a minimum cardinality vertex cover.


Vertex cover in g
Vertex Cover in G

N1

N2

1

2

3

4

5

6

7

8

T ={T, 4, 7, 8}

S ={S, 1, 2, 3, 5, 6}


Correctness of vertex cover result
Correctness of Vertex Cover Result

N1

N2

j in N2  S

N1  S

1

j

s

t

1

N2  T

i

can’t be in min cut

i in N1  T


Correctness of vertex cover result1
Correctness of Vertex Cover Result

  • Let [S,T] be a finite cut in G.

  • Claim: C = {i in N1  T}  {i in N2  S} is a vertex cover.

    • Suppose not.

    • This implies there is some edge (a,b) such that a is in N1 and S, and b is in N2 and T.

    • Since a is in N1 and b is in N2 capacity (a,b) = .

    • But (a,b) goes from s to t. So, u[S,T] = .


Correctness of vertex cover result2
Correctness of Vertex Cover Result

  • The [S,T] be a finite cut in G.

  • Claim: C = {i in N1  T}  {i in N2  S} is a vertex cover such that|C|=u[S,T].

  • Theorem for Bipartite Graphs: The cardinality of a maximum-size matching is equal to the cardinality of a minimum-size vertex cover.


ad