Slide10 Trees - D iscrete Mathematics Discrete Mathematics...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Discrete Mathematics Discrete Mathematics (2009 Spring) Trees (Chapter 10, 5 hours) Chih-Wei Yi Dept. of Computer Science National Chiao Tung University June 1, 2009
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Discrete Mathematics Chapter 10 Trees §10.1 Introduction to Trees A tree is a connected undirected graph with no simple circuits. Theorem An undirected graph is a tree if and only if there is a unique simple path between any two of its vertices.
Background image of page 2
Discrete Mathematics Chapter 10 Trees §10.1 Introduction to Trees Rooted Trees A rooted tree is a tree in which one vertex has been designated as the root and every edge is directed away from the root. d f e c g b a e a b g f d c a e f g b c d
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Discrete Mathematics Chapter 10 Trees §10.1 Introduction to Trees Terminologies of Rooted Trees If v is a vertex in T other than the root, the parent of v is the unique vertex u such that there is a directed edge from u to v . If u is the parent of v , v is called a child of u . Vertices with the same parent are called siblings . a b c d g h i k l m e f j
Background image of page 4
Discrete Mathematics Chapter 10 Trees §10.1 Introduction to Trees Terminologies of Rooted Trees (Cont.) The ancestors of a vertex other than the root are the vertices in the path from the root to this vertex, excluding the vertex itself and including the root. The descendants of a vertex v are those vertices that have v as an ancestor. A vertex of a tree is called a leaf if it has no children. Vertices that have children are called internal vertices . If a is a vertex in a tree, the subtree with a as its root is the subgraph of the tree consisting of a and its descendants and all edges incident to these descendants.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Discrete Mathematics Chapter 10 Trees §10.1 Introduction to Trees m-Ary Trees A root 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 . An ordered rooted tree is a rooted tree where the children of each internal vertex are ordered. Ordered rooted trees are drawn so that the children of each internal vertex are shown in order from left to right. In an ordered binary tree (usually called just a binary tree), if left child and the second child is called the right child . The tree rooted at the left child (or right child, resp.) of a vertex is called the left subtree (or right subtree , resp.) of this vertex.
Background image of page 6
Chapter 10 Trees §10.1 Introduction to Trees Properties of Trees Theorem A tree with n vertices has n 1 edges. Theorem
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/25/2009 for the course EE 2011 taught by Professor Denny during the Spring '09 term at National Tsing Hua University, China.

Page1 / 40

Slide10 Trees - D iscrete Mathematics Discrete Mathematics...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online