2.4: Digraphs and matrices

Recall if A = (a_{ij}) and B = (b_{ij}) are two n × n matrices, then

A + B = (a_{ij} + b_{ij})
A × B = (a_{ij}b_{ij})

AB = (c_{ij}) where c_{ij} = Σ_{k=1}^{n}a_{ik}b_{kj} = row(i) · column(j)

The following refer to the digraph D = (V, A) where V = (v_{1}, ..., v_{n}) where the vertices have been given a particular order.

Defn: The adjacency matrix of D = (V, A) is

A(D) = (a_{ij}) where a_{ij} = \{ \begin{matrix}1 & if (v_{i}, v_{j}) ∈ A \\ 0 & otherwise \end{matrix} .

Thm 2.11: If A is the adjacency matrix of D, then the i, jth entry of A^{k} is the number of paths of length k from v_{i} to v_{j}.

Defn: The reachability matrix of D = R(D) = (r_{ij})

where r_{ij} = \{ \begin{matrix}1 & if v_{j} is reachable from v_{i} \\ 0 & otherwise \end{matrix} .

Defn: The Boolean function b : M → {0, 1} where M = \{0, 1, 2, ...\} is defined by b(x) = \{ \begin{matrix}0 & if x = 0 \\ 1 & otherwise \end{matrix}.

B : set of matrices with nonnegative integer entries → set of matrices with entries 0 and 1 is defined by B(A) = (b(a_{ij})).

Thm 2.12: Suppose A is the adjacency matrix and R is the reachability matrix of the digraph D. If D has n vertices, then R = B(I + A + A^{2} + ... + A^{n−1}) = B((I + A)^{n−1})

I = identity matrix = (i_{kp}) where i_{kp} = \{ \begin{matrix}0 & if k ≠ p \\ 1 & if k = p \end{matrix}

J = (j_{kp}) where j_{kp} = 1 for all k, p.

R′ = (r_{ji}) is the transpose of R = (r_{ij}).

Thm 2.13 (Ross and Harary 1959). Suppose A is the adjacency matrix and R is the reachability matrix of the digraph D. Let n = # of vertices of D. Then

a.) D is strongly connected iff R = J.

b.) D is unilaterally connected iff B(R + R′) = J.

c.) D is weakly connected iff B(I +A+A′)^{n−1}) = J.

Thm 2.14. R = the reachability matrix of the digraph D. Let R × R′ = (t_{ij}). Let R^{2} = (s_{ij}). Then

(a.) v_{j} is in the strong component containing the vertex v_{i} if and only if t_{ij} = 1.

(b.) # of vertices in the strong component u_{i} = s_{ii}.

Defn: The distance matrix of the graph G is the matrix (d_{ij}) where d_{ij} is the distance from vertex v_{i} to v_{j}.

Thm 2.15: d_{ij} is the smallest number k such that B(A^{k}) = 1.

HW#4 (due 2/20): 2.3: 1, 2, 3, 4, 6, 10, 11, 18 and give rough estimate of computational complexity of TSP.

HW#5 (due 2/27): 2.4: 1, 2, 3, 4, 5, 7, 8, 12 AND 13, 14, 15.

Suppose D^{∗} is the condensation of D = (V, A). Let K_{1}, ..., K_{p} be the strong components of D. Then {K_{1}, ..., K_{p}} are the vertices of D^{∗}.

Thm 2.7: D^{∗} is acyclic.

Proof 1: Suppose D^{∗} contains a cycle K_{i_{1}}, ..., K_{i_{m}} where K_{i_{1}} = K_{i_{m}}. Then there exists v_{j,b} ∈ K_{i_{j}}, v_{j+1,e} ∈ K_{i_{j+1}} such that (v_{j,b}, v_{j+1,e}) ∈ A. Since v_{j,e}, v_{j,b} are in the same strong component, K_{i_{j}}, there exists a path v_{j,e}, u_{j,1}, ..., u_{j,n_{j}}, v_{j,b}. Similarly v_{m,e}, v_{1,b} are in the same strong component, K_{i_{1}} = K_{i,m}, so there exists a path v_{m,e}, u_{1,1}, ..., u_{1,n_{1}}, v_{1,b}

Thus v_{1,b}, v_{2,e}, u_{2,1}, ..., u_{2,n_{2}}, v_{2,b}, v_{3,e}, u_{3,1}, ..., u_{3,n_{2}}, v_{3,b}, ..., v_{m−1,b}, v_{m,e}, u_{1,1}, ..., u_{1,n_{1}}, v_{1,b} is a closed chain in D. Hence there exists a path from v_{1,b} to v_{2,e} (namely v_{1,b}, v_{2,e}) and there is a path from v_{2,e}, v_{1,b} (namely v_{2,e}, u_{2,1}, ..., u_{2,n_{2}}, v_{2,b}, v_{3,e}, u_{3,1}, ..., u_{3,n_{2}}, v_{3,b}, ..., v_{m−1,b}, v_{m,e}, u_{1,1}, ..., u_{1,n_{1}}, v_{1,b}). Thus v_{2,e} ∈ K_{i_{1}}. But this is a contradiction by thm 2.6 since v_{2,e} ∈ K_{i_{2}} and K_{i_{1}} ≠ K_{i_{2}} (since K_{i_{1}}, ..., K_{i_{m}} is a cycle).

Note: using a lot of notation helped us to write the above proof. Often notation can help us in writing a proof and can also help our understanding. But proofs using less notation and more English are also valid and sometimes are easier to understand.

I will first simplify the above proof by using different notation. Instead of giving the path v_{j,e}, u_{j,1}, ..., u_{j,n_{j}}, v_{j,b} in terms of vertices, I can just give it a name, say p_{j}. Thus in the following p_{j} will refer to the path v_{j,e}, u_{j,1}, ..., u_{j,n_{j}}, v_{j,b} p_{1} will refer to the path v_{m,e}, u_{1,1}, ..., u_{1,n_{1}}, v_{1,b}.

Proof 2: Suppose D^{∗} contains a cycle K_{i_{1}}, ..., K_{i_{m}} where K_{i_{1}} = K_{i_{m}}. Then there exists v_{j,b} ∈ K_{i_{j}}, v_{j+1,e} ∈ K_{i_{j+1}} such that (v_{j,b}, v_{j+1,e}) ∈ A. Since v_{j,e}, v_{j,b} are in the same strong component, K_{i_{j}}, there exists a path p_{j} from v_{j,e} to v_{j,b}. Similarly v_{m,e}, v_{1,b} are in the same strong component, K_{i_{1}} = K_{i,m}, so there exists a path p_{1} from v_{m,e} to v_{1,b}.

Thus p_{2}p_{3}, ..., p_{m}p_{1} is a closed chain in D starting and ending at v_{1,b}. Since v_{2,e} is a vertex in this path, there exists a path from v_{1,b} to v_{2,e} and there is a path from v_{2,e}, v_{1,b}

Thus v_{2,e} ∈ K_{i_{1}}. But this is a contradiction by thm 2.6 since v_{2,e} ∈ K_{i_{2}} and K_{i_{1}} ≠ K_{i_{2}} (since K_{i_{1}}, ..., K_{i_{m}} is a cycle).

Now with more English:

Proof 3: Suppose D^{∗} contains a cycle K_{i_{1}}, ..., K_{i_{m}} where K_{i_{1}} = K_{i_{m}}. Then there exists v_{j,b} ∈ K_{i_{j}}, v_{j+1,e} ∈ K_{i_{j+1}} such that (v_{j,b}, v_{j+1,e}) ∈ A. Since v_{j,e}, v_{j,b} are in the same strong component, K_{i_{j}}, there exists a path from v_{j,e} to v_{j,b}. We can now form a closed path by joining these paths together. Since this path is closed, all the vertices in this path must be in the same strong component. Hence v_{1,b} ∈ K_{1_{j}} and v_{2,e} ∈ K_{i_{2}} are in the same strong component. Thus K_{i_{1}} = K_{i_{2}}, But this is a contradiction since K_{i_{1}}, ..., K_{i_{m}} is a cycle.

Note the first proof has the most detail. If anyone questions your proof, you need to be able to provide more details. For example, in the third proof, I state that if two vertices are in the same closed path, then these vertices must be in the same strong component. This is true, but we don’t have a theorem stating it. Thus it would be valid for someone to be unsure if it were true and to ask me to provide more detail. Sometimes additional notation is necessary to provide the detail. Sometimes more notation is not necessary.