You are on page 1of 5

Graph theory - solutions to problem set 1

Exercises

1. (a) Is Cn a subgraph of Kn ?
(b) For what values of n and m is Kn,n a subgraph of Km ?
(c) For what n is Cn a subgraph of Kn,n ?
Solution:
(a) Yes! (you can check it by the definition of the subgraph given in the lecture, or just simply by
the fact that Kn has all the possible edges a graph on n vertices can have.)
(b) We must have m = |V (Km )| ≥ |V (Kn,n )| = 2n. On the other hand, by a similar reasoning as
part (a), we get that the statement holds for all m, n with m ≥ 2n.
(c) First, note that a bipartite graph cannot have any cycle of odd length, so n cannot be odd. For
even n, one can check that Kn,n has a cycle of length n.

2. 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

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:

3. 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.
4. A graph is k-regular if every vertex has degree k. Describe all 1-regular graphs and all 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.
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. 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.

Problems

7. Do graphs with the following degree sequences exist:


(a) 6, 6, 6, 4, 4, 2, 2
(b) 6, 6, 6, 6, 5, 4, 2, 1?
Solution:
(a) 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.
(b) No! Note that each vertex of the degree 6 is adjacent to all but one other vertices. In particular,
each such vertex is adjacent to at least one of v1 and v2 (where d(v1 ) = 1 and d(v2 ) = 2). But
that would mean at least four edges touching v1 or v2 , contradicting d(v1 ) + d(v2 ) = 3 < 4.
8. 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.
9. How many (labelled) graphs on the vertex set {1, . . . , n} are isomorphic to Pn ? How many are isomor-
phic to Cn ?
Solution: Consider the problem for Pn . Note that each such a graph is of the form σ(1)σ(2) . . . σ(n)
for some permutation σ of {1, 2, . . . , n}. On the other hand, the graphs formed by σ(1)σ(2) . . . σ(n) and
σ(n)σ(n − 1) . . . σ(1) are just the same. (Check the figure for n = 5) Since there are n! permutations
in total, we get n!/2 distinct labeled graphs which are isomorphic to Pn .

2
Figure 1: these two graphs are the same

Figure 2: these 8 graphs are all the same

For Cn , the following forms all give the same graph for a fixed permutation σ: (Check the figure for
n = 4)

σ(1)σ(2) . . . σ(n)σ(1), σ(2)σ(3) . . . σ(1)σ(2), . . . , σ(n)σ(1) . . . σ(n − 1)σ(n),


σ(n)σ(n − 1) . . . σ(1)σ(n), σ(1)σ(n) . . . σ(2)σ(1), . . . , σ(n − 1)σ(n − 2) . . . σ(n)σ(n − 1),

n! (n−1)!
So we get 2n = 2 distinct labeled graphs which are isomorphic to Cn .
10. 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.
11. For every n ≥ 6, find a graph on n vertices, and n + 2 edges that contains exactly 6 cycles.
Solution

12. 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

3
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 .
13. (a) Let G be a graph containing a cycle C, and assume that G contains a path √ of length at least k
between two vertices of C. Show that G contains a cycle of length at least k.
√ √
(b) Prove the same statement with 2k instead of k.
Solution:
(a) The condition is a bit cryptic; another way of putting it is that there are two vertices v1 , vm , with
two disjoint paths between them, and a third path of length k. If the third path was disjoint from
the other two, we would obviously have a cycle of length ≥ k, but when the paths intersect there
is trouble. We can picture the resulting subgraph like this (leaving out degree-2 vertices along
the paths, so edges here are actually longer paths):

v2 vm−1

v1 vm

vn vm+1

Note that one possibility not reflected in this picture is that the middle path might have edges in
common with one of the other paths.
Let C = v1 v2 · · · vn v1 be the original cycle, so its length is n. We can partition the middle path
into “chords” H1 , . . . , Hp , where Hi is a path vi · · · vj that only intersects C in vi and vj . Let `i
be the length of Hi . If the middle path has an edge in common with one of the other paths, we
simply take that edge as an Hi (technically not a chord, but it has the same properties that we
need in the rest of the proof).
Observe that each chord Hi , combined with part of C, gives a cycle of length ≥ `i . Also, we have
p ≤ n, since each chord has a unique first point on C (in an arbitrary direction along the path
from v1 to vm ).
√ √
We can assume that n < k, since otherwise we’d be done. Then suppose that `i < k for all i.
That would mean that
X √ √ √ √
k= `i ≤ p · k ≤ n · k < k · k = k,

which is a contradiction.
√ Therefore some `i ≥ k, so that Hi together with part of C gives a
cycle of length ≥ k.
(b) First of all, each chord Hi cuts C in two, and the larger part has dn/2e ≥ n/2 edges, so in fact
we get a cycle with ≥ `i + n/2 edges.
The average length of a chord Hi is kp > nk . Since they can’t all be smaller than the average, some
Hi must have length `i ≥ nk . Then the cycle we get from it has length ≥ nk + n2 . Let’s optimize the

function f (x) = xk + x2 using calculus: f 0 (x) = −k 1
x2 + 2 , so the only positive extremum is x = 2k,

4

which is a minimum. So of all the n, we get the smallest cycle for n = 2k, and then the length
√ √ √
of that cycle is still ≥ √k2k + 22k = 2k. Hence we are guaranteed to have a cycle of length 2k.

You might also like