EECS 310, Fall 2011
Instructor: Nicole Immorlica
Problem Set #5
Due: October 27, 2011
1. (25 points) Let (
s
1
,s
2
,...,s
n
) be an arbitrarily distributed sequence of the numbers
1
,
2
,...,n

1
,n
(i.e., a permutation). For instance, for
n
= 5, one arbitrary sequence
could be (5
,
3
,
4
,
2
,
1). Deﬁne the graph
G
= (
V,E
) as follows:
1.
V
=
{
v
1
,v
2
,...,v
n
}
2.
{
v
i
,v
j
} ∈
E
if either:
•
j
=
i
+ 1, for 1
≤
i
≤
n

1
•
i
=
s
k
, and
j
=
s
k
+1
for 1
≤
k
≤
n

1
(a) Prove that this graph is 4colorable for any (
s
1
,s
2
,...,s
n
).
1
(b) Suppose (
s
1
,s
2
,...,s
n
) = (1
,a
1
,
3
,a
2
,
5
,a
3
,...
) where
a
1
,a
2
....
is an arbitrary dis
tributed sequence of the even numbers in 1
,...,n
. Prove that the resulting graph is
2colorable.
Solution:
(a) One important observation for this problem is that each of the above edge
conditions form a line graph. For the ﬁrst condition, states that if we label all
the nodes 1.
..n, then we will add edges (1
,
2)
,
(2
,
3)
,
(3
,
4)
,...
(
n

1
,n
). From
previous assignments, we know this graph is bipartite and is thus 2colorable.
Denote the set of edges coming from this condition as
E
1
.
The second condition will also give edges that will look like a line graph but
instead of having the standard ordering of 1
,
2
,...n
, we will have some diﬀerent
ordering deﬁned by the permutation. For example, if the permutation we have
gives us 3
,
5
,
2
,
1
,
4
,
6, then we will have edges (3
,
5)
,
(5
,
2)
,
(2
,
1)
,
(1
,
4)
,
(4
,
6).
You can convince yourself that this is a line graph by drawing it out. Denote
the set of edges coming from this condition as
E
2
.
Now let
G
1
= (
V,E
1
) be the graph where I have nodes 1
...n
but the edge set are
only the edges that come from the ﬁrst condition (so (1
,
2)
,
(2
,
3)
,...
(
n

1
,n
)).
Let
G
2
= (
V,E
2
) have the same node set but only edges that come from the
second edge condition. We will eventually form the original graph
G
= (
V,E
1
∪
E
2
) by taking the union of these two edge sets. Since both
G
1
and
G
2
are line
graphs, then they are both 2colorable. Color
G
1
with colors black and white
and color
G
2
with colors red and blue.
Now we note that each node
i
in
G
is colored either black or white in
G
1
and
colored either red or blue in
G
2
. Then we can color
G
with 4 colors by using
1
Hint: Use the fact that a line graph is 2colorable.