06.09.2021 Views

Discrete Mathematics- An Open Introduction - 3rd Edition, 2016a

Discrete Mathematics- An Open Introduction - 3rd Edition, 2016a

Discrete Mathematics- An Open Introduction - 3rd Edition, 2016a

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.2. Trees 251<br />

one. Let T ′ be the tree resulting from removing v 0 from T (together with<br />

its incident edge). Since we removed a leaf, T ′ is still a tree (the unique<br />

paths between pairs of vertices in T ′ are the same as the unique paths<br />

between them in T).<br />

Now T ′ has k vertices, so by the inductive hypothesis, has k − 1 edges.<br />

What can we say about T? Well, it has one more edge than T ′ , so it has<br />

k edges. But this is exactly what we wanted: v k + 1, e k so indeed<br />

e v − 1. This completes the inductive case, and the proof. qed<br />

There is a very important feature of this induction proof that is worth<br />

noting. Induction makes sense for proofs about graphs because we can<br />

think of graphs as growing into larger graphs. However, this does NOT<br />

work. It would not be correct to start with a tree with k vertices, and then<br />

add a new vertex and edge to get a tree with k + 1 vertices, and note that<br />

the number of edges also grew by one. Why is this bad? Because how do<br />

you know that every tree with k + 1 vertices is the result of adding a vertex<br />

to your arbitrary starting tree? You don’t!<br />

The point is that whenever you give an induction proof that a statement<br />

about graphs that holds for all graphs with v vertices, you must start with<br />

an arbitrary graph with v + 1 vertices, then reduce that graph to a graph<br />

with v vertices, to which you can apply your inductive hypothesis.<br />

Rooted Trees<br />

So far, we have thought of trees only as a particular kind of graph. However,<br />

it is often useful to add additional structure to trees to help solve problems.<br />

Data is often structured like a tree. This book, for example, has a tree<br />

structure: draw a vertex for the book itself. Then draw vertices for each<br />

chapter, connected to the book vertex. Under each chapter, draw a vertex<br />

for each section, connecting it to the chapter it belongs to. The graph will<br />

not have any cycles; it will be a tree. But a tree with clear hierarchy which<br />

is not present if we don’t identify the book vertex as the “top”.<br />

As soon as one vertex of a tree is designated as the root, then every<br />

other vertex on the tree can be characterized by its position relative to the<br />

root. This works because there is a unique path between any two vertices<br />

in a tree. So from any vertex, we can travel back to the root in exactly one<br />

way. This also allows us to describe how distinct vertices in a rooted tree<br />

are related.<br />

If two vertices are adjacent, then we say one of them is the parent of<br />

the other, which is called the child of the parent. Of the two, the parent is<br />

the vertex that is closer to the root. Thus the root of a tree is a parent, but<br />

is not the child of any vertex (and is unique in this respect: all non-root<br />

vertices have exactly one parent).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!