Docsity

Applied Combinatorics Practice Test 2, Exams of Combinatorics

Toggle sidebar
bg1
Math 3134: Applied Combinatorics
Practice Test 2
Note: There are intentionally more problems on this practice test than there will be on the actual test. All graphs
are simple (that is, no edge loops from a single vertex back to itself), unless specified.
Linear Recurrence Relations
1. Let anrepresent the number of n-bit binary strings with even parity (that is, the bits add up to an even
number. The string 01011100 has even parity since 0 +1+0+1+1+1+0+0=4 and 4 is even.)
Set up a recurrence relation and initial conditions for the sequence {an}.
Solution: The initial conditions are a1=1 (only 0has even parity) and a2=2 (either 00 or 11.)
The recurrence relation is an=2an−2+2(2n−2−an−2). (This can be simplified.)
There are 2n−2total strings of length n−2, of which an−2have even parity. To those strings, we can append
either 00 or 11 and the string will still have even parity (2an−2). To the remaining strings, which have odd
parity, we can append either 01 or 10 and the string will then have even parity (2(2n−2−an−2)).
2. Solve the recurrence relation an=5an−1−6an−2with initial conditions a0=3, a1=7.
Solution: The characteristic polynomial is r2−5r+6, which has roots r=2 and r=3, so the general
solution is an=c12n+c23n.
Applying the initial conditions, we get:
c1+c2=3
2c1+3c2=7
and solving this system yields c1=2, c2=1, so the solution to this particular recurrence relation is
an=2n+1+3n.
3. Solve the recurrence relation an=4an−2with initial conditions a0=4, a2=0.
Solution: The characteristic polynomial is r2−4, which has roots r=2 and r=−2, so the general solution
is an=c12n+c2(−2)n.
Applying the initial conditions, we get:
c1+c2=4
4c1+4c2=0
and solving this system yields no solution, so this recurrence relation cannot be solved.
A reason there is no solution is that the requirement that an=4an−2contradicts the other requirement that
a0=4 and a2=0.
Graph Theory: Basic Terminology
4. Give an example of each of the following, or state that no such example exists.
(a) A complete graph with five vertices.
Solution:
(b) A tree with the same number of vertices and edges.
Solution: No such example exists.
pf3
pf4
pf5

Partial preview of the text

Download Applied Combinatorics Practice Test 2 and more Exams Combinatorics in PDF only on Docsity!

Math 3134: Applied Combinatorics

Practice Test 2

Note: There are intentionally more problems on this practice test than there will be on the actual test. All graphs are simple (that is, no edge loops from a single vertex back to itself), unless specified.

Linear Recurrence Relations

  1. Let an represent the number of n-bit binary strings with even parity (that is, the bits add up to an even number. The string 01011100 has even parity since 0 + 1 + 0 + 1 + 1 + 1 + 0 + 0 = 4 and 4 is even.) Set up a recurrence relation and initial conditions for the sequence {an}. Solution: The initial conditions are a 1 = 1 (only 0 has even parity) and a 2 = 2 (either 00 or 11 .) The recurrence relation is an = 2 an− 2 + 2(2n−^2 − an− 2 ). (This can be simplified.) There are 2n−^2 total strings of length n − 2, of which an− 2 have even parity. To those strings, we can append either 00 or 11 and the string will still have even parity (2an− 2 ). To the remaining strings, which have odd parity, we can append either 01 or 10 and the string will then have even parity (2(2n−^2 − an− 2 )).
  2. Solve the recurrence relation an = 5 an− 1 − 6 an− 2 with initial conditions a 0 = 3, a 1 = 7. Solution: The characteristic polynomial is r^2 − 5 r + 6, which has roots r = 2 and r = 3, so the general solution is an = c 12 n^ + c 23 n. Applying the initial conditions, we get:

c 1 + c 2 = 3 2 c 1 + 3 c 2 = 7

and solving this system yields c 1 = 2, c 2 = 1, so the solution to this particular recurrence relation is an = 2 n+^1 + 3 n.

  1. Solve the recurrence relation an = 4 an− 2 with initial conditions a 0 = 4, a 2 = 0. Solution: The characteristic polynomial is r^2 − 4, which has roots r = 2 and r = −2, so the general solution is an = c 12 n^ + c 2 (−2)n. Applying the initial conditions, we get:

c 1 + c 2 = 4 4 c 1 + 4 c 2 = 0

and solving this system yields no solution, so this recurrence relation cannot be solved. A reason there is no solution is that the requirement that an = 4 an− 2 contradicts the other requirement that a 0 = 4 and a 2 = 0.

Graph Theory: Basic Terminology

  1. Give an example of each of the following, or state that no such example exists.

(a) A complete graph with five vertices. Solution:

(b) A tree with the same number of vertices and edges. Solution: No such example exists.

(c) A graph with two cycles which share an edge in common. Solution:

  1. You wish to prove the theorem “Let G be a graph with n vertices. Then the number of edges in G is less than n^2 .” using mathematical induction on n ≥ 1.

(a) State the base step. Solution: Prove that if G is a graph with one vertex, then the number of edges in G is less than 1. (b) State the induction step. Solution: Assume that if G is a graph with k vertices, then the number of edges in G is less than k^2 , and prove that if G is a graph with k + 1 vertices, then the number of edges in G is less than (k + 1)^2.

You do not have to prove either part.

  1. G is a graph with 7 vertices, each of which has degree 5. Prove that G cannot exist. Solution: The total degree of G is 35, which is an odd number, and therefore violates Euler’s Handshaking Lemma.
  2. Let G be a graph with 12 vertices and 10 edges. Prove that G is not connected. Solution: Proof by contradiction: Assume G is connected. Then G contains a spanning tree T. Since T contains all 12 vertices, T contains 11 edges, which means T cannot be a subgraph of G. This is a contradiction, so G must not have a spanning tree, which means G is not connected.
  3. Let G be a tree with 9 vertices. What is the maximum number of edges in G? Solution: By a previous homework problem, since G is a tree, there are eight edges.
  4. (a) Construct the graph whose adjacency matrix is

Solution: v 1 v 2

v 4 v 3

(b) A vertex v in a connected graph G is called a cut vertex if G − v is no longer connected. Does the graph you have constructed have any cut vertices? If so, which ones? Solution: Vertex v 4 is the only cut vertex.

Isomorphism Proofs:

Given the following pairs of graphs, determine whether they are isomorphic or not and justify your answer with a proof.

d e^ f

a b c

s (^) t u

p q (^) r

Solution: These graphs are not isomorphic.

Case 1: Suppose W does not contain the edge e. Then W is a walk from x to y in G − e. Case 2: Suppose W contains the vertices a and b consecutively in that order. Then we can replace the sequence {a, b} with the sequence {a, v 1 , v 2 ,... , vn, b} in W and this is a walk in G − e from x to y. (Note that that this is a walk but not necessarily a path, because the replacement sequence might cause us to repeat vertices which weren’t repeated before.) Case 3: Suppose W contains the vertices b and a consecutively in that order. Then we can replace the sequence {b, a} with the sequence {b, vn, vn− 1 ,... , v 1 , a} in W and this is a walk in G − e from x to y. In all three cases, we were able to find a walk from x to y in G − e. Since x and y were arbitrarily chosen, G − e is connected.

  1. Let G be a graph with vertices {v 1 , v 2 , v 3 ,... , vk} Prove that the statement “vi and vj have the same degree” is an equivalence relation on the set of vertices. Solution:

(a) Reflexive: Let u be a vertex in G. Then u and u have the same degree, because no vertex can have more than a single value for its degree. (b) Symmetric: Let u and v be vertices in G. Assume that u and v have the same degree; call it n. Then deg v = n = deg u, so v and u have the same degree. (c) Transitive: Let u, v and w be vertices in G. Assume that u and v have the same degree (call it n) and also that v and w have the same degree. Since deg v = n, and v and w have the same degree, deg w = n. Since deg u = n = deg w, u and w have the same degree.

Algorithms:

  1. Construct the Prufer sequence for the tree shown here:

Solution: { 4 , 6 , 4 , 1 , 2 , 4 , 6 }

  1. Consider the weighted graph W shown here:

(a) Use Kruskal’s Algorithm to construct a minimum-weight spanning tree for W. Solution: You must choose the edges with these weights (in order): 1, 2, 3, 4, 5, 7. (b) Use Prim’s Algorithm to construct a minimum-weight spanning tree for W. Solution: The order of the edges in your answer will depend on the vertex where you started, but your final answer will contain these edges in some order: 1, 2, 3, 4, 5, 7.

  1. Given the network shown here:

D G

A

C F

H

B F

use the Ford-Fulkerson algorithm to find a maximal flow. Additional copies of the network are shown below so that you can indicate the results of successive passes through the algorithm Solution: Three passes are needed. Backflow is used during the third pass along the wavy edge. The maximum flow is 6. (There are other possible solutions, each with a maximum flow of 6.)

D G

A

C F

H

B F

Pass 1

D G

A

C F

H

B F

Pass 2 D G

A

C F

H

B F

Euler Trails

Reminder: An Euler trail in a connected graph G is a walk which contains every edge; an Euler tour contains every edge and returns to its starting point.

a (^) b c

d e^ f

Solution: Let G be the above graph. G − c is planar:

a

b

d e^ f

In order for G to be planar, vertex c cannot be placed in the face adbe, since edge c f could not be drawn without crossing an edge. Vertex c cannot be placed in face aeb f , since edge cd could not be drawn without crossing an edge. And vertex c cannot be placed in the exterior face, since ce cannot be drawn without crossing an edge. Therefore, there is no acceptable placement for vertex c.