Problem Set 4 Solutions
Problem Set 4 Solutions
Problem Set 4 Solutions
Problem 2. [20 points] Let G = (V, E) be a graph. Recall that the degree of a vertex
v ∈ V , denoted dv , is the number of vertices w such that there is an edge between v and
w.
and also as X X
|S| = |{e : (e, v) ∈ S}| = dv .
v∈V v∈V
(b) [5 pts] At a 6.042 ice cream study session (where the ice cream is plentiful and it helps
you study too) 111 students showed up. During the session, some students shook hands with
each other (everybody being happy and content with the ice-cream and all). Turns out that
the University of Chicago did another spectacular study here, and counted that each student
shook hands with exactly 17 other students. Can you debunk this too?
Solution. Assume that the study is accurate. Define a graph G = (V, E) with students as
vertices and put an edge P
between 2 students if they shook hands. By the previous problem,
we should have 2|E| = v dv = 111 · 17. But the LHS is even and the RHS is odd, a
contradiction.
(c) [5 pts] And on a more dull note, how many edges does Kn , the complete graph on n
vertices, have?
P the first part of the problem. Notice that each vertex is joined to n − 1
Solution. Apply
others. 2|E| = v dv = n(n − 1). So |E| = n(n − 1)/2.
Problem 3. [15 points] Two graphs are isomorphic if they are the same up to a relabeling
of their vertices (see Definition 5.1.3 in the book). A property of a graph is said to be
preserved under isomorphism if whenever G has that property, every graph isomorphic to G
also has that property. For example, the property of having five vertices is preserved under
isomorphism: if G has five vertices then every graph isomorphic to G also has five vertices.
(a) [5 pts] Some properties of a simple graph, G, are described below. Which of these
properties is preserved under isomorphism?
So, for example, let G1 be a graph with a single vertex, 1, and G2 be a graph with
a single vertex, 2. Obviously the two graphs are isomorphic, but G2 does not have
vertices which are even integers.
3. It is invariant under isomorphism.
Let G1 , G2 be simple graphs and f : V1 → V2 be an isomorphism between them. Suppose
v ∈ V1 has degree 3; we want to show that there is a vertex of degree 3 in V2 . In fact,
we’ll show that f (v) has degree 3.
Since v has degree 3, there are exactly 3 vertices adjacent to v; say these are v1 , v2 , v3 .
Since f is a bijection, f (v1 ), f (v2 ) and f (v3 ) are all distinct. Since there is an edge
between v and vi in G1 , the definition of isomrphism implies that there is an edge
between f (v) and f (vi ) for i = 1, 2, 3, so the degree of f (v) is at least 3.
We now prove by contradiction that the degree of f (v) is at most 3. Suppose f (v) had
degree > 3. This means there is a vertex w ∈ V2 which is not equal to f (v1 ), f (v2 ),
or f (v3 ), but is also adjacent to f (v). Since, f is a bijection, there is a vertex v4 ∈ V1
such that f (v4 ) = w and v4 6= vi for i = 1, 2, 3. Since w = f (v4 ) is adjacent to f (v),
the definition of isomorphism implies that v4 is adjacent to v, contradicting the fact the
v1 , v2 , v3 were exactly the vertices adjacent to v.
4. It is invariant under isomorphism.
Prove by contradiction: Suppose a graph G1 has exactly one vertex of degree 3 while
another graph G2 does not have exactly one vertex of degree 3. Suppose the two graphs
are isomorphic. If G2 does not have a vertex of degree 3, then from part (c), there is a
contradiction. If G2 has more than one vertices of degree 3, then there must be at least
one vertex in G2 of degree 3 which is mapped to a vertex of degree 6= 3 in G1 . Since two
vertices of different degrees are mapped from G1 to G2 , using the same argument from
part (c), it reaches a contradiction. Therefore, if G1 has exactly one vertex of degree 3,
then G2 must also have exactly one vertex of degree 3.
(b) [10 pts] Determine which among the four graphs pictured in the Figures are isomorphic.
If two of these graphs are isomorphic, describe an isomorphism between them. If they are not,
give a property that is preserved under isomorphism such that one graph has the property,
but the other does not. For at least one of the properties you choose, prove that it is indeed
preserved under isomorphism (you only need prove one of them).
Problem Set 4 5
1 1
6 6
5 8 9 2 5 9 7 2
10 7 10 8
4 3 4 3
(a) G1 (b) G2
1 1
9 2
6
5 9 7 2
8 3
10
10 8
7 4
6 5 4 3
(c) G3 (d) G4
G1 and G4 are not isomorphic to G2 : G2 has a vertex of degree four and neither G1 nor G4
has one.
G1 and G4 are not isomorphic: G4 has a simple cycle of length four and G1 does not.
(b) [10 pts] Consider the following proof of the False Claim:
Solution. “So Gn satisfies the conditions of the induction hypothesis P (n).” The flaw
is that if v has degree 0, then removing v will not reduce the degree of any vertex, and
so there may not be any vertex of degree less than k in Gn , as in the counterexample of
part (a).
Problem 5. [15 points] Prove or disprove the following claim: for some n ≥ 3 (n boys
and n girls, for a total of 2n people), there exists a set of boys’ and girls’ preferences such
that every dating arrangement is stable.
Proof. We will use letters to denote girls and numbers to denoted boys.
There must be some girl A rated worst by at most n − 2 boys. The reason is as follows.
Each boy can rate exactly one girl worst. If each of the n girls was rated worst by at least
n − 1 boys, then there would have to be at least n(n − 1) boys in all. But this is false when
n ≥ 3, because then n(n − 1) exceeds n, the actual number of boys.
Suppose that this girl A is paired with the boy, 1, that she rates worst. Since at most
n − 2 boys rate girl A worst, there is some other boy, 2, that rates a different girl, B, worst.
Suppose that boy 2 is paired with girl B.
Problem Set 4 7
Now girl A and boy 2 form a rogue couple. Girl A prefers every other boy to her date, 1.
Similarly, boy 2 prefers every other girl to his date B. Therefore, A and 2 prefer one another
to their current dates.
Problem 6. [20 points]
Let (s1 , s2 , ..., sn ) be an arbitrarily distributed sequence of the number 1, 2, ..., n − 1, n. For
instance, for n = 5, one arbitrary sequence could be (5, 3, 4, 2, 1).
Define the graph G=(V,E) as follows:
1. V = {v1 , v2 , ..., vn }
2. e = (vi , vj ) ∈ E if either:
(a) j = i + 1, for 1 ≤ i ≤ n − 1
(b) i = sk , and j = sk+1 for 1 ≤ k ≤ n − 1
(a) [10 pts] Prove that this graph is 4-colorable for any (s1 , s2 , . . . , sn ).
Hint: First show that a line graph is 2-colorable. Note that a line graph is defined as follows:
The n-node graph containing n − 1 edges in sequence is known as the line graph Ln .
Solution. First we argue that any line graph is 2-colorable. Consider the line graph Ln
with vertices v1 , v2 , v3 , . . . , vn . Suppose we have two colors A and B. Then color all odd
numbered vertices with color A and all even numbered vertices with color B. Since each
odd vertex is adjacent only to even vertices, and vice versa, this is a valid 2-coloring.
Consider G. G is composed of two—possibly overlapping—line graphs: one line graph
contains the vertices of G in order, while the other line graph of the vertices of G in the
order of our sequence (s1 , . . . , sn ). Pick one of these two graphs to color first using colors
A and B. This will be a temporary coloring. Now color the second line graph with colors
C and D, noting that these are temporary colors as well. Now each vertex will be assigned
two colors, one from the first line graph and one from the second line graph (since both
line graphs contain all vertices). Define four new colors, AC, AD, BC, BD. Color the graph
with AC if one temporary color is A and the other temporary color is C. Color the graph
with AD if one temporary color is A and the other is D. Do the same with colors BC and
BD.
We note that our original temporary colors represent adjacencies in the graph. That is we
note that each vertex has at most 4 adjacent nodes (two from each line graph). If the first
color is A then two of the adjacenct vertices will be colored B, and vice versa. If the second
color is C, then the other two adjacenct vertices will be colored D, and vice versa. So if a
graph has a specific color, such as AC, then it is adjacent only to vertices of color B and
D. Since we color those vertices differently (with one of AB, BC, or BD), then our coloring
does not color two adjacent vertices with the same color.
8 Problem Set 4
Solution. Color all odd vertices with first color. Now color all the even vertices with
a second color. Note that by problem definition odd vertices are only adjacent to even
vertices and vice versa, hence this is a valid 2-coloring.