Try   HackMD

Math 55 Graph Theory Practice Solutions

  1. Prove that every simple graph with
    n
    vertices and
    k
    edges has at least
    nk
    connected components (hint: induction on
    k
    ).

Proof 1. We proceed by induction. Fix

n1 and let
P(k)
be the statement that every
simple graph with
n
vertices and
k
edges has at least
nk
connected
components. We will show that
P(k)
is true for all
k0
.

Basis Step:

P(0) says that a graph with no edges has at least
n
connected components, and this is true since each vertex is its own connected component.

Inductive Step: Assume

P(k) is true. Let
G
be a graph with
n
vertices and
k+1
edges. Let
e=uv
be an arbitrary edge of
G
, and let
G=Ge
be the graph obtained by deleting
e
. Let
G1,,G
be the connected components of
G
and note that
nk
by the inductive hypothesis. Notice that if
u
and
v
are in the same connected component of
G
, then adding it does not change the connected
components, so in this case
G
also has
connected components.
On the other hand if
uGi
and
vGj
for some
ij

then
GiGj
is a connected component of
G
, since there is a path from
every
xGi
and
yGj
by concatenating a path from
x
to
u
, the
edge
uv
, and a path from
v
to
y
. The other connected components of
G

remain connected components in
G
. Thus, the number of connected components
decreases by at most one upon adding
e
, so the number of connected components in
G
is at least
1=nk1=n(k+1)
, as desired.

Proof 2. By contradiction. Assume

G is a simple graph with
n
vertices and
k
edges. Assume
G
has at most
nk1
connected components. Let the connected components be
G1,,Gm
, and suppose they have
n1,n2,,nm
vertices, where
n=n1+n2++nm
Each connected component must contain a spanning tree, and these trees have
n11,n21,,nm1
edges. Since these sets of edges are disjoint, the total number of edges in
G
is at least
(n11)+(n21)+(nm1)=(n1+n2++nm)m

=nmn(nk1)=k+1,

since
mnk1
, which is a contradiction.

  1. Let

    p3 be a prime. Consider the graph
    G=(V,E)
    with
    V={0,1,2,,(p1)}
    and
    E={{x,y}:xy2(modp)xy2(modp)}

    Show that
    G
    is connected. Does
    G
    have an Euler circuit? Prove your answer.
    Solution. (i) Let
    x,y
    be two vertices of
    G
    . Let
    m=xy
    . We will show that there is an integer
    k
    such that
    m2k(modp)
    , which will imply that
    x,x+2,x+4,,x+2k=y
    is a path in
    G
    between
    x
    and
    y
    if
    k0
    and otherwise
    x,x2,x4,,x+2k
    is a path in
    G
    between
    x
    and
    y
    if
    k<0
    . To see that such a
    k
    exists, observe that
    2
    and
    p
    are relatively prime since
    p3
    . Thus
    2
    has an inverse modulo
    p
    , and any
    k
    satisfying
    k21m(modp)
    is sufficient. (ii) Let
    xV
    . Observe that
    xy
    is an edge if
    xy2(modp)
    or
    xy2(modp)
    . Each of these equations has a unique solution in
    V
    , so the degree of every vertex is
    2
    . By Euler's theorem, this means that
    G
    has an Eulerian circuit.

  2. Let

    n1 be an integer and let
    kn/2
    . Consider the graph
    G=(V,E)
    with
    V={S{1,2,,n}:|S|=k}
    and
    E={{S,T}:|(ST)(TS)|=1}.

    What are the degrees of the vertices in
    G
    ? Is
    G
    connected? For which values of
    n
    and
    k
    does
    G
    have an Eulerian circuit? For which values of
    n
    and
    k
    is
    G
    2
    colorable? Prove your answers.
    Solution. As stated, this question has a pretty boring answer: notice that for any subset
    S[n]
    of size
    k
    and any other subset
    TS
    , we must have
    |(ST)(TS)|2
    since
    S
    must contain an element not in
    T
    and
    T
    must contain an element not in
    S
    (as they are the same size). Thus, the edge set of this graph is empty, and the graph is simply the empty graph. The degrees are zero. The graph is not connected. The graph does not have an Eulerian circuit for any value of
    k
    . The graph is
    2
    colorable for every value of
    k
    .

  3. A much more interesting version of the previous question is to consider the graph with edges

    E={{S,T}:|(ST)(TS)|=2}.

Solution. In this case: the degrees are

k(nk) since for any vertex
S
there are
k
choices of elements of
S
to delete and
(nk)
choices of vertices outside
S
to replace it with to obtain a neighbor
T
. The graph is connected for all
kn/2
, since we can construct a path between any distinct
S
and
T
by beginning with
S
and deleting one element of
ST
and adding one element of
TS
at a time (corresponding to traversing a single edge). The graph has an Eulerian circuit iff the degree
k(nk)
is even.

To determine whether the graph is

2colorable, we will determine whether it has an odd circuit. It turns out that if
n3
then this graph always contains a triangle: if
k=1
the vertices
{1},{2},{3}
form a triangle, and if
k>1
then by choosing any set
A
satisfying
|A|=k1
and
A{1,2,3}=
we obtain a triangle
{1}A,{2}A,{3}A
(such a set
A
exists since
n2k(k1)+3
when
k2
). Thus, when
n3
the graph is not
2
colorable since it contains an odd circuit. The only remaining possibility is that
n=2
, in which case
k=1
and the graph consists of a single edge, which is
2
colorable.