Math 68 - Spring 2014 - Practice Problems With Solutions
Math 68 - Spring 2014 - Practice Problems With Solutions
Chapter 1
u v u v
Case 2: u and v are connected in G. Since G is not connected, there must be some third
vertex w which is not connected to either u or v: If w is connected to v by a path, then the
subgraph which is the union of the two paths w to v and u to v has a path from w to u.
G: G:
u v u v
w w
Then w is not adjacent to u or v in G, so uw and uv are both in E(Ḡ). So u, uw, w, wv, v is
a path connecting u and v in Ḡ.
1.1.11 Determine the maximum size of a clique and the maximum size of an independent
set in the graph G:
G: Size 4 clique Ḡ :
Proof. In a clique of size n, every vertex has degree n − 1. In this graph, the maximal degree
is 5. However, there are only 2 vertices with degree 5, so there is no clique of size 5. Similarly,
there are only four vertices of degree 4, so there is no clique of size 5. There is, however a
1
2
clique of size 4 (drawn above). An independent set is a clique in Ḡ (also drawn above). Since
Ḡ is a path, any maximal independent set in G is of size 2.
1.1.14 Prove that removing opposite corner squares from an 8-by-8 checkerboard leaves
a subboard that cannot be tiled with 1-by-2 rectangles. Using the same argument,
make a general statement about all bipartite graphs.
Proof. Notice that the opposite corners are of the same color. So when you remove those two
squares, there are more squares left of one color (say red) than of the other (say white). A
tiling of the board is a perfect matching between red squares and white squares, which we
can’t have if the set of red squares is larger than the set of white squares.
To frame this question in terms of bipartite graphs, we can think about the checkerboard
as a map that is two-colorable. Draw vertices for each square and connect two vertices if the
squares share a border. Since this adjacency graph is two-colorable it is bipartite (the two
partites being the set of white and red squares, respectively). A tiling is a choice of k disjoint
edges which, as a set, cover all vertices. In general, this cannot be done if the two partites
are of different sizes.
{paths} ∩ {cycles} = ∅: The edge sets of Cn and Pn are always of different sized (there is
no C1 or C2 if we restrict to simple graphs).
3
{paths} ∩ {bipartite graphs} = {paths}: By alternating, all paths are two-colorable, and
so are bipartite.
{cycles} ∩ {complete graphs} = {C3 = K3 }: Back to counting edges, the only solutions
to n = 21 n(n − 1) are n = 1 and n = 3. However, there is not simple cycle with one vertex,
so C3 is the only candidate. Upon inspection, C3 = K3 .
{cycles} ∩ {bipartite graphs} = {C2k }k∈Z≥2 : A cycle is a type walk from a vertex back
to itself. In a bipartite graph, any walk must alternate between the parites, so any walk from
a vertex back to itself must be of even length (have an even number of edges). So the even
cycles are the only candidates. And, in fact, by alternating colors, we can always 2-color an
even cycle, and so every even cycle is bipartite.
{complete graphs} ∩ {bipartite graphs} = {K1 , K2 }: Any bipartite graph with more
than two vertices must be missing at least one edge, so is not complete. However, since K2 is
a path, it’s bipartite. The single vertex, K1 is also bipartite with one empty partite.
{c, d} {c, e}
A B
C D
The girth of G is 5. Therefore {a, b} must not be adjacent to and of A, B, C, or D. So all
of the unknown vertices must have exactly one intersection with {a, b}. Similarly, C and D
must both have exactly one intersection with {c, d} and with {c, e}. So C and D must both
contain c, which is a contradiction.
1.1.29 Prove that every set of six people contains at at least three mutual acquaintances
of three mutual strangers.
Proof. Pick a person A. From the remaining 5 people, A either has at least three people
who she knows or three people that she doesn’t know. If A knows three people, then either
there’s some pair of those people who also know each other (forming a clique of size at least
three), or no two of them know each other (in which case they form an independent set of
size three. If A has three strangers, then either there is some pair of those strangers who also
4
don’t know each other (forming an independent set of size three with A), or they all know
eachother (forming a clique of size three.
Case 1: Case 2:
A A
1.1.30 Let G be a simple graph with adjacency matrix A and incidence matrix M . Prove
that the degree of vi is the ith diagonal entry of A2 and M M T . What do the
entries in position (i, j) of A2 and M M T say about G?
Proof. Since A is symmetric, the ith diagonal entry of A is the dot product square of the
vector (
(i) (i) 1 if vi is adjacent to vj ,
v where wj =
0 otherwise.
In general, the dot product square of a vector is the sum of the squares of the entries in the
vector. Since all of the entries of v are 1 or 0, v · v is just the sum of the entries of v, which
is the degree of vi . The ith diagonal entry of M M T is the dot product square of
(
(i) 1 if ej is incident to vi
w(i) where wj =
0 otherwise.
Again, this is just the sum of the entries in w(i) , which is also the degree of vi .
In A2 , the (i, j) entry is the dot-product v(i) · v(j) , which will again be the sum of 1’s and
0’s: a 1 occurs in the kth summand if vi and vj share vk as a neighbor. So (i, j) entry is the
number of neighbors vi and vj have in common!
(Fun fact: In general, the (i, j) entry of Ak will be the number of length k walks from vi
to vj . For example, if
v1 v2 v3
G=
Then
0 1 0 1 0 1 0 2 0 2 0 2
A = 1 0 1 , A2 = 0 2 0 , A3 = 2 0 2 , A4 = 0 4 0 , · · · )
0 1 0 1 0 1 0 2 0 2 0 2
Similarly, the (i, j) entry of M M T is the dot product w(i) · w(j) , which will again be the
sum of 1’s and 0’s: a 1 occurs in the kth summand if vi and vj share ek as an edge. So (i, j)
entry is the number of edges joining vi to vj .
(b) A graph is connected if and only if some vertex is connected to all other
vertices.
True. IF the graph is connected, then by definition, any vertex is connected to every
other vertex in G. On the other hand, if there is a vertex that is connected to every other
vertex in G, then by transitivity (of the connection relation), every other pair of vertices
is also connected (it P is a u, v-path and P 0 is a v, w-path, then P followed by P 0 is a
u, w-walk, which contains a u, w-path).
(c) The edge set of every closed trail can be partitioned into edge sets of cycles.
True. This is certainly true for a closed trail which is a single vertex or any trail which
is itself a cycle. If a closed trail T is not a cycle, then either (1) the first/last vertex is
repeated more that just the twice, or (2) there is some other vertex which is repeated;
call this special vertex a. Decompose the trail T into
T1 , the trail which walks to the first occurrence of a and skips everything between then
and the second occurence of a and then completes the rest of T , and
T2 , which starts at the first occurrence of a and walks to the second occurrence of a.
Both T1 and T2 are closed trails of shorter length than T . Strongly induct on the length
of T .
T1
a a
Start Start T2
(d) If a maximal trail in a graph is not closed, then its endpoints have odd degree.
True. If a trail is not closed, then for each endpoint, the number of edges in the trail
which are incident to that endpoint must be odd. If a trail is maximal, then there are
no edges incident to the endpoint(s) which are not already in the trail; so the number of
edges in the trail which are incident to each endpoint is equal to the degree of that vertex.
1.2.4 Let G be a loopless graph. For v ∈ V (G) and e ∈ E(G), describe the adjacency and
incidence matrics of G − v and G − e in terms of the corresponding matrices for G.
G − e: Suppose the endpoints of e are u and v. The adjacency matrix is the same as
that of G, except in the (u, v) and the (v, u) entries, which are each reduced by exactly 1.
The incidence matrix has one fewer columns than I(G) (the one corresponding to e), and is
otherwise unchanged.
G − v: The adjacency matrix is one dimension smaller, and is achieved by deleting the
row and column of A(G) corresponding to v. The incidence matrix has one fewer row and
degree(v) fewer columns and is achieved by deleting the row corresponding to v and the
columns corresponding to all incident edges to v.
1.2.12 Convert the proof given in item 1.2.32 to a procedure for finding an Eulerian
circuit in a connected even graph.
Start by trying to draw an Eulerian trail (recording the order of the edges and vertices).
If you get stuck in one direction, try to extend the the other end (adding edges and vertices
in revers order to the beginning). When you run out of room, you must have a closed trail
6
by Lemma 1.2.31. Since it’s closed, think of it as a circuit C, which you can start at any of
its vertices.
If you missed an edge e, find a path from e to your circuit (which doesn’t intersect unnec-
essarily with C). Then start a new trail which starts at a far endpoint of e, follows the path
to C, and then continues around C. If this new trail is not closed, you can close it again by
Lemma 1.2.31. Iterate until there are no edges left.
7
For example:
D A
E F
Try 1: Try 2:
C B C B
D A D A
E F E F
Trail: A–B–C–F–A Original Trail: A–B–C–F–A
Missing edge: DE Path with edge: E–D–C
New Trail: E–D– |C–F–A–B–C
{z }
same order as before,
but new start point
D A
E F
Last Trail: E–D–C–F–A–B–C
Closing it off (in reverse): E–B–F–E–C
1.2.15 Let W be a closed walk of length at least 1 that does not contain a cycle. Prove
that some edge of W repeats immediately (once in each direction).
Proof. (By strong induction)
Let `(W ) denote the length of the walk.
Suppose `(W ) = 1. If W is closed, then it must be a loop (a cycle of length 1), which
contradicts the hypothesis. If `(W ) = 2 and W is closed, then W is one of the following:
W = u, e, v, e, u W = u, e, v, f, u
e
e
u v u v
f
pro The latter has a cycle, so it can only be the first, in which the edge e immediately repeats.
Now assume that any closed walk of length k < n which does not contain a cycle has an
edge which immediately repeats. Any closed walk with only one repeated vertex (the first)
is itself a cycle, so if W = v0 , e1 , v1 , . . . , e` v` does not contain a cycle, then it must have
another vertex w which is repeated. Now consider the subwalk U of W which starts at the
first occurrence of w, continues on W until the second occurrence of w (like T2 in 1.2.1 (c)).
This is a closed walk of length less than `(W ), and since W does not have a cycle, neither does
this subwalk. So, by the induction hypothesis, this subwalk has an edge which immediately
repeats. Since consecutive edges of this subwalk also occur consecutively in W , that means
that there is an edge of W immediately repeats.
1.2.18 Let G be the graph whose vertex set is the set of k-tuples with elements in {0, 1}.
with x adjacent to y if x and y differ in exactly two positions. Determine the
number of components of G.
Answer:
First, some examples:
k = 2:
(0, 1) (1, 0)
(0, 0) (1, 1)
k = 3:
(0, 0, 0) (1, 1, 1)
(1, 0, 1) (0, 1, 0)
9
(0, 0, 1, 0, 0, 0, 0, 0)
(0, 0, 1, 0, 1, 1, 0, 0)
(0, 0, 1, 0, 1, 1, 1, 1)
1.2.38 Prove that every n-vertex graph with at least n edges contains a cycle.
Proof. If n = 1, and G has one vertex and at least one edge, then it has at least one loop,
which is a cycle.
Now suppose n > 1 and G has n vertices and at least n edges. Either
(a) every vertex in G has degree at least 2, in which case Proposition 1.2.28 implies G
contains a cycles, or
(b) G has a vertex v of degree 1 or 0. Then G − v has n − 1 vertices and at least
n − 1 edges (we deleted at most 1 edge in removing v). By strong induction, G − v (and
therefore G) has a cycle.
10
Proof. Since G is connected, any two vertices are connected by a path. Consider two vertices
u and v, and pick a minimal u, v-path P = u, e1 , v1 , . . . , v`−1 , e` , v. Since P is minimal, no
two vi , vj with i 6= j ± 1 can be neighbors. So G[V (P )] ∼ = P`+1 (and so G has Pk as an
induced subgraph for all k ≤ ` as well). Thus ` ≤ 2, and any pair of vertices in G must either
be adjacent, or mutually adjacent to at least one vertex.
Now, either G is a complete graph (in which case every vertex is connected to every other
vertex), or there are two non-adjacent vertices u and v. We’ll show that any two such vertices
have a common neighbor which is adjacent to all other vertices in G.
Choose a minimal u, v-path, and call the intermediate vertex w. Pick any other vertex x
in V (G). Since any minimal path in G connecting two vertices must be of length at most 2,
and since G is connected, x is at most 2 away from u, v, and w. If x is not adjacent to w,
then G would have one of the following as an induced subgraph (where the dashed edges are
unknown):
x x
a c a
b
b
u w v
u w v
II. x is not adjacent to u or w.
I. x is not adjacent to u,v, or w.
(same as x not adjacent to v or w)
Contradiction: G[{x, a, u, w}] ∼
= P4
Contradiction: G[{x, a, u, w}] ∼
= P4
x
u v
w
III. x is adjacent to u and v, but not to w.
Contradiction: G[{u, v, w, x}] ∼
= C4
Therefore, x (any other vertex in G) is adjacent to w.
1.3.9 In a league with two divisions of 13 teams each, determine whether it is possible
to schedule a season with each team playing 9 games against teams within its
division and four games against teams in the other division.
Answer: Formulating this as a graph theory problem, we need a 26-vertex graph which
decomposes into a 4-regular bipartite graph with partites X and Y both of order 13, and two
9-regular graphs of order 13 (one on each partite of X and Y ). Unfortunately, the latter isn’t
possible because a graph cannot have an odd number odd-degree vertices!
11
It is, however, possible to schedule the four games each across the divisions: Call the teams
in division X x1 , x2 , . . . , x13 , and the teams in division Y y1 , y2 , . . . , y13 . For team xi , schedule
games with
yi , yi+1 (mod 13) , yi+2 (mod 13) , and yi+3 (mod 13) .
xj , xi−1 (mod 13) , xi−2 (mod 13) , and xi−3 (mod 13) .
1.3.22 Let G be a nonbipartite triangle-free simple graph with n vertices and minimum
degree k. Let ` be the minimum length of an odd cycle in G.
(a) Let C be a cycle of length ` in G. Prove that every vertex not in V (C) has at
most two neighbors in V (C).
Suppose x ∈ V (G) − V (C) has three neighbors in V (C). Then those neighbors partition
C into three pieces. Since ` is odd, at least one of those parts has odd length. And since
there are no triangles in G, that part has length at most ` − 3. Then by walking from
x to one of the endpoints of that part, along that part, and then back to x, you’ve built
an odd cycle of length less than `, a contradiction.
(b) By counting the edges joining V (C) and V (G) − V (C) in two ways, prove that
n ≥ k`/2 (and thus ` ≤ 2n/k).
Since δ(G) = k, the edges coming out of V (C) is at least k` − 2` (the sum of the degrees
minus the edges contributing to C, which were all double-counted). On the other hand,
the number of edges coming into V (C) is at most (|V (G)| − |V (C)|) ∗ 2 = (n − `) ∗ 2. So
k` − 2` ≤ (n − `) ∗ 2 =⇒ k` ≤ 2n =⇒ k`/2 ≤ n.
(c) When k is even, prove that the inequality of part (b) is best possible.
Let k be even and ` > 3 odd. Then the criteria above are satisfied by the graph G with
V (G) = {(a, b) | 1 ≤ a ≤ k/2, 1 ≤ b ≤ `} and E(G) = {(a, b) − (c, d) | b = d ± 1 (mod `)}
(see the example below). For this graph, n = (k/2) ∗ `.
Proof. (1) Any cycle which has an even number of edges (a, `)–(b, 1) must be of even
length (e.g. a cycle with no such edge will have the property that every second coordinate
which appears must appear an even number of times). So the shortest odd cycle is of
length `.
(2) Every vertex has degree k since (a,b) will connect to (c, b + 1 (mod `)) and (c, b − 1
(mod `)) for c = 1, . . . , k. .
(3) G is not bipartite since it has an odd cycle, and has no triangles by (1).
12
(3, 1) (2, 5)
(3, 2) (2, 4)
(3, 3) (2, 3)
(3, 4) (2, 2)
(3, 5) (2, 1)
(2, 5)
(3, 1)
(2, 4)
(3, 2)
(2, 3)
(3, 3)
(2, 2)
(3, 4)
(2, 1)
(3, 5)
(1, 1) (1, 2) (1, 3) (1, 4) (1, 5)
(1, 1)(1, 2)(1, 3)(1, 4)(1, 5) (1, 1)(1, 2)(1, 3)(1, 4)(1, 5)
1.3.8 Which of the following are graphic sequences? Provide a construction of a proof
of impossibility for each.
13
(a) (5, 5, 4, 3, 2, 2, 2, 1): Using the iteration from Theorem 1.3.31, you get
(5, 5, 4, 3, 2, 2, 2, 1) → (4, 3, 2, 1, 1, 2, 1) = (4, 3, 2, 2, 1, 1, 1)
→ (2, 1, 1, 0, 1, 1) = (2, 1, 1, 1, 1, 0)
the last of which is graphic (P3 + P2 + P1 ). One graph which has this sequence is
(b) (5, 5, 4, 4, 2, 2, 1, 1): Using the iteration from Theorem 1.3.31, you get
(5, 5, 4, 4, 2, 2, 1, 1) → (4, 3, 3, 1, 1, 1, 1)
→ (2, 2, 0, 0, 1, 1) = (2, 2, 1, 1, 0, 0)
the last of which is graphic (P4 + P1 + P1 ). One graph which has this sequence is
(c) (5, 5, 5, 3, 2, 2, 1, 1): Using the iteration from Theorem 1.3.31, you get
(5, 5, 5, 3, 2, 2, 1, 1) → (4, 4, 2, 1, 1, 1, 1) → (3, 1, 0, 0, 1, 1) = (3, 1, 1, 1, 0, 0)
→ (0, 0, 0, 0, 0)
the last of which is graphic (5 vertices w. no edges). One graph which has this sequence is
(d) (5, 5, 5, 4, 2, 1, 1, 1): Using the iteration from Theorem 1.3.31, you get
(5, 5, 5, 4, 2, 1, 1, 1) → (4, 4, 3, 1, 0, 1, 1) = (4, 4, 3, 1, 1, 1, 0)
→ (3, 2, 0, 0, 1, 0) = (3, 2, 1, 0, 0, 0)
which is not graphic since there are not three vertices of non-zero degree to connect the
degree vertex to. So (5,5,5,4,2,1,1,1) is not graphic.
Proof. Notice that any component of G is also k-regular and bipartite, so we’ll assume, without
loss of generality, that G is connected. Suppose there is a cut edge e of G, and consider a
H component of G − e. Then H is also bipartite, and has n(H) − 1 vertices of degree k and
one vertex v of degree k − 1. But if H has partites X and Y (say v ∈ Y ), this means that H
simultaneously has |X| ∗ k and |Y | ∗ k − 1 edges. So
k(|Y | − |X|) = 1
which is a contradiction since k ≥ 2.
14
Proof. Consider the set of bits which are not shared amongst all of the vertices of the cycle
C. The cycle sits in the subcube generated by varying only those bits which vary in C. There
are at most r of them since the farthest a vertex can be from any other vertex in C half the
length of the cycle. So C sits inside some copy of Qr .
On the other hand,
(0,0,0) — (1,0,0) — (1,1,0) — (1,1,1) — (1,0,1) — (0,0,1) — (0,1,1) — (0,1,0) — (0,0,0)
is a cycle of length 8 = 2 ∗ 4 in a hypercube of dimension 3. (So yes, but not as an induced
subgraph. Also, this is the smallest example since Q2 ∼ = C4 .)
n−1
1.3.32 Prove that the number of simple even graphs with vertex set [n] is 2( 2 ) .
(Hint: establish a bijection with the set of all simple graphs on V (G) = [n − 1].)
Proof. There is a bijection between simple graphs on [n − 1] and even simple graphs on [n]
given by
{ simple graphs on [n − 1]} → { simple even graphs on [n]}
G 7→ G + vn + {vn vi | d(vi ) is odd}
(connect the new vertex to every odd vertex in G; since there were an even number of these,
not only is the new degree on each odd vi , but the degree of vn is also even). The inverse of
this map is
{ simple even graphs on [n]} → { simple graphs on [n − 1]}
G 7→ G − vn .
(Notice that we’re interested in graphs, not isomorphism classes of graphs, so both of these
n−1 n−1
maps are one-to-one). Since there are 2( 2 ) simple graphs on [n − 1], there are also 2( 2 )
simple even graphs on [n]
(a) Prove that G − x has average degree at least a if and only if d(x) ≤ a/2.
Proof. Let n = n(G), k = e(G), and d = dG (x). Since n(G − x) = n − 1 and e(G − x) =
k − d, the average degree in G − e is 2(k − d)/(n − 1). This is greater than or equal to a
exactly when
n(k − d) ≥ (n − 1)k ⇔ nd ≤ k ⇔ d ≤ k/n = a/2.
15
(b) Use part (a) to give an algorithmic proof that if a > 0, then G has a subgraph
with minimum degree greater than a/2.
If G is a regular graph, then we’re done. If not, then there is some vertex v of degree
less than a/2. By (a), G − v has average degree at least a/2. Continue deleting vertices
of degree less than a/2; each time the average degree of the remaining graph G0 will go
up since we are only deleting vertices of degree d < 12 a ≤ 12 (2e(G0 )/n(G0 )). Iterate until
there are no more vertices of degree less than a/2; we will not run out of vertices to
remove since, at every step,
(c) Show that there is no constant c greater than 1/2 such that G must have a
subgraph with minimum degree greater than ca; this proves that the bound
in part (b) is best possible. (Hint: use K1,n−1 .)
Proof. Consider the star on n vertices. This has average degree 2(n − 1)/n < 2, and so
it’s not possible to remove a vertex and raise the average degree: by removing vertices, it
is only possible to drop the average degree. Moreover, every subgraph of G has δ(G) ≤ 1.
Since
n−1
lim 2 = 2, we have lim ca = 2c,
n→∞ n n→∞
P
Proof. If i di is odd, then d1 , . . . , dn cannot be a degree sequence. Since there are no loops,
there can be at most D = d2 + · · · + dn edges in a graph with degree sequence d1 , . . . , dn , so
d1 ≤ D. P
Now assume that i di is even and d1 ≤ d2 + · · · + dn . Start with vertices v1 , . . . , vn . Add
d2 edges incident to v1 and v2 , then up to d3 edges to v3 , and so on, until we’ve added d1
edges in total. This is possible by our hypothesis.
Now take the last vertex vj which is not “full” and add edges from vj to vj+1 , and so on
until vj is “full”. Iterate this process until there is at most one vertex v` which is not full
(maybe ` = j, but P ` 6= 2 since d2 ≤ d1 ). P The number of edges N remaining to be added to
v` is even (since i di is even, and N is i di minus the sum of the degrees in the graph so
far). There are at least N edges joining v1 to v2 since N ≤ d` ≤ d2 ; to avoid loops, remove
N edges connecting v1 and v2 and add N/2 edges connecting v` to each of v1 and v2 .
For example, consider the sequence (5, 4, 4, 3, 2), the first few iterations look like
−→ −→
v1 v2 v3 v4 v5 v1 v2 v3 v4 v5 v1 v2 v3 v4 v5
16
−→ −→
v1 v2 v3 v4 v1 v2 v3 v4 v1 v2 v3 v4
1.4.8 Prove that there is an n-vertex tournament with in-degree equal to out-degree
at every vertex if and only if n is odd.
Proof. If the in-degree is equal to the out-degree, then, in particular, the underlying graph
of the tournament is even. This only happens when n is odd. (The underlying graph is a
complete graph, and is regular with degree n − 1.
Now assume n is odd. One tournament with the same in and out degrees at each vertex
is as follows: Label the vertices v1 , . . . , vn . For each vi , direct the edges in common with
vi+1 (mod n) , vi+2 (mod n) , . . . , vi+(n−1)/2 (mod n) away (giving it an out-degree of half the avail-
able edges). So any vertex vj points to its (n − 1)/2 successors and is pointed to by its
(n − 1)/2 predecessors (mod n), making the orientation well-defined.
vj
1.4.10 Prove that a digraph is strongly connected if and only if for each partition of the
vertex set into non-empty sets S and T , there is an edge from S to T .
Proof. If a digraph is strongly connected, then every pair of vertices u and v has a u, v-path.
Now take any two partitions of V (G) into sets S and T , and select vertices s ∈ S and t ∈ T .
Then let P be a s, t-path, and consider the last vertex in P which is not in T . That vertex
and its successor in P are joined by an edge from S to T (it has a successor since P ’s last
vertex is in T ).
Now assume that for each partition of the vertex set into non-empty sets S and T , there
is an edge from S to T . Consider any two vertices u and v; we can construct a u, v-path as
follows. Partition V (G) into S = {u} and T = V (G) − u. Then there is an edge out of u
by our assumption. If v is at the tip of one such edge, then we are done. At each step, add
vertices which are successors of S, removing them from T (there is at least one, since there
is at least one by our hypothesis). As soon as an edge connects to v, we have recovered a
u, v-path.
17
1.4.14 Let G be an n-vertex digraph with no cycles. Prove that the vertices of G can be
ordered as v1 , . . . , vn so that if vi vj ∈ E(G), then i < j.
Proof. What we are concerned with is the transitivity of order, i.e. a sequence of inequalities
produces a new inequality. A sting of inequalities produced by our criteria is equivalent to
a walk in G; since G is acyclic, every walk is a u, v-path. So our criteria for the ordering is
equivalent to requiring that whenever vi appears before vj in any path, i must be less than j.
If there is no such order, then there must be some pair of vertices u and v for which there is
both a u, v-path and a v, u-path. However, this would produce a cycle (follow the u, v path
until it intersects with the v, u-path and then follow the v, u-path back). So there must be
some ordering which agrees with all paths.