introduction to treesatreus catreus forest graphs containing no simple circuits that are not...
TRANSCRIPT
![Page 1: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/1.jpg)
Section 11.1
Int roduct ion to Trees
![Page 2: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/2.jpg)
Definition:
A tree is a connected undirected graph with no simple circuits.
: A circuit is a path of length >=1 that begins and ends a the same vertex.
![Page 3: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/3.jpg)
d
d
![Page 4: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/4.jpg)
Tournament Trees
A common form of tree used in everyday life is the tournament tree, used to describe the outcome of a series of games, such as a tennis tournament.
Alice Antonia Anita Abigail Amy Agnes Angela Audrey
Alice
Abigail
Agnes
Angela
Alice
Angela
Alice
![Page 5: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/5.jpg)
A Family Tree
Much of the tree terminology derives from family trees.
Gaea
Cronus Phoebe Ocean
Zeus Poseidon Demeter Pluto Leto Iapetus
Persephone Apollo Atlas Prometheus
![Page 6: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/6.jpg)
Ancestor Tree
An inverted family tree. Important point - it is a binary tree.
Iphigenia
Clytemnestra Agamemnon
Leda Tyndareus Aerope Atreus
Catreus
![Page 7: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/7.jpg)
Forest
Graphs containing no simple circuits that are not connected, but each connected component is a tree.
![Page 8: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/8.jpg)
Theorem
An undirected graph is a tree if and only if there is a unique simple path between any two of its vertices.
![Page 9: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/9.jpg)
Rooted Trees
Once a vertex of a tree has been designated as the root of the tree, it is possible to assign direction to each of the edges.
![Page 10: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/10.jpg)
Rooted Trees
a
b
c
d
e f
g a
b
c
d
e
f
g
![Page 11: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/11.jpg)
root node a
b c
d e f g
h i
parent of g
siblings leaf
internal vertex
![Page 12: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/12.jpg)
a
b c
d e f g
h i ancestors of h and i
![Page 13: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/13.jpg)
a
b c
d e f g
h i subtree with b as its root subtree with c as its root
![Page 14: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/14.jpg)
m-ary trees
A rooted tree is called an m-ary tree if every internal vertex has no more than m children. The tree is called a full m-ary tree if every internal vertex has exactly m children. An m-ary tree with m=2 is called a binary tree.
![Page 15: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/15.jpg)
![Page 16: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/16.jpg)
Ordered Rooted Tree
An ordered rooted tree is a rooted tree where the children of each internal vertex are ordered. Ordered trees are drawn so that the children of each internal vertex are shown in order from left to right.
![Page 17: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/17.jpg)
Properties of Trees
A tree with n vertices has n-1 edges.
![Page 18: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/18.jpg)
Properties of Trees
A full m-ary tree with i internal vertices contains n = mi+1 vertices.
![Page 19: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/19.jpg)
Properties of Trees
A full m-ary tree with
(i) n vertices has i = (n-1)/m internal vertices and l = [(m-1)n+1]/m leaves.
(ii) i internal vertices has n = mi + 1 vertices and l = (m-1)i + 1 leaves.
(iii) l leaves has n = (ml - 1)/(m-1) vertices and i = (l-1)/(m-1) internal vertices.
![Page 20: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/20.jpg)
Proof
We know n = mi+1 (previous theorem)
and n = l+i,
n – no. vertices
i – no. internal vertices
l – no. leaves
For example, i = (n-1)/m
![Page 21: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/21.jpg)
Properties of Trees
The level of a vertex v in a rooted tree is the length of the unique path from the root to this vertex.
level 2
level 3
![Page 22: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/22.jpg)
Properties of Trees
The height of a rooted tree is the maximum of the levels of vertices.
![Page 23: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/23.jpg)
Properties of Trees
A rooted m-ary tree of height h is called balanced if all leaves are at levels h or h-1.
![Page 24: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/24.jpg)
Properties of Trees
There are at most mh leaves in an m-ary tree of height h.
![Page 25: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/25.jpg)
Properties of Trees
If an m-ary tree of height h has l leaves, then h lm log
![Page 26: Introduction to TreesAtreus Catreus Forest Graphs containing no simple circuits that are not connected, but each connected component is a tree. Theorem An undirected graph is a tree](https://reader035.vdocuments.us/reader035/viewer/2022071610/6149d56412c9616cbc690506/html5/thumbnails/26.jpg)
Proof
From previous theorem:
hlhlml mm
h loglog