+ All Categories
Home > Documents > 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1....

11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1....

Date post: 12-Dec-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
35
11.4 Bipartite Multigraphs
Transcript
Page 1: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

11.4 Bipartite Multigraphs

Page 2: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Introduction

DefinitionA graph G is bipartite if we can partition the vertices into two disjointsubsets U and V such that every edge of G has one incident vertex inU and the other in V .

Page 3: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Examples

Notice the colors - the property of being bipartite is equivalent tobeing 2-colorable. We will come back to this next chapter.

Page 4: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Example

Suppose we had 5 workers and seven different tasks that could beperformed. If each worker can only perform one task at a time, howcan the tasks be assigned so that the most possible jobs can becompleted?

Worker Tasks1 1,2,3,4,72 4,53 4,54 1,5,65 1,6,7

Page 5: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Example (cont.)

The situation can be modeled as a bipartite graph.

W1• •T1

W2• •T2

W3• •T3

W4• •T4

W5• •T5

•T6

•T7

Page 6: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

One Solution

W1• •T1

W2• •T2

W3• •T3

W4• •T4

W5• •T5

•T6

•T7

This solution is known as a matching.

Page 7: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Matchings

DefinitionA nonempty set M of edges in G is called a matching of G if no twoedges of M are incident with a common vertex.

Definition

A perfect matching has |V|2 edges.

Page 8: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Matchings

DefinitionA nonempty set M of edges in G is called a matching of G if no twoedges of M are incident with a common vertex.

Definition

A perfect matching has |V|2 edges.

Page 9: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Example

Three ladies x1, x2 and x3 are courted by 5 men y1 . . . y5. The bipartitegraph with bipartition (X,Y) shows the situation such that twovertices are adjacent if and only if the two persons would consent tomarry each other.

X •x1 •x2 •x3

Y •y1 •y2 •y3 •y4 •y5

1 Is {x1y1} a matching?2 Is {x1y1, x2y1} a matching?3 Is {x1y5, x2y1, x3y2} a matching?4 Find the number of matchings with three edges.

Page 10: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

When is a graph bipartite?

TheoremA graph G is bipartite iff every circuit of G has even length.

Proof: Note that it is sufficient to prove the theorem for connectedbipartite graphs. We claim that if the theorem is true for eachconnected component of a disconnected bipartite graph G, then it istrue for G.This claim follows from G being bipartite iff each of its componentsis bipartite, and any circuit in G having even length iff any circuit ineach of its components has even length.

Page 11: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

When is a graph bipartite?

TheoremA graph G is bipartite iff every circuit of G has even length.

Proof: Note that it is sufficient to prove the theorem for connectedbipartite graphs. We claim that if the theorem is true for eachconnected component of a disconnected bipartite graph G, then it istrue for G.

This claim follows from G being bipartite iff each of its componentsis bipartite, and any circuit in G having even length iff any circuit ineach of its components has even length.

Page 12: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

When is a graph bipartite?

TheoremA graph G is bipartite iff every circuit of G has even length.

Proof: Note that it is sufficient to prove the theorem for connectedbipartite graphs. We claim that if the theorem is true for eachconnected component of a disconnected bipartite graph G, then it istrue for G.This claim follows from G being bipartite iff each of its componentsis bipartite, and any circuit in G having even length iff any circuit ineach of its components has even length.

Page 13: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Proof (cont.)

First we will show that if G is bipartite, then any circuit has evenlength. If G is bipartite so it can be drawn connecting a left vertexwith a right vertex, then any circuit x1 − x2 − x3 − . . .− xn − x1 hasalternately a left vertex, a right vertex, then a left vertex, and so on,assuming the first vertex x1 is on the left. Odd subscripted numbers onthe left and even subscripted numbers on the right. That is, there is aneven number of vertices in any circuit. Any circuit has the samenumber of edges as vertices, and thus this circuit has even length.

x1• •x2

x3• •x4

x5• •x6

......

xn−1• •xn

Page 14: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Proof (cont.)

Suppose next that any circuit in G (there may be no circuits) has evenlength. We show how to construct a bipartite arrangement of G byassuming a bipartition exists and using the properties of a bipartitionto construct one.

Take any vertex a and put it on the left. Put all vertices adjacent to aon the right. Next put all vertices that are two edges away from a, thatis, at the end of some path of length 2 from a, on the left. In general,if there is a path of odd length between a and a vertex x, put it on theright. If there is a path of even length between a and x, put x on theleft.There cannot be distinct paths P and P′ between a and x of odd andeven lengths, respectively, since taking P from a to x and thenreturning to a on P′ yields an odd length circuit. This is impossiblesince all circuits have even length.

Page 15: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Proof (cont.)

Suppose next that any circuit in G (there may be no circuits) has evenlength. We show how to construct a bipartite arrangement of G byassuming a bipartition exists and using the properties of a bipartitionto construct one.Take any vertex a and put it on the left. Put all vertices adjacent to aon the right. Next put all vertices that are two edges away from a, thatis, at the end of some path of length 2 from a, on the left. In general,if there is a path of odd length between a and a vertex x, put it on theright. If there is a path of even length between a and x, put x on theleft.

There cannot be distinct paths P and P′ between a and x of odd andeven lengths, respectively, since taking P from a to x and thenreturning to a on P′ yields an odd length circuit. This is impossiblesince all circuits have even length.

Page 16: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Proof (cont.)

Suppose next that any circuit in G (there may be no circuits) has evenlength. We show how to construct a bipartite arrangement of G byassuming a bipartition exists and using the properties of a bipartitionto construct one.Take any vertex a and put it on the left. Put all vertices adjacent to aon the right. Next put all vertices that are two edges away from a, thatis, at the end of some path of length 2 from a, on the left. In general,if there is a path of odd length between a and a vertex x, put it on theright. If there is a path of even length between a and x, put x on theleft.There cannot be distinct paths P and P′ between a and x of odd andeven lengths, respectively, since taking P from a to x and thenreturning to a on P′ yields an odd length circuit. This is impossiblesince all circuits have even length.

Page 17: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Proof (cont.)

Similarly, we argue that there cannot be an edge between vertices, sayb and c, both on the left. There must exist even length paths Q and Q′

joining a with b and c, respectively, since b and c are on the left.

a• Q •

• •

b• •

c•Q′

Page 18: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Proof(cont.)

a• Q •

• •

b• •

c•Q′

Observe that Q′ followed by the edge {c, b} yields an odd length pathfrom a to b. This is impossible, since we just proved that there cannotbe both an even length path (Q) and an odd length path (Q′ plus{a, b}) from a to any other vertex in G. By similar reasoning, twovertices on the right cannot be adjacent. This, we have a bipartitearrangement if G.

Page 19: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Another Theorem

TheoremLet G be a bipartite graph with bipartition (X,Y).

1 If |X| 6= |Y|, then G does not have a Hamiltonian cycle.

2 If |X| = |Y|, then G does not have a Hamiltonian path thatbegins at a vertex in X and ends at a vertex in X.

3 If |X| and |Y| differ by at least 2, then G does not have aHamiltonian path.

4 If |X| = |Y|+ 1, then G does not have a Hamiltonian path thatbegins at a vertex in X and ends at a vertex of Y, and vice versa.

Page 20: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Another Theorem

TheoremLet G be a bipartite graph with bipartition (X,Y).

1 If |X| 6= |Y|, then G does not have a Hamiltonian cycle.2 If |X| = |Y|, then G does not have a Hamiltonian path that

begins at a vertex in X and ends at a vertex in X.

3 If |X| and |Y| differ by at least 2, then G does not have aHamiltonian path.

4 If |X| = |Y|+ 1, then G does not have a Hamiltonian path thatbegins at a vertex in X and ends at a vertex of Y, and vice versa.

Page 21: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Another Theorem

TheoremLet G be a bipartite graph with bipartition (X,Y).

1 If |X| 6= |Y|, then G does not have a Hamiltonian cycle.2 If |X| = |Y|, then G does not have a Hamiltonian path that

begins at a vertex in X and ends at a vertex in X.3 If |X| and |Y| differ by at least 2, then G does not have a

Hamiltonian path.

4 If |X| = |Y|+ 1, then G does not have a Hamiltonian path thatbegins at a vertex in X and ends at a vertex of Y, and vice versa.

Page 22: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Another Theorem

TheoremLet G be a bipartite graph with bipartition (X,Y).

1 If |X| 6= |Y|, then G does not have a Hamiltonian cycle.2 If |X| = |Y|, then G does not have a Hamiltonian path that

begins at a vertex in X and ends at a vertex in X.3 If |X| and |Y| differ by at least 2, then G does not have a

Hamiltonian path.4 If |X| = |Y|+ 1, then G does not have a Hamiltonian path that

begins at a vertex in X and ends at a vertex of Y, and vice versa.

Page 23: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Complete Bipartite Graphs

DefinitionA bipartite graph is complete if each vertex in X is adjacent to everyvertex in Y .

Example

K2,3 • •

• •

Page 24: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Complete Bipartite Graphs

DefinitionA bipartite graph is complete if each vertex in X is adjacent to everyvertex in Y .

Example

K2,3 • •

• •

Page 25: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Complete Bipartite Graph

Example

K1,4 • •

• •

Complete bipartite graphs of the form K1,n are called stars.

Page 26: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

The Knight’s Tour Problem

The knight’s tour problem involves the knight graph, which is a graphon vertices in which each vertex represents a square in an chessboard,and each edge corresponds to a legal move by a knight. The process isthis: begin with a square on the grid and and travel around the boardusing only ‘L’ shaped moves.

KK

K

DefinitionA knight’s tour is a sequence of moves by a knight such that eachsquare of the board is visited exactly once. It is therefore aHamiltonian path on the corresponding knight graph.

Page 27: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

The Knight’s Tour Problem

The knight’s tour problem involves the knight graph, which is a graphon vertices in which each vertex represents a square in an chessboard,and each edge corresponds to a legal move by a knight. The process isthis: begin with a square on the grid and and travel around the boardusing only ‘L’ shaped moves.

KK

K

DefinitionA knight’s tour is a sequence of moves by a knight such that eachsquare of the board is visited exactly once. It is therefore aHamiltonian path on the corresponding knight graph.

Page 28: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

When do knight’s tours exist?

ExampleDoes a knight’s tour exist for a 3× 3 board?

Consider the following board:

K

Where do we go from here?What if we started here?

K

Page 29: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

When do knight’s tours exist?

ExampleDoes a knight’s tour exist for a 3× 3 board?

Consider the following board:

K

Where do we go from here?

What if we started here?

K

Page 30: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

When do knight’s tours exist?

ExampleDoes a knight’s tour exist for a 3× 3 board?

Consider the following board:

K

Where do we go from here?What if we started here?

K

Page 31: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Knight’s Tours and Hamiltonian Graphs

Knight’s Tour

5 8 32 67 4 1

This corresponds to the graph:

1• •2

3• •4

5• •6

7• •8

9•

We could invoke the last theorem ...

Page 32: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Knight’s Tours and Hamiltonian Graphs

Knight’s Tour

5 8 32 67 4 1

This corresponds to the graph:

1• •2

3• •4

5• •6

7• •8

9•

We could invoke the last theorem ...

Page 33: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Knight’s Tours and Hamiltonian Graphs

Knight’s Tour

5 8 32 67 4 1

This corresponds to the graph:

1• •2

3• •4

5• •6

7• •8

9•

We could invoke the last theorem ...

Page 34: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Justification for 3× 3 board

TheoremLet G be a bipartite graph with bipartition (X,Y).

1 If |X| 6= |Y|, then G does not have a Hamiltonian cycle.2 If |X| = |Y|, then G does not have a Hamiltonian path that

begins at a vertex in X and ends at a vertex in X.3 If |X| and |Y| differ by at least 2, then G does not have a

Hamiltonian path.4 If |X| = |Y|+ 1, then G does not have a Hamiltonian path that

begins at a vertex in X and ends at a vertex of Y, and vice versa.

Page 35: 11.4 Bipartite Multigraphsbtravers.weebly.com/.../bipartite_multigraphs_slides.pdf · 2019. 1. 25. · The Knight’s Tour Problem The knight’s tour problem involves the knight

Results

Conrad et al. (1994) shows that a knight’s path exists on an n× nboard iff n ≥ 5. And for homework, you will provide an example forn = 5, 6, 7.


Recommended