Graph Theory - Solutions To Problem Set 1
Graph Theory - Solutions To Problem Set 1
1. Given a graph G with vertex set V = {v1 , . . . , vn } we define the degree sequence of G to be the list
d(v1 ), . . . , d(vn ) of degrees in decreasing order. For each of the following lists, give an example of a
graph with such a degree sequence or prove that no such graph exists:
(a) 3, 3, 2, 2, 2, 1
(b) 6, 6, 6, 4, 4, 3, 3
(c) 6, 6, 6, 4, 4, 2, 2
Solution:
(a) There is no such graph; since by problem 5, the number of odd-degree vertices in a graph is always
even.
(b) Consider the following graph:
(c) No, since otherwise we have 3 vertices of degree 6 which are adjacent to all other vertices of the
graph; so each vertex in the graph must be of degree at least 3.
2. Construct two graphs that have the same degree sequence but are not isomorphic.
Solution: Let G1 be of a cycle on 6 vertices, and let G2 be the union of two disjoint cycles on 3
vertices each. In both graphs each vertex has degree 2, but the graphs are not isomorphic, since one is
connected and the other is not.
3. A graph is k-regular if every vertex has degree k. How do 1-regular graphs look like? And 2-regular
graphs?
Solution: A 1-regular graph is just a disjoint union of edges (soon to be called a matching). A
2-regular graph is a disjoint union of cycles.
4. How many (labelled) graphs exist on a given set of n vertices? How many of them contain exactly m
edges?
Solution: Since there are n2 possible edges on n vertices, and a graph may or may not have each of
n
these edges, we get that there are 2( 2 ) possible graphs on n vertices. For the second problem, out of
n
the n2 possible edges, we want to choose m ones. So there are (m 2)
possible graphs on n vertices and
with m edges.
5. Prove that the number of odd-degree vertices in a graph is always even.
P
Solution: Let G = (V, E) be an arbitrary graph. In the lecture we have proved that v∈V d(v) = 2|E|.
Let V1 ⊆ V be the set of vertices of G which have odd degree and V2 = V \V1 be the set of vertices of
G which have even degree. We have that
X X X
d(v) = d(v) + d(v) = 2|E|.
v∈V v∈V1 v∈V2
P
Since all the vertices in V2 have even degree, and 2|E| is even, we obtain that v∈V1 d(v) is even. But
since V1 is the set of vertices of odd degree, we obtain that the cardinality of V1 is even (that is, there
are an even number of vertices of odd degree), which completes the proof.
6. Let G be a graph with minimum degree δ > 1. Prove that G contains a cycle of length at least δ + 1.
Solution: First, let’s recall how we proceeded in the lecture to find a path of length at least δ:
Let v1 · · · vk be a maximal path in G, i.e., a path that cannot be extended. Then any neighbor of v1
must be on the path, since otherwise we could extend it. Since v1 has at least δ(G) neighbors, the set
{v2 , . . . , vk } must contain at least δ(G) elements. Hence k ≥ δ(G) + 1, so the path has length at least
δ(G).
Now in order to find a cycle of length at least δ + 1, we continue the proof above. The neighbor of v1
that is furthest along the path must be vi with i ≥ δ(G) + 1. Then v1 · · · vi v1 is a cycle of length at
least δ(G) + 1.
7. Show that every graph on at least two vertices contains two vertices of equal degree.
Solution: Suppose that the n vertices all have different degrees, and look at the set of degrees. Since
the degree of a vertex is at most n − 1, the set of degrees must be
{0, 1, 2, . . . , n − 2, n − 1}.
But that’s not possible, because the vertex with degree n − 1 would have to be adjacent to all other
vertices, whereas the one with degree 0 is not adjacent to any vertex.
8. Prove that at a meeting of at least 6 people, there are always 3 that mutually know each other, or 3
that mutually do not know each other.
Hint: start by proving the following statement. If G is a graph on at least 6 vertices, then either G or
its complement has a vertex of degree at least 3.
The complement of a graph G = (V, E), denoted GC , is the graph with set of vertices V and set of
edges E C = {uv | uv 6∈ E}.
Solution: Let G = (V, E) be a graph on at least 6 vertices and v a vertex of G of maximum degree
∆. If ∆ ≥ 3, then v is the vertex we are looking for. On the other hand, if ∆ < 3 then v has degree
at least 3 in GC .
Now consider any edge uv of G to represent person u knows person v. Without loss of generality,
consider the case where G has a vertex v of degree 3. Look at the neighbors v1 , v2 , v3 of v: if any two
of them are connected, we get a triangle vv1 v2 and thus 3 people know each other. If not, we get the
triangle v1 v2 v3 in GC and thus 3 people do not know each other.
9. What is the maximum number of edges in a bipartite graph on n vertices? (Prove your answer.)
Solution: Let G = (A ∪ B, E) be a bipartite graph, with A, B disjoint and |A| + |B| = n. Since
all the edges of G have one endpoint in A and the other in B, the number of edges |E| of G cannot
exceed the number of pairs (a, b) ∈ A × B, so |E| ≤ |A| · |B| = |A|(n − |A|). Intuitively, such a product
is maximized when the two factors are equal, so when |A| = bn/2c. More formally, we can use the
inequality 4xy ≤ (x + y)2 to get
2
(|A| + n − |A|) n2
|E| ≤ |A|(n − |A|) ≤ = .
4 4
Therefore, the number of edges of a bipartite graph on n edges is at most n2 /4.
Note that n2 /4 is exactly the maximum when n is even, because then it is attained by the complete
2
bipartite graph Kn/2,n/2 . When n is odd, the maximum is actually b n2 c · d n2 e = n 4−1 , which is attained
by Kbn/2c,dn/2e .