You are on page 1of 10

COMP2101/CS20S Discrete Mathematics Graph Theory and Matching 1. Prove that K5 is not planar.

Revision: Kn -

Answer 1.

the complete graph on n vertices the simple graph with n vertices in which there is an edge between every pair of distinct vertices Planar graph a graph that can be drawn without its edges crossing Solution: i. Assuming that vertices are numbered from top to bottom proceeding firstly in a left to right direction, we have vertices numbered from 1 (topmost) to 5 (bottomright most) By attempting to re-draw graph

We get edge 3-4 crossing 1-5 or 2-5. K5 is not planar ii. Where v = number of vertices e = number of edges f = number of faces, including the exterior face v=5 e = 4 + 3 + 2 + 1 = 10 f =8 If G is planar graph, Then ve+f=2 i.e. 5 10 + 8 = 3 2

or

f=ev+2

K5 is not planar

iii.

If G is planar graph, Then e 3v 6 e = 10, v = 5 10 3 x 5 6 K5 is not planar or 10 9

iv.

Suppose that K5 is planar Since every cycle has at least 3 edges, each face is bounded by at least 3 edges. Thus the number of edges that bound faces is at least 3f. In a planar graph, each edge belongs to at most two bounding cycles. Therefore Using ve+f=2 We find that Now 2e 3f or 2e 3(e v + 2) f=ev+2

v=5 e = 4 + 3 + 2 + 1 = 10 2(10) 3(10 5 + 2) 20 21

K5 is not planar 2. Find a Hamilton cycle in the graph shown below

Revision: Simple path (from v to w) a path from v to w with no repeated vertices Cycle (or circuit) a path of non-zero length from v to v with no repeated edges Simple cycle (from v to v)

a cycle with no repeated vertices

Hamiltonian cycle A cycle in a graph G that contains each vertex in G exactly once, except for the starting and ending vertex that appears twice. Hamiltonian path A simple path in a graph G that contains each vertex in G exactly once. (A Hamiltonian path begins and ends at different vertices)
Answer 2.

Solution: Assuming that vertices are numbered from top to bottom proceeding firstly in a left to right direction, we have vertices numbered from 1 (topmost) to 12 (bottom-right most) (1, 2, 3, 4, 5, 6, 9, 7, 8, 10, 12, 11, 1) or many others

Revision: Euler Cycle a cycle in a graph G that includes all of the edges and all of the vertices of G Sum of the degrees of all the vertices in a graph is even

3.

Consider the graph below

i.

Prove that a Hamiltonian cycle does not exist in this graph Hamiltonian cycle A cycle in a graph G that contains each vertex in G exactly once, except for the starting and ending vertex that appears twice.

Answer 3i.

A Hamiltonian cycle with n vertices should also have n edges. Likewise, each vertex in a Hamiltonian cycle has degree of 2. Assuming that vertices are numbered from top to bottom proceeding firstly in a left to right direction, we have vertices numbered, we have vertices numbered from 1 (topmost) to 11 (bottommost).

There are 11 vertices and 18 edges. Suppose that we could eliminate edges from the graph, leaving just a Hamiltonian cycle, as each vertex has degree of 2, we would have to eliminate edges leaving only 2 at each vertex. Consider Eliminate two edges from 1, 6, 11 and one edge from 2, 3, 4, 5, 7, 8, 9, 10. Eliminate Two edges at vertices 1, 6 and 11: vertex 1 (edges 1-2, 1-3), vertex 6 (edges 6-9, 6-10) and vertex 11 (edges 11-4, 11-8) resulting in a single edge being eliminated from (possibly) vertices 2, 3, 9, 10, 4 an 8 One edge at vertices 2, 3, 4, 5, 7, 8, 9, 10 vertex 5 (edge 5-9 OR edge 5-4) vertex 7 (edge 7-10 OR edge 7-8) No. of edges eliminated would be 3 x 2 + 2 x 1 = 8 No. of edges remaining = 18 8 = 10 A Hamiltonian cycle with 11 vertices should also have 11 edges. Therefore the graph does not contain a Hamiltonian cycle.

ii.

If a Hamiltonian path exists, describe one; otherwise, prove that a Hamiltonian path does not exist. Hamiltonian path A simple path in a graph G that contains each vertex in G exactly once. (A Hamiltonian path begins and ends at different vertices) A Hamiltonian path with n vertices should have n-1 edges. Likewise, each vertex in a Hamiltonian cycle has degree of 2 (except for start and end).

Answer 3ii.

(4, 1, 8, 7, 3, 6, 2, 5, 9, 11, 10)

4.

Prove that a simple, connected graph with n > 1 vertices and n-1 edges must contain a vertex of degree 1. Revision:

Simple graph a graph with neither loops nor parallel edges Connected graph a graph in which we can get from any vertex to any other vertex on a path
Answer 4.

Let G be a simple, connected graph with n > 1 vertices Let us assume that each vertex has degree > 1, the minimum of 2 assumed The minimum number of edges needed to ensure degree of 2 is n edges As there are n-1 edges, there must be at least one vertex of degree less than 2 i.e. the graph must contain a vertex with degree 1

5.

Draw K2,5, the complete bi-partite graph on 2 and 5 vertices.

Answer 5.

6.

Consider the graph below

i.

If an Euler cycle exists, describe it; otherwise state why one does not exist in this graph If an Euler path exists, describe one; otherwise, prove that an Euler path does not exist.

ii.

Answer 6. i.

[Revision:

Euler Cycle a cycle in a graph G that includes all of the edges and all of the vertices of G Each edge must exist in the cycle only once The degree of each vertex in the Euler cycle is even The sum of the degrees is even ] There are 11 vertices and 18 edges. If an Euler cycle exists, each vertex has an even degree Assuming that vertices are numbered from top to bottom proceeding in a left to right direction in each row, we have vertices numbered from 1 (topmost) to 11 (bottommost) similar to: 1 2, 3 4, 5, 6, 7, 8 9, 10 11 As there exists a vertex which does not have an even degree i.e. any of vertices 2, 3, 4, 5, 7, 8, 9 and 10 all with degree 3, and a graph with an Euler cycle must have every vertex having an even degree Therefore the graph does not contain an Euler cycle. ii. [Revision: Euler Path a path in a graph G that includes all of the edges and all of the vertices of G Each edge must exist in the path only once The degree of each vertex in the Euler cycle is even except for the starting and ending vertex The sum of the degrees is even ] The sum of the degrees is 4+3+3+3+3+4+3+3+3+3+4 = 36 However, as there exists more than two vertices with an odd degree i.e. any three of vertices 2, 3, 4, 5, 7, 8, 9 and 10 all with degree 3, and a graph with an Euler path must have exactly two vertices with odd degree Therefore an Euler path does not exist

7.

A small school has five teachers, Andy, Beth, Charl, Donnue and Eve. In the spring term, six courses, CS1, CS2, CS3, CS4, CS5 and CS6, are to be offered. Each teacher is qualified to teach one or more courses. The school has the following information for each teacher. Teacher Andy Beth Charl Donnue Eve i. ii. iii. Courses qualified for CS1, CS5, CS6 CS2, CS4 CS1, CS2, CS3 CS3, CS4 CS2, CS6

Model the above situation as a matching network Find a maximal matching Find a way in which each teacher can be assigned to teach a course or use Halls Theorem to explain why no such way exists.

Answer 7. i. Let A be Andy, B be Beth, C be Charl, D be Donnue and E be Eve

CS1 A (1,0)
(1,1) (1,1) (1,1) (1,1) (1,0) (1,0) (1,1) (1,1) (1,0) (1,1) (1,1)

CS2 CS3
(1,1)

B
(1,1)

a
D
(1,1)

CS4 (1,0)
(1,1)

C (1,1)
(1,0) (1,0)

CS5
(1,1) (1,0)

CS6

E ii.

(1,1)

A-CS5, B-CS2, C-CS1, D-CS3, E-CS6 or A-CS1, B-CS2, C-CS3, D-CS4, E-CS6 or

iii.

Assuming that each teacher is allowed to teach exactly one course [Same as the maximal matching] A-CS5, B-CS2, C-CS1, D-CS3, E-CS6 or A-CS1, B-CS2, C-CS3, D-CS4, E-CS6

8.

Applicant A is qualified for jobs J1, J2, J4 and J5; B is qualified for jobs J1, J4 and J5; C is qualified for jobs J1, J4 and J5; D is qualified for jobs J1 and J5. E is qualified for jobs J2, J3 and J5; F is qualified for jobs J4 and J5. Model the above situation as a matching network Find a maximal matching Show a complete matching or Use Halls Theorem to show that one does not exist.

Answer 8.

i. A (1,0)
(1,1) (1,1) (1,0) (1,0) (1,1)

J1
(1,1)

B
(1,1) (1,0) (1,0) (1,0) (1,0)

J2
(0,0)

(1,1)

(1,0) (1,1) (1,1)

s
(1,1)

C (0,0)
(0,0) (1,1) (1,1)

J3
(1,1)

D
(1,1)

J4 E
(1,0) (1,1)

(1,1) (1,0)

J5

ii.

A maximal Matching is found and is highlighted in the Matching Network. A-J2, B-J1, D-J5, E-J3, F-J4 or A-J2, C-J1, D-J5, E-J3, F-J4 or

iii.

A Complete Matching does not exist. By Halls Theorem If G is a directed, bipartite graph with disjoint sets of vertices V and W and with directed edges from V to W. Let S V. Let R(S) = {w W | v S and (v, w) is an edge in G} Then: there exists a complete matching in G if and only if |S| < |R(S)| for all S V. As V = {A, B, C, D, E, F} Let S = {B, C, D, F} R(S) = {1, 4, 5} As |S| = 4 NOT 3 = |R(S)|

|S| = 4 |R(S)| = 3

By Halls Theorem A Complete Matching Does Not Exist 9. Applicant A is qualified for jobs J2, J4 and J5; applicant B is qualified for jobs J1 and J3; applicant C is qualified for jobs J1, J3 and J5; and applicant D is qualified for jobs J3 and J5 . Model the above situation as a matching network Find a maximal matching Show a complete matching or Use Halls Theorem to show that one does not exist.
Answer 9.

J1 i.
(1,1) (1,1) (1,1)

J2
(1,1) (1,0)

A
(1,1) (1,0) (1,1) (1,0) (1,0) (1,1) (1,0) (1,0)

s
B J3
(1,1) (1,0)

(1,1)

C
1,1)

J4
(1,1)

D
(1,1)

J5

ii.

A maximal Matching is found and is highlighted in the Matching Network. A-J2, B-J1, C-J3, D-J5 or A-J4, B-J1, C-J3, D-J5 or A Complete Matching is as the Maximal Matching previously displayed. A-J2, B-J1, or A-J4, B-J1, C-J3, C-J3, D-J5 D-J5

iii.

You might also like