Sei sulla pagina 1di 3

Graph Theory: Problem set 1 (solutions)

March 1, 2010
1. a) What is the maximum number of edges a (simple) graph on n vertices can have ?
This number corresponds to the number of ways, in which we can choose 2 elements

from an n element set, if we do not care about the order of the elements, i.e. n2 .
b) What is the maximum number of edges a bipartite graph on n vertices can have ?
If we fix a partition of our vertex set into two sets one of them having n1 elements
and the other n n1 elements, we can have n1 (n n1 ) edges. By maximizing the
above expression we get 41 n2 , if n is even, and 14 (n2 1), if n is odd.
c) Show that every tree is bipartite.
In the trivial case, when our tree consists of one vertex the claim is true.
For the inductive step we can assume that a tree on n1 vertices is bipartite (inductive
hypothesis), and that each tree on n vertices can be constructed by adding a leaf to
a tree on n 1 vertices. Moreover, given a partition of the vertex set of the smaller
tree on n 1 vertices into two parts V1 and V2 witnessing its bipartiteness, we can
extend one part, w.l.o.g. V1 , by adding a leaf v to V1 , such that the only neighbor of
v does not belong to V1 .
2. Prove that a tree on n vertices contains n 1 edges.
In the trivial case, when our tree consists of one vertex the claim is true. For the inductive
case we can assume that any tree T 0 on n 1 vertices contains n 2 edges, and that each
tree T on n vertices can be constructed by adding a leaf to a tree on n 1 vertices. Let
T 0 be such a tree. Thus, the number of edges in T is n 2 + 1 = n 1.
3. Show that the number of leaves in a tree T can be bounded from below by the maximum
degree of T .
Let u denote a maximum degree vertex in T . For each neighbor v of u a maximal path
uvP wz starting with the edge uv ends in a leaf. Note that it might happen that z = v
and w = u, in this case P = wz, or that v = w, and in this case P = uwz.
1

Indeed, otherwise z has a neighbor t, which is not the previous vertex on P . However,
t has to belong to P , because otherwise we can extend P , and that is impossible by the
maximality of P . Thus, t gives rise to a cycle, and that is impossible too.
Moreover, for two different neighbors v1 and v2 of u these leaves must differ, since otherwise we would have a cycle.
Indeed, if we have uv1 P1 w and uv2 P2 w, we also have a walk uv1 . . . w . . . v2 u, that contains
a cycle.
Thus, we have at least as many leaves in T , as deg(u).
4. Prove that a graph is bipartite if and only if it does not contain an odd cycle.
Clearly, we can treat connected components of a graph separately.
If a graph is bipartite the vertices on any cycle must alternate between two vertex classes.
Therefore any cycle has to be of an even length.
On the other hand, if our graph does not contain an odd cycle one can pick any vertex v,
and put into the set V1 all vertices having an even distance from v together with v, and
put the rest of the vertices from the same connected component into the set V2 . V1 and
V2 form the desired partition.
Otherwise there is an edge e = wu joining two vertices of, lets say, V1 . We have two
paths vP1 u and vP2 wu, having odd and even number of edges, respectively. Hence,
|E(P1 )| + |E(P2 )| 1( mod 2). Thus, the symmetric difference |E(P1 ) 5 E(P2 )| 1(
mod 2). E(P1 ) 5 E(P2 ) is the union of edge disjoint cycles. Indeed, every vertex in the
subgraph G of our graph with the edge-set E(P1 ) 5 E(P2 ) has a degree either 2, or 4.
Hence, we have an odd cycle in our graph (contradiction).
5. By sub-diving an edge uv E of a graph G = G(V, E) we understand replacing the edge
uv with two edges uw and vw where w is a new vertex not contained in V . Thus, more
formally the subdivision of an edge in G is an operation which transforms G into a graph
G0 = G0 (V {w}, (E \ {uv}) {uw, vw}).
We call a graph G00 a subdivision of G if we can obtain G00 by series of edge subdivisions
in G. Prove the following.
Every graph has a subdivision which is bipartite.
Let G denote a graph. We construct a subdivision of G as follows. We subdivide every
edge in G by one vertex. Clearly, the resulting graph G0 is bipartite, because any edge in
G0 joins a vertex that belongs to G with a vertex that does not belong to G.
6. Let M be a matching in a bipartite graph G. Show that if M contains fewer edges than
some other matching in G, then G contains an augmenting path with respect to M .

Let M 0 be a matching containing more edges than M . Consider the graph G0 on the same
vertex set as G whose edges are precisely M1 5M2 = (M1 M2 )\(M1 M2 ). Observe that
every vertex of G0 has degree either 0, 1 or 2. Thus, G0 consists of connected components
each of which is either cycle or path. Moreover, on each such path or cycle edges alternate
between M and M 0 . Since M 0 > M , there must be an odd path P whose first and last
edge belongs to M 0 . P is an augmenting path.
7. 1 There are 6 people at a bus stop. Show that among them there are three people such
that either any two of them know each other, or any two of them do not know each other.
Fix one person p. There are either three people p1 , p2 , p3 that know p, or three people
that do not. Since both cases are symetric we consider only the former. If p1 , p2 and p3
completely do not know each other we are done. Otherwise, there is a pair among them
that knows each other, which gives us together with p a triple of people knowing each
other.

extra credit

Potrebbero piacerti anche