Está en la página 1de 8

Trees

Trees are the building blocks of graphs. We have already seen that every graph is made up of connected
graphs. We show that every connected graph has a spanning tree.

Definition. A tree is a connected graph with no cycles.

Definition. A tree T is called a spanning tree for the graph G = (V, E) if T is a subgraph of G and and all the
vertices of G are vertices of T.

Theorem. A graph G = (V, E) is connected if and only if it has a spanning tree.


Proof. If G contains a spanning tree, then it must be connected since the tree is connected. The paths connecting
the vertices are already available in the edges of the spanning tree.
Conversely, assume that G is a connected graph. If G has a cycle, remove an edge of this cycle to form the
subgraph G′. Then G′ will again be a connected graph. Indeed, the two vertices connected by the edge that has
been removed will still be connected by the remaining edges. This follows from the definition of a cycle. For
example, if the cycle is
(v1, v2, … , vi, vi+1, … , vn-1, vn)
is the cycle and the edge {vi, vi+1} is removed, then the vertices vi and vi+1 are still connected by a path
(vi+1, … , vn-1, vn, v2, … , vi)
since vn = v1. Once vi and vi+1 are connected by a path in G′, everything that was connected in G is connected in
G′. Thus, the graph G′ is connected.
Continue the process of removing edges from cycles by removing and edge from a cycle in G′ if G′ has a
cycle. The process of removing edges ends after a finite number of steps when a connected subgraph T of G with
no cycles is reached. Indeed, the graph G has only finitely many edges. So we have that G has a connected
subgraph T with no cycles. Thus, the graph T is a tree. Since T and G have the same vertices, the tree T is a
spanning tree for G.
Q.E.D.

Another way of getting a spanning tree is by “growing” the tree

Spanning Tree Algorithm. Let G = (V, E) be a connected graph. Define the growing tree recursion with
BASIC STEP: Choose any vertex v and form the set of vertices W ={v} and the set of edges F = ∅.
RECURSIVE STEP. Find a v not in W for which there is an edge (v, w) in E with w in W such that the set
F∪{ (v, w)} has no cycles. Replace W with W′ = W∪{w} and F with F′ =F∪{ (v, w)}.
The algorithm terminates when when there are no longer any vertices to add to W.

Theorem. The spanning tree algorithm produces a spanning tree.


Proof. We use structural induction. We see that the basic step produces a tree. We show for the recursive step
that a tree is obtained from applying the recursive step to the tree (W, F). Suppose the vertex v with edge (w, v)
is added. The the graph (W′, F′) is a tree. In fact, (W, F) has no cycles and the new edge (w, v) does not produce
a cycle. Also the graph is connected. since the new edge v is connected to w and w is connected to all the edges in
W. So (W′, F′) is a tree.
The algorithm terminates at (W, F) after finitely many steps since there are only finitely many vertices. The
graph at the end is a tree. We need to show that the tree spans G, i.e.., contains all the vertices V. If not there is
a vertex v not in W. Let w be any vertex in W. Since G is connected, there is a path v = v1, … , vm where

Trees page 1
vm = w. Let vk be the first element of the path in W. Then vk -1 is not in W and can be connected to W with
the path (vk , vk) not in F. The addition of the path (vk - 1, vk ) does not create a cycle in F∪{vk - 1, vk)} since
-1
vk - 1 would have to be previously connected to (W, F). So we have verified the recursive step. Thus a spanning
tree can be obtained as a “growing tree”. Q.E.D.

Corollary. Let G be a connected graph with n vertices. Then every spanning tree of G has n- 1 vertices.
Proof. This follows directly from the Theorem. At each stage we add one vertex and one edge. The start is one
vertex and 0 edges. So at the end, there are n vertices and n -1 edges, Q.E.D.

Daisy Chain Theorem

Daisy Chain Theorem. Let G with n vertices. The following are equivalent:
1) G is a tree;
2) G has no cycles and has n - 1 edges;
3) G is connected and has n - 1 edges;
4) G is connected and removing an edge disconnects G;
5) there is exactly one path between any two vertices;and
6) G has no cycles but connecting any two vertices with an edge not in the graph will create a cycle.
Proof. (1) → (2). Suppose G is a tree. By definition G has no cycles. The graph G is also connected by
definition. The spanning tree algorithm applied to the G gives a spanning tree with n - 1 edges. The n - 1 edges
in the spanning tree are the only edges in G since adding an edge to the spanning tree will produce a cycle and the
cycle will also be a cycle in G. So G is equal to its spanning tree and has n - 1 edges.
Proof (2) → (3). Suppose G has no cycles and n - 1 edges. We need to show G is connected. Let G1, … , Gk
ebe the connected components of G, each of which are trees since there are no cycles even in G. Since Gi is a tree,
it has ni - 1 edges by (1) → (2). Here ni is the number of vertices in Gi. So we have that ∑i(ni - 1) = ∑ni - k i =
n – ki = n - 1. So we must have that k = 1 and therefore G is connected.
Proof (3) → (4). Suppose G is connected and has n - 1 edges. Removing an edge must disconnect the graph;
otherwise, the spanning tree algorithm can be applied and the spanning tree algorithm requires n -1 edges.
Proof (4) → (5). Suppose G is connected but removing an edge disconnects G. Suppose there are two paths
v = v 1 , v2 , …, v k = w and v = v1 , v′2 , …, v′k′ = w between two vertices v and w. Then the path
v = v 1 , v 2 , …, v k , v′ k′ - 1, … , v′ 2 , v′ 1 = v
is a cycle. Removing an edge from a cycle of a connected graph does not disconnect the graph. So we must have
that that there is exactly one path between any two vertices.
Proof (5) → (6). Suppose that there is a unique path between any two vertices. We have already seen that there are
no cycles. Creating an edge (v, w) will produce a cycle since there is already a path v = v1, v2, …, vk = w in
the graph.
Proof (6) → (1). Suppose that G has no cycles but adding an edge will create a cycle. We show that G is
connected. If v and w are in G, then either (v, w) is an edge in G or adding (v, w) will create a cycle. In the latter
case, (v, w) will create a cycle only if there is already a path in G between v and w. In either case, the graph G is
connected.

Structure Theorems for Trees

We obtain some structure theorems for trees. These are important since trees are the building blocks for
graphs.

Trees page 2
Lemma. Let T = (V, E) be a tree and let e = {v1, v2} be an edge of T. Then the graph (V, E\{{v1, v2}}) can be
written as the union of two disjoint trees.
Proof. Let V1 be the vertices of T which can be connected to v1 by a path not containing the edge e. Let E1 be
all edges of the paths of T not containing e that connects the vertices in V1 to v. If {t, u} ∈ E1, then by definition
there there is a path
(s, …, t, u, … , v1)
in T not containing e. So by definition t and u are in V1. So we have that E1 is a family of sets consisting of
two vertices with each element of the pair in V1. This means that T1 is a graph.
We show that T1 = (V1, E1) is a tree. First we have that T1 is nonvoid since it contains v1. Now we have
T1 is a subgraph of T. In particular, we have that E1 ⊂ E. So there can be no cycle in G1 since there is no cycle
in E. We also have that T1 is connected. In fact, each t and u in V1 can be connected to v1 by a path in E1. So
we have that t and u can be connected by a path in E1 (through v1). This means T1 is connected. Thus T1 is a
tree.
Similarly, we define V2 and E2 and show that there is a tree T2 = (V2, E2). Now we have two trees T1 and
T2. We show that T1 and T2 are two the two disjoint trees in the statement of the Theorem. To verify this we
show that
V1∪V2= V, E\{e} = E1∪E2, and V1∩V2 = ∅.
First we show that V1∪V2= V. Let u ∈ V. We have to who that there is either a path connecting v to v1 or
a path connecting v to v2 and that this path does not contain the edge e. However T is connected and so there are
paths (u, u1, … , un-1, v1) and (u, t1, … , tm-1, v2) connecting u to v1 and u to v2 in T. We claim that one of
these paths does not contain e. Indeed, if e where in both paths, then depending on which direction we run across
the edge e = {v1, v2}, we would have either the path
(1) (u, u1, … , v2, v1, … , un-1, v1)
or the path
(2) (u, u1, … ,v1, v2, … , un-1, v1)
connecting u and v1; similarly, we would have either the path
(3) (u, t1, … , v1, v2, … , tm-1, v2)
or the path
(4) (u, t1, … , v2, v1, … , tm-1, v2)
connecting u and v2. However, the parts of the paths with
(v1, … , un-1, v1), (v1, v2, … , un-1, v1), (v2, … , tm-1, v2), (v2, v1, … , tm-1, v2)
in paths (1) through (4) respectively cannot exist since these would represent a cycle in T. So the path connecting
u and v1 must be
(u, u1, … ,v2, v1)
with the edge e at the very end of (1) and the path connecting u with v2 must also be
(u, t1, … , v1, v2)
with v2 at the very end of (3). However, the existence of both of these paths is impossible since the combination
of these paths in the form
(v1, v2, … , u1, u, t1, … , v1, v2)
gives a cycle in T through u. Thus, one of the paths from u to v1 or u to v2 does not contain e. Thus, we have
that u lies in V1 or V2. So we have that V1∪V2 = V.
Now we also have that V1∩V2 = ∅. In fact, if u ∈ V1∩V2, then we could connect u to v1 by a path of the
form
(u, t1, … , tm , v1}

Trees page 3
not containing e. We could also connect u to v2 by a path of the form
(u, s1, … , sn, v2)
not containing e. But now
(u, s1 , … , sn , v2 , v1 , tm , … , t1 , u)
represents a cycle in T which is impossible. So we have that V1∩V2 = ∅.
Finally we have that E\{e} = E1∪E2. In fact, let {u,v} be a edge in E\{e}. Then either v ∈ V1 or v ∈ V2.
Suppose v ∈ V1. Since v can be connected to v1 by a path (v, … , v1) not containing e and since {u, v} ≠ e, the
vertex u can be connected to v1 by a path (u, v, … , v1) not containing e. So we have that (u, v) ∈ E1. This
means that
E\{e1} ⊂ E1∪E2.
Since
E1∪E2 ⊂ E\{e}
is automatically true, we have that
E1∪E2 = E\{e}.
Q.E.D.

A companion to the preceding lemma is the following.

Lemma. Let T = (V, E) be a spanning tree of the connected graph G. Let e be any edge in of G not in E. Then
(V, E∪{e}) is a connected graph with one and only one cycle.
Proof. Homework.

Theorem. If a tree has n vertices, then it has n - 1 edges.


Proof. We prove this by induction on the number of vertices. As the first step notice that a tree with one vertex
has no edges and a tree with two vertices has 1 edge.
Now assume that a tree with k vertices has k - 1 edges for every k ≤ n. We show that a tree T = (V, E) with
n + 1 vertices has n edges with n > 2. Let e be an edge of T. Then the graph (V, E\{e}) may be written as the
union of two trees T1 = (V1, E1) and T2 = (V2, E2) with V1∪V2 = V, V1∩V2 =∅, E1∪E2 = E\{e} and
E1∩E2 = ∅. Since T1 and T2 are trees with k1 and k2 vertices respectively with k1 ≤ n and k2 ≤ n, we have that
T1 has k1 - 1 edges and T2 has k2 – 1 edges. Since V is the disjoint union of V1 and V2, we have that
k1 + k2 = n + 1.
Since E\[e} is the disjoint union of E1 and E2, we have that T has
(k1 - 1) + (k2 - 1) + 1 = k1 + k2 - 1 = n
edges. Q.E.D.

The Incidence Matrix of a Graph

To every graph is associated an incidence matrix.

Definition. Let G = (V, E) be a graph with p vertices and q edge with


V = {v1, … , vp} and E = {e1, … , eq}.
The incidence matrix ℑ(G) of G is a p × q matrix A = (ai j) where

Trees page 4
1 if vi is incident with ej
ai j = .
0 otherwise

We note that the incidence matrix of a connected graph must be irredundant, i.e., it cannot have any row or
column equal entirely to 0. Indeed, it it had a row i equal to zero, the i would be incident on no edge and not
connected to any other vertex. It is impossible for a column to be 0.

Example. The graph G given by

has incidence matrix


(1, 2) (1, 3) (2, 3) (2, 4) (3, 4) (3, 5)
1 1 1 0 0 0 0
2 1 0 1 1 0 0
3 0 1 1 0 1 1
4 0 0 0 1 1 0
5 0 0 0 0 0 1
where
e1 = (1, 2), e2 = (1, 3), e3 = (2, 3), e4= (2, 4), e5 = (3, 4), e6 = (3, 5).

The incidence matrix associated with a graph depends on the enumeration of the vertices and the edges. If the
vertices and edges are enumerated in two different ways to give two incidence matrices ℑ and ℑ′, then there are
permutation matrices P and Q with ℑ = Pℑ′Q. We therefore speak of the incidence matrix of a graph even though
it is not unique. In any case we can assume that some enumeration of the vertices and edges has been chosen.

The following concept is important in relating the algebraic (incidence matrix) and the topological structure of
a graph.

Definition. The valence of degree of a vertex in a graph is the number of edges of the graph that are incident on
this vertex.

Proposition. The valence of the ith vertex of a graph is the sum of the entries in the ith row of the incidence
matrix. The sum of the valences of a graph is equal to twice the number of edges.

Corollary. Let T be a tree. Then there are at least two vertices of T with a valence of 1.

Trees page 5
Proof. Let T have n vertices vi. Let v(i) denote the valence of the vertex vi. Suppose that v(i) ≥ 2 for n -1
vertices vi. We obtain a contradiction. In fact, we must have that
∑ v(i) ≥ 2n - 2 + 1 = 2n - 1
since the remaining vertex is indicent on some edge due to the fact that a tree is connected. But we have already
seen that a tree with n vertices has n - 1 edges. So we have that
∑ v(i) = 2(n - 1).
So it is impossible that there should be less than two vertices incident on only one edge.
Q.E.D.

In the preceding example, the valences of v1, … , v5 are 2, 3, 4, 2, 1 respectively. The sum of the valences
is 12 which is twice the number of edges.

Now we show that a tree with n vertices has a nonsingular (n – 1) × (n – 1) triangular submatrix. We need the
following lemma that provides an induction step.

Lemma. Let v be a vertex of valence 1 in the tree T = (V, E) and let e be the unique edge incident at v. Then T′ =
(V\{v}, E\{e}) is also a tree.
Proof. We have to show that T′ is a connected graph with no cycles. First we notice that T′ has no cycles since
any cycle in T′ must be a cycle in T. Second we show that T′ is connected. Let u and u′ be vertices in T′. Then
there is a path (u1, … , un) in T with u1 = u and un = u′. Since there are only finitely many paths connecting u
and u′, we may suppose that we have chosen the path with the minimal number of vertices. The deleted edge e
cannot be part of this path. To see this, we notice that the edge e cannot be equal to one of the interior edges. If
e = {ui, ui+1} with 1 < i < i + 1 < n with v = ui we obtain a contradiction. On the one hand, if ui-1 ≠ ui, then we
would have that v is incident on the two edges {ui-1, ui} and {ui, ui+1}. On the other hand, if ui-1 = ui+1, then we
would have that (u1, … , ui-1, ui+2, … , un) would be a connecting path in T with fewer vertices. Both are
impossible. So we have that the path (u1, … , un) is in T′.
Q.E.D.
Now we recall the criterion for triangularity.

Proposition. An n × n matrix A is triangular if and only if {1, … , n} can be written as {i(1), … , i(n)} and {j(1),
… , j(n)} so that in the matrix (n – s) × (n – s) matrix As–1 equal to the matrix A with rows
{i(1), … , i(s – 1)} and {j(1), … , j(s – 1)} deleted, the entry ai(s), j(s) is at most the only nonzero element in
its row.
Proof. Chapter IX.

Theorem. The incidence matrix ℑ of a tree T with n vertices has a nonsingular (n – 1) × (n – 1) triangular
submatrix.
Proof. Suppose that we have proved this theorem if T has k vertices with k < n. We prove the theorem for a tree
T with n vertices. Let T = (V, E) with V = {v1, … , vn} and E = {e1, … , en-1}. By the preceding Corollary there
is a row of M, call it row i(1), that contains only one nonzero element in the column j(1). If we delete the i(1)
row and the j(1) column from the incidence matrix to form the new matrix M′, we we see that M1 is the incidence
matrix for the tree T1 = (V1, E1) with V1 = V\{vi(1)} and E1= E\{ej(1)}. By the induction M1 has a triangular
(n – 2) × (n – 2) triangular submatrix. This means we can find find rows i(2), … , i(n - 1) and columns j(2), … ,
j(n -1) such that Ms–1 equal to the matrix M1 with rows {i(2), … , i(s – 1)} and {j(2), … , j(s – 1)} deleted,
the entry ai(s), j(s) is at most the only nonzero element in its row. Starting from M itself, we can find rows
i(1), … , i(n - 1) and columns j(1), … , j(n -1) such that Ms – 1 equal to the matrix M with rows

Trees page 6
{i(1), … , i(s – 1)} and {j(1), … , j(s – 1)} deleted, the entry ai(s), j(s) is at most the only nonzero element in
its row. This means that matrix M′ equal to M with the row i0 = {1, … , n}\{i(1), … , i(s – 1)} deleted, i.e.,
the only row not appearing in the list {i(1), … , i(s – 1)}, is triangular since it satisfies the conditions of the
triangulation algorithm.
Q.E.D.

Corollary. The column vectors of the incidence matrix of a tree are linearly independent.
Proof. The i, j entry of the incidence matrix is 1 if and only if the vertex vi is incident on the edge vj. Since each
vertex of a tree is incident on some edge, we if the tree has more than one vertex, we have that no row of an
incident matrix has a 0 row. This means that the successive submatrices Ms in the preceding Theorem have 1 in
the i(s), j(s) place. This means that the matrix M′ when put in triangular form by multiplication on the left and
right by permutation matrices has one on the diagonal. So M′ has determinant 1. Thus the matrix M′ is
nonsingular or equivalently has linearly independent columns. Thus, the columns of M, which are the columns of
M′ with the addition of an extra i0 coordinate, are linearly independent. Q.E.D.

Theorem. The rank of the incidence matrix of a graph with n vertices is equal to n - m where m is the number of
components of the graph.
Proof. First we treat a special case of the theorem. We show that the incidence matrix ℑ of a connected graph
with n vertices is n - 1. The sum of the rows is 0. To see this, we examine a column e = (v, w). There are two
nonzero entries in the column, viz., 1 in the row corresponding to v and – 1 in the row corresponding to w. So
the sum of the entries in this column is 0. Thus, we have that the sum of all the rows is 0. So the dimension of
the row space must be less than n.
Now we prove that rank ℑ ≥ n - 1. Since |G| is connected, it has a spanning tree T. Here we are considering
G without the directed property. The incidence matrix for the spanning tree is the incidence matrix of G with
some of the columns of G deleted and with the – 1 that appear in the incidence matrix of G changed to + 1. Call
this matrix ℑ′. By a previous result, there is an (n – 1) × (n – 1) submatrix ℑ′′ of ℑ′ formed by deleting one row
of ℑ such that Pℑ′′Q is lower triangular with 1's along the diagonal. Here P and Q are certain permutation
matrices P and Q. Thus, there the same (n – 1) × (n – 1) submatrix of the incidence matrix of G can be
transformed to a lower triangle matrix with + 1 or – 1 along the diagonal by multiplication by the permutation
matrices P and Q. So the incidence matrix of G has a submatrix of rank n – 1. In fact PℑQ is a lower triangular
matrix with +1 or -1 along the diagonal and thus has a determinant equal to +1 or -1. Thus G has rank at least
equal to n – 1.
We now treat the general case. Suppose that G has connected components G1, … , Gm. The incidence
matrices ℑi of the Gi = (Vi, Ei) correspond to the set Ci of columns of the incidence matrix of G. These are
precisely the columns given by the indices corresponding to the edges in Ei. We note that ∪Ci is the set of all
columns of the incidence matrix of G. Further we notice that Ci)∩Cj = ∅ if i ≠ j. Indeed, the graphs Gi have no
edges in common. The columns of Ci contain only the rows corresponding to the vertices Vi. However, it is
only in these rows where the nonzero entries of the columns Ci occur. So we have the column space C of the
incidence matrix ℑ of G is the direct sum of the column space Ci, i.e.,
C = ∑⊕Ci.
Now we have that Gi is a is a connected graph. Therefore, the rank of incidence matrix is Card Vi - 1. So we have
that
rank (Incidence matrix ℑ) = ∑ rank (Incidence matrix ℑi)

Trees page 7
m
= ∑ (Card Vi - 1)
s=1
= n - m.
The converse really requires no work. If the
rank ℑ = n - m,
then m must be the number of components of G. Q.E.D.

Example. The graph with two connected components and 7 vertices given below as

has incidence matrix


1 1 1 0 0 0 0
2 -1 0 0 0 0 0
3 0 -1 1 0 0 0
4 0 0 -1 0 0 0
5 0 0 0 1 1 0
6 0 0 0 -1 0 1 .
7 0 0 0 0 -1 -1
Rank 3 Rank 2

which has rank 7 - 2 = 5.

Trees page 8

También podría gustarte