Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Discrete Structures

CS2800 Fall 2013

Homework 7
Due Friday, November 22, 2013

All graphs in this homework set are assumed to be simple (no multiple edges or loops).
1. Rosen Sec. 10.3 Ex. 44 p. 677. (Hint. Consider the complementary graph. Use Ex. 46.)
2. Rosen Sec. 10.4 Ex. 38 p. 691. Assume the graph is undirected.
3. Let G be an undirected graph with n vertices, m edges, and c connected components. Using the result of
the previous exercise, show that G has no cycles if and only if n = m + c. (Hint. Induction on m.)
4. Let G be a directed graph with n vertices. Show that if there is a path from vertex u to vertex v in G,
then there is a path from u to v of length at most n 1.
5. A directed graph is acyclic if it has no directed cycles. A directed acyclic graph is sometimes called a
dag. A topological sort of a dag G with n vertices is a numbering of the vertices v1 , v2 , . . . , vn such that
all directed edges go from lower numbered vertices to higher numbered vertices. In this exercise we show
that every dag G = (V, E) has a topological sort.
(a) Show that any dag has a vertex of indegree 0.
(b) Argue that any subgraph of a dag is also a dag.
(c) Now suppose we repeatedly find a vertex of indegree 0 and delete it from the graph along with all
incident edges until all vertices have been deleted. Let v1 , . . . , vn be the vertices of G in the order
they were deleted. Show that v1 , . . . , vn is a topological sort of the original graph G.
6. Let G = (V, E) be a directed graph. For u, v V , define u v if there is a path from u to v and a
path from v to u; equivalently, if u = v or u and v lie on a common directed cycle. Show that is an
equivalence relation. (The equivalence classes of are called the strongly connected components or just
strong components of G. Compare the definition in Rosen p. 686. Transitivity of is the content of
Ex. 16, p. 690.)
7. Let G = (V, E) be a directed graph. Suppose A V and B V are two distinct strong components of
G. Show that if there is a path from some vertex in A to some vertex in B, then
(a) there is a path from every vertex of A to every vertex of B, and
(b) there is no path from any vertex of B to any vertex of A.
8. Let G = (V, E) be a directed graph. Let G/ be a new directed graph whose vertices are the strong
components of G and whose edges are the pairs (A, B) such that there exists an edge (u, v) E with
u A and v B. The graph G/ is called the quotient graph of G with respect to . For example, the
graph G pictured on the left has four strong components, and the graph on the right is its quotient G/ .

Prove that G/ is acyclic.

1/1

You might also like