Discrete Math Suggested Practice Problems With Answer For Final Exam

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14
At a glance
Powered by AI
The document discusses discrete math topics like recurrence relations, graphs, and graph algorithms.

The document discusses undirected graphs, directed graphs, bipartite graphs, regular graphs, and specific graphs like complete graphs and cycles.

The document introduces graph properties like connectivity, cuts, chromatic number, and terminology like vertices, edges, degrees, isomorphism.

Discrete Math MAT226 Fall 2014

Suggested Practice Problems with Answers for Final Exam


Discrete Mathematics and its applications, Kenneth Rosen, 7th edition
First make sure that you can do problems similar to
the problems worked out in class, homework and WeBWorK.
Section 8.2: Linear recurrence relations
1. Determine which of the following recurrence relations are homogeneous. If it is
homogeneous, find its degree.
(a) an = 3an2
(b) an = 3
(c) an = a2n1
(d) an = an1 + 2an3
(e) an = an1 /n
(f) an = an1 + an2 + n + 3
(g) an = 4an2 + 5an4 + an7
2. Find the solution to the following recurrence relations.
(a) fn = fn1 + fn2 with f0 = 0 and f1 = 1. (Solved in class)
(b) an = 4an2 , n 2 with a0 = 0 and a1 = 4.
(c) an = 4an1 4an2 , n 2 with a0 = 6 and a1 = 8. (Solved in class)
(d) an = 2an1 + an2 2an3 , n 3 with a0 = 3, a1 = 6 and a2 = 0.
(Solved in class)
(e) an = 2an1 + 5an2 6an3 with a0 = 7, a1 = 4 and a2 = 8.
(f) an = 6an1 12an2 + 8an3 , n 2 with a0 = 5, a1 = 4 and a2 = 88.
(Solved in class)
Section 10.1: Graphs
1. Determine whether the following graphs are undirected simple, multigraph.
a

2. Draw the intersection (simple) graph of with the vertex set {A1 , A2 , . . . , A6 }
where there is an edge between Ai and aj iff Ai Aj 6= .
A1 = {x | x < 0}, A2 = {x | 1 < x < 0}, A3 = {x | 0 < x < 1}, A4 = {x| 1 <
x < 1}, A5 = {x | x > 1}, A6 = R.

3. Draw the acquaintanceship graph that represents Tom and Pat, Tom and Hope,
Tom and Sandy, Tom and Amy, Tom and Marika, Jeff and Pat, Jeff and Mary,
Pat and Hope, Amy and Hope, and Amy and Marika know each other, but none
of the other pairs of people listed know each other.
4. Describe a graph model that represents a subway system in a large city. Should
edges be directed or undirected? Should multiple edges be allowed? Should
loops be allowed?
Section 10.2: Graph terminology
1. Consider the following graph G.
e
a

c
G

(a) Find the vertex set, edge set, degree sequence of G.


(b) Draw G and all induced subgraphs of G on 4 vertices.
2. Determine whether the following graph G is bipartite (You may determine
whether G is 2-colorable). If G is bipartite, use Halls marriage theorem to
determine the existence of a complete matching from one vertex set to another.
c

b
a

d
e

f
G

3. Can a simple graph exist with 15 vertices each of degree 5?


4. Show that in a simple graph with at least 2 vertices there must be two vertices
of the same degree.
5. Draw K7 , K1,8 , K4,4 , C7 , W7 , Q4 .
6. For which value of n are the following graphs bipartite: Kn , Cn , Wn , Qn ?
7. Find the number of vertices and edges of the following graphs: Kn , Cn , Wn , Km,n , Qn ?
8. Find the degree sequence of the following graphs: K4 , C4 , W4 , K2,3 , Q3 ,?
9. Find the number of vertices and edges of a graph with the degree sequence
(5, 2, 2, 2, 2, 1)? Draw such a graph.
2

10. Determine whether there is a graph with the following degree sequence. If such
a graph exists, draw it. (a) (3, 3, 3, 3, 2) (b) (5, 4, 3, 2, 1).
11. How many vertices does a regular graph of degree 4 with 10 edges?
12. Find the number of edges of the following graphs and describe them: Kn , Km,n , Cn , Qn .
13. Suppose the simple graph G has e edges with the degree sequence (d1 , d2 , . . . , dn ).
(a) Find the number of edges of G in terms of n and e.
(b) Find the degree sequence of G.
14. Show that if a bipartite graph has n vertices and e edges, then e n2 /4.
Section 10.3: Matrices for Graphs and Graph Isomorphism
1. What is the sum of entries in a row (column) of the adjacency matrix A of an
undirected simple graph G? What if G is directed?(Solved in class notes)
2. What is the sum of entries in a row and column of the incidence matrix M of
an undirected simple graph G? (Solved in class notes)
3. Determine whether G and H are isomorphic. Exhibit an isomorphism or provide
a rigorous argument that none exists. (Solved in class notes)
v4

u4

v5

v3

u5

u3

v1

v2

u1

u2

4. Determine whether G and H are isomorphic. Exhibit an isomorphism or provide


a rigorous argument that none exists. (Solved in class notes)
v1

v2

v3

v4

v5

v7

v6

u1

v8

u2

u3

u4

u7

6. Find the adjacency matrix of the following graph.


v4
v5

v3

v1

v2
G
3

u6
u8

5. Find two nonisomorphic graphs with the same degree sequence.

u5

7. Find the incidence matrix of the following graph.


v4

v3

e4
e3
e1
e2
v1
v2
v5
G
8. Draw a simple graph undirected graph

0
1
A=
0
0

whose adjacency matrix is

1 0 0
0 1 0
.
1 0 1
0 1 0

9. Draw a directed graph whose adjacency matrix is

0 1 0 0
0 0 1 0

A=
0 1 0 0 .
0 0 1 0
Section 10.4: Connectivity
1. Consider the following graph (Solved in class).
a

c
e

c
e

d
G

d
H

(a) Are the graphs strongly connected? Are the graphs weakly connected?
(b) If weakly connected, find its strongly connected components.
2. Consider the following graph (Solved in class).
e

c
b
G

(a) Find vertex cuts and edge cuts of G of size at most 2.


(b) Find (G), (G) and min deg(v).
v

(c) Determine which of the following inequalities in (G) (G) min deg(v)
v
are strict?
4

3. Consider the following graph.


e

a
b

f
G

(a) Find vertex cuts and edge cuts of G of size at most 2.


(b) Find (G), (G) and min deg(v).
v

(c) Determine which of the following inequalities in (G) (G) min deg(v)
v
are strict?
4. Construct a graph G with (G) = 1, (G) = 2 and min deg(v) = 3.
v

Section 10.5: Euler and Hamilton Paths


1. Consider the following graphs.
a

e
c

d
e

d
G

c
H

(a) Do the above graphs have a Euler circuit? If so, find such a circuit. Otherwise give an argument why no such circuit exists.
(b) Do the above graphs have a Euler path? If so, find such a path. Otherwise
give an argument why no such path exists.
2. Consider the following graphs.
a

c
e

d
e

d
G

c
H

(a) Do the above graphs have a Hamilton circuit? If so, find such a circuit.
Otherwise give an argument why no such circuit exists.
(b) Do the above graphs have a Hamilton path? If so, find such a path. Otherwise give an argument why no such path exists.
Section 10.7: Planar Graphs
5

1. Draw a planar representation of K4 . Find the number of regions of a planar


representation of K4 using Eulers formula. (Solved in class)
2. Suppose that a connected planar graph G has 8 vertices each of degree 3. Into
how many regions is the plane divided by a planar representation of G? (Solved
in class)
3. Suppose that a connected planar graph G has 30 edges. If a planar representation
of G divides the plane into 20 regions, how many vertices G have?
4. Use the following facts to show that K5 and K3,3 are not planar. (Solved in
class)
If G is a connected planar simple graph with e edges and v vertices where v 3,
then (a) e 3v 6, and (b) e 2v 4 when G has no C3 .
Section 10.8: Graph Coloring
1. What is the chromatic number of a bipartite graph?
2. What is the chromatic number of a planar graph?
3. Find the chromatic number of the following graphs: Kn , Cn , Wn , Pn , Sn , Km,n .
4. Find the edge chromatic number of the following graphs: Kn , Cn , Pn .
5. The following graph G has 5 regions A, B, C, D and E representing 5 countries.
Draw G , the dual graph of G ignoring the unbounded face. What is the minimum number of colors needed to color the countries so that two countries having
a common border get different colors?

B
A

C
D
E
G

Section 11.1: Trees


1. How many edges does a tree on 100 vertices?
2. How many edges are there in a forest on n vertices that contains exactly t trees?
3. Draw a full 3-ary tree of height 3.
4. Consider the following tree T .
6

a
c

b
e

f
T
(a) Which vertex is the root?
(b) What is the level of e?
(c) Which vertices have level 3?
(d) What is the height of T ?

(e) Is T m-ary for some m? Is T full m-ary?


(f) Which vertices are internal?
(g) Which vertices are leaves?
(h) Which vertex is the parent of e?
(i) Which vertices are children of b?
Section 11.4: Spanning Trees
1. How many edges must be removed from a connected graph G with n vertices
and e edges to produce a spanning tree? (Solved in class)
2. Which connected simple graphs have exactly one spanning tree?
3. Find all the spanning trees of the following graph G.
a

G
4. Consider the following graph G. (Solved in class)
a
c

b
G

(a) Use depth-first search to produce a spanning tree T for the above graph G.
Choose a as the root of T and maintain the alphabetical order of vertices
in T .
7

(b) Use breadth-first search to produce a spanning tree T for the above graph
G. Choose a as the root of T .
5. Consider the following graph G.
a
c

b
G

Use depth-first search to produce a spanning tree T for the above graph G.
Choose a as the root of T and maintain the alphabetical order of vertices in T .
6. Consider the following graph G.
a
c

b
G

Use breadth-first search to produce a spanning tree T for the above graph G.
Choose a as the root of T .
Section 11.5: Minimum Spanning Trees
1. Consider the following graph G.
1

a
4

2
3
3
3 e 2

G
(a) Use Prims algorithm to find a minimum spanning tree of G.
(b) Use Kruskals algorithm to find a minimum spanning tree of G.
2. Consider the following graph G.
10

a
f

4
8
7
6
9
5
8
2 e 9
2
c

1
G
8

(a) Use Prims algorithm to find a minimum spanning tree of G.


(b) Use Kruskals algorithm to find a minimum spanning tree of G.

Answers
8.2
1. (a) linear, homogeneous, with constant coefficients; degree 2
(b) linear with constant coefficients but not homogeneous
(c) not linear
(d) linear, homogeneous, with constant coefficients; degree 3
(e) linear and homogeneous, but not with constant coefficients
(f) linear with constant coefficients, but not homogeneous
(g) linear, homogeneous, !
with constant coefficients;
degree 7
n
!n
1
1+ 5
1 5
1

2. (a) fn =
2
2
5
5
n
n
(b) an = 2 (2)
(c) an = 6 2n 2n 2n
(d) an = 6 2(1)n 2n
(e) an = 5 + 3(2)n 3n
(f) an = 5 2n + 2n 2n + 26n2 2n
10.1
1. G is a multigraph, H is neither a multigraph nor a simple graph, H is a simple
graph.
2. The intrsection graph G has vertex set {A1 , A2 , A3 , A4 , A5 , A5 , A6 } and edges are
{A6 , Ai }, i = 1, 2, 3, 4, 5, {A5 , Ai }, i = 1, 2, 3, 4, {A4 , Ai }, i = 1, 2, 3, , {A2 , A1 }}.
3. Easy
4. Take the subway stations as the vertices where an edge from station u to station
v if there is a train going from u to v without stopping. It is quite possible that
some segments are one-way, so we should use directed edges. (If there are no one-way
segments, then we could use undirected edges.) There would be no need for multiple
edges, unless we had two kinds of edges, maybe with different colors, to represent
local and express trains. In that case, there could be parallel edges of different colors
between the same vertices, because both a local and an express train might travel the
same segment. There would be no point in having loops, because no passenger would
want to travel from a station back to the same station without stopping.
10.2
1. (a) V (G) = {a, b, c, d, e}, E(G) = {{a, b}, {a, c}, {b, c}, {d, c}}, degree sequence
(3, 2, 2, 1, 0)
(b) For G, V (G) = {a, b, c, d, e}, E(G) = {{a, e}, {b, e}, {c, e}, {d, e}, {d, a}, {d, b}}
The induced subgraph of G on {b, c, d, e} has edge set {{b, c}, {c, d}} and similar for
other sets of 4 vertices.
2. Not bipartite. We try color all the vertices by two colors, say red and blue, so that
adjacent vertices get different colors. Suppose assign red to vertex b. Then vertices c
and f get blue. But f and c are adjacent. So we need more than 2 colors to color all the
vertices of G so that adjacent vertices get different colors. Thus G is not 2-colorable,
hence not bipartite.
3. No. By the Handshaking theorem, the number of edges = 21 the degree-sum
10

= 12 (15 5) = 37.5
4. (Use pigeonhole principle) Suppose a simple graph G has n 2 vertices. Each
vertex has degree 0, 1, . . . , n 2 or n 1. Note that a vertex has degree n-1 iff no
vertex has degree 0.
Case 1. There is no vertex of degree 0.
The possibilities of degree of n vertices are n-1 numbers 1, 2, . . . , n 1. So by pigeonhole principle there are two vertices of the same degree.
Case 2. There is a vertex of degree 0.
In this case no vertex has degree n-1. Then the possibilities of degree of n vertices are
n-1 numbers 0, 1, . . . , n 2. So by pigeonhole principle there are two vertices of the
same degree.
5. Draw by the definition of Kn , Km,n , Cn , Wn , Qn .
6. K2 , C are bipartite for all even n. Qn is bipartite for all n. Wn not bipartite for all
n.
7. |E(Kn )| = (n2 n)/2, |E(Cn )| = n, |E(Wn )| = (2n 2), |E(Km,n )| = mn and
|E(Qn )| = n2n1 .
8. (3, 3, 3, 3), (2, 2, 2, 2), (3, 3, 3, 3), (3, 3, 2, 2, 2), (3, 3, 3, 3, 3, 3, 3, 3).
9. The number of vertices = 6 and the number of edges = 21 (5 + 2 + 2 + 2 + 2 + 1) = 7.
10. (a) yes (b) no
11. the number of edges 10 = 21 (4n). So n = 5.


n
12. |E(Kn )| = 0, |E(Km,n )| = m+n

mn,
|E(C
)|
=
n and |E(Qn )| =
n
2
2

2n
n1

n2
.
2

13. (a) n2 e (b) (n 1 d1 , n 1 d2 , . . . , n 1 dn ).
14. Suppose the number of vertices of two vertex sets in a bipartite graph are x and
2
n x. So the number of edges is e = x(n x) = n4 (x n2 )2 . Thus e n2 /4.
10.3
1. If G is an undirected simple graph, then the sum of entries of row (column) i of A
is the degree of the vertex vi . If G is a directed graph, then the sum of entries of row
i of A is the out-degree of the vertex vi and the sum of entries of column i of A is the
in-degree of the vertex vi .
2. If G is an undirected simple graph, then the sum of entries of row i of M is the
degree of the vertex vi and the sum of entries of column i of M is 2 (the number of
vertices ei is incident with).
3. Consider the function f : VG VH such that f (v1 ) = u1 , f (v2 ) = u3 , f (v3 ) =
u5 , f (v4 ) = u2 and f (v5 ) = u4 . It can be checked that {vi , vj } EG if and only if
{f (vi ), f (vj )} EH . Thus G and H are isomorphic.
4. Suppose there is a graph isomorphism f : VG VH . Since deg(v1 ) = 1 and
deg(u1 ) = deg(u7 ) = deg(u8 ) = deg(u6 ) = 1, f (v1 ) is one of u1 , u6 , u7 and u8 . Note
that v1 is adjacent to v2 which has degree 2. But none of u1 , u6 , u7 and u8 is adjacent
to a degree 2 vertex. Thus G and H are not isomorphic. Note that G and H have the
same degree sequence (3, 3, 2, 2, 1, 1, 1, 1).
5. There are many. Eg. C6 and C3 C3 have the degree sequence (2, 2, 2, 2, 2, 2). The
following G and H have the same degree sequence (3, 3, 2, 2, 1, 1, 1, 1).

11

v1

v2

v3

v4

v5

v7

u1

v6

6. The adjacency matrix is A =

7. The incidence matrix is M =

1
0
1
0
0
0
1
0
0
1

1
1
0
1
0
0
1
1
0
0

u4

u5

u6
u8

G
0
1
1
0
1
1
1
0
0
0

u3

u7

v8

u2

0
0
1
0
1
0
0
1
1
0

1
0
0
1
0

8.
v1

v2

v3

v4

v3

v1

v2

v4

9.

10.4
1. (a) G is strongly connected and hence weakly connected. H is not strongly connected, but weakly connected. (b) Strongly connected component of G is G. Strongly
connected components of H are a; b and (b, c), (c, d), (b, d).
2. (a) {b}, {b, a}, {b, e}, {b, c}, {b, d} are vertex cuts of size at most 2. {{b, c}, {b, d}}, {{b, a}, {b, e}}
are edge cuts of size at most 2.
(b) (G) = 1, (G) = 2 and min deg(v) = 2.
v

(c) (G) = 1 < 2 = (G) is a strict inequality.


3. (a) {b}, {f }, {b, f }, {b, a}, {b, e}, {f, c}, {f, d} are vertex cuts of size at most 2.
{{b, f }}, {{b, f }, {b, e}}, {{b, f }, {f, c}} etc. are edge cuts of size at most 2.
(b) (G) = 1, (G) = 1 and min deg(v) = 2.
v

(c) (G) = 1 < 2 = min deg(v) is a strict inequality.


v
4. There are many answers. So find one.
10.5
1. (a) G has a Euler circuit and H has no Euler circuit, (b)G has a Euler path and
H has a Euler path.
2. (a) G has a Hamilton circuit and H has no Hamilton circuit, (b)H has a Hamilton
path and H has a Hamilton path.
10.7
1. 4.
12

b
R1

R3

R2

R4
c

d
2. 6.
3. 12.
4. See class notes.
10.8
1. 2.
2. at most 4.

(
(
2 if n is even
4 if n is even
3. (Kn ) = n, (Cn ) =
., (Wn ) =
., (Pn ) =
3 if n is odd
3 if n is odd
(Sn ) = (K(
m,n ) = 2.
(
n

1
if
n
is
even
2 if n is even 0
4. 0 (Kn ) =
. 0 (Cn ) =
. (Pn ) = 2.
n
if n is odd
3 if n is odd
5. 4.
B
C

D
E
G
11.1
1. 99.
2. n t.
3. There are many answers. So see the definition and do it.
4. (a) a, (b) 2, (c) f and g, (d) 3, (e) full 2-ary tree (f) a,b,e, (g) c,d,f,g, (h) b, (i) d,e.
11.4
1. e n + 1.
2. Trees.
a
b

e
d
h
Spanning tree of G

3.
c

e
d
h
Spanning tree of G

13

e
d
h
Spanning tree of G

e
c

f
Spanning tree T of G

f
c

6. a

e
h
b
Spanning tree T of G

e
h
b
Spanning tree T of G

d
g

f
(b) a

f
Spanning tree T of G

c
b

a
5.

e
d
h
Spanning tree of G

a
4. (a)

11.5
1. Prims and Kruskals algorithms give the same minimum spannning tree of G.
1

2
e 2
c

A minimum spanning tree T of G of weight 5


2. Prims and Kruskals algorithms give the same minimum spannning tree of G.
a
f

b
8
2 e

g
2

A minimum spanning tree T of G of weight 22

14

You might also like