03/01/2005Tucker, Sec. 3.11 Applied Combinatorics, 4th Ed. Alan Tucker Section 3.1 Properties of Trees Prepared by Joshua Schoenly and Kathleen McNamara.

Slides:



Advertisements
Similar presentations
Trees Chapter 11.
Advertisements

Chapter 9 Graphs.
Chapter 10: Trees. Definition A tree is a connected undirected acyclic (with no cycle) simple graph A collection of trees is called forest.
22C:19 Discrete Structures Trees Spring 2014 Sukumar Ghosh.
1 Chapter 10 Trees. Tree Definition 1. A tree is a connected undirected graph with no simple circuits. Theorem 1. An undirected graph is a tree if and.
1 Section 9.1 Introduction to Trees. 2 Tree terminology Tree: a connected, undirected graph that contains no simple circuits –must be a simple graph:
Applied Combinatorics, 4th Ed. Alan Tucker
Discrete Mathematics – CIS166
Discrete Mathematics Transparency No. 8-1 Chapter 8 Trees.
04/12/2005Tucker, Sec Applied Combinatorics, 4 th Ed. Alan Tucker Section 4.4 Algorithmic Matching Prepared by Joshua Schoenly and Kathleen McNamara.
Section 3.1 Properties of Trees Sarah Graham. Tree Talk: Vocabulary oTree: a tree is a special type of graph that contains designated vertex called a.
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
02/01/05Tucker, Sec Applied Combinatorics, 4th Ed. Alan Tucker Section 1.3 Edge Counting Prepared by Joshua Schoenly and Kathleen McNamara.
1/25/2005Tucker, Sec Applied Combinatorics, 4th Ed. Alan Tucker Section 1.2 Isomorphism Prepared by Jo Ellis-Monaghan.
A tree is a simple graph satisfying: if v and w are vertices and there is a path from v to w, it is a unique simple path. a b c a b c.
Rooted Trees. More definitions parent of d child of c sibling of d ancestor of d descendants of g leaf internal vertex subtree root.
MATH 310, FALL 2003 (Combinatorial Problem Solving) Lecture 11, Wednesday, September 24.
3/29/05Tucker, Sec Applied Combinatorics, 4th Ed. Alan Tucker Section 4.2 Minimal Spanning Trees Prepared by Amanda Dargie and Michele Fretta.
Module #1 - Logic 1 Based on Rosen, Discrete Mathematics & Its Applications. Prepared by (c) , Michael P. Frank and Modified By Mingwu Chen Trees.
KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE The trees.
Let G be a pseudograph with vertex set V, edge set E, and incidence mapping f. Let n be a positive integer. A path of length n between vertex v and vertex.
May 5, 2015Applied Discrete Mathematics Week 13: Boolean Algebra 1 Dijkstra’s Algorithm procedure Dijkstra(G: weighted connected simple graph with vertices.
BCT 2083 DISCRETE STRUCTURE AND APPLICATIONS
Section 10.1 Introduction to Trees These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 6 th ed., by Kenneth.
May 1, 2002Applied Discrete Mathematics Week 13: Graphs and Trees 1News CSEMS Scholarships for CS and Math students (US citizens only) $3,125 per year.
Foundations of Discrete Mathematics
Tree A connected graph that contains no simple circuits is called a tree. Because a tree cannot have a simple circuit, a tree cannot contain multiple.
Copyright © Cengage Learning. All rights reserved. CHAPTER 10 GRAPHS AND TREES.
CSCI 115 Chapter 7 Trees. CSCI 115 §7.1 Trees §7.1 – Trees TREE –Let T be a relation on a set A. T is a tree if there exists a vertex v 0 in A s.t. there.
Module #19: Graph Theory: part II Rosen 5 th ed., chs. 8-9.
Discrete Structures Lecture 12: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
5.5.2 M inimum spanning trees  Definition 24: A minimum spanning tree in a connected weighted graph is a spanning tree that has the smallest possible.
Trees – Chapter 9 Slides courtesy of Dr. Michael P. Frank University of Florida Dept. of Computer & Information Science & Engineering.
5.5.3 Rooted tree and binary tree  Definition 25: A directed graph is a directed tree if the graph is a tree in the underlying undirected graph.  Definition.
Discrete Structures Trees (Ch. 11)
Chap 8 Trees Def 1: A tree is a connected,undirected, graph with no simple circuits. Ex1. Theorem1: An undirected graph is a tree if and only if there.
5.5.2 M inimum spanning trees  Definition 24: A minimum spanning tree in a connected weighted graph is a spanning tree that has the smallest possible.
Trees : Part 1 Section 4.1 (1) Theory and Terminology (2) Preorder, Postorder and Levelorder Traversals.
Discrete Mathematics Chapter 5 Trees.
1 Slides by Sylvia Sorkin, Community College of Baltimore County - Essex Campus Trees.
Chapter 10: Trees A tree is a connected simple undirected graph with no simple circuits. Properties: There is a unique simple path between any 2 of its.
Data Structures Lakshmish Ramaswamy. Tree Hierarchical data structure Several real-world systems have hierarchical concepts –Physical and biological systems.
CHAPTER 11 TREES INTRODUCTION TO TREES ► A tree is a connected undirected graph with no simple circuit. ► An undirected graph is a tree if and only.
2/25/2016Tucker, Sec Applied Combinatorics, 4 th Ed. Alan Tucker Section 2.2 Hamilton Circuits Prepared by: Nathan Rounds and David Miller.
Discrete Structures – CNS 2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 9 Trees.
Chapter 6 – Trees. Notice that in a tree, there is exactly one path from the root to each node.
1 Trees : Part 1 Reading: Section 4.1 Theory and Terminology Preorder, Postorder and Levelorder Traversals.
Discrete Mathematics Chapter 10 Trees.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
Chapter 11. Chapter Summary Introduction to Trees Applications of Trees (not currently included in overheads) Tree Traversal Spanning Trees Minimum Spanning.
Section10.1: Introduction to Trees
Trees.
Applied Discrete Mathematics Week 15: Trees
Graph Graphs and graph theory can be used to model:
Trees Chapter 11.
Source Code for Data Structures and Algorithm Analysis in C (Second Edition) – by Weiss
12. Graphs and Trees 2 Summary
Introduction to Trees Section 11.1.
Applied Combinatorics, 4th Ed. Alan Tucker
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 10 Trees Slides are adopted from “Discrete.
Discrete Mathematics – CIS166
Trees L Al-zaid Math1101.
Trees 11.1 Introduction to Trees Dr. Halimah Alshehri.
A Introduction to Computing II Lecture 13: Trees
Discrete Mathematics – CIS166
Trees 11.1 Introduction to Trees Dr. Halimah Alshehri.
And the Final Subject is…
Applied Combinatorics, 4th Ed. Alan Tucker
Heaps Chapter 6 Section 6.9.
Presentation transcript:

03/01/2005Tucker, Sec Applied Combinatorics, 4th Ed. Alan Tucker Section 3.1 Properties of Trees Prepared by Joshua Schoenly and Kathleen McNamara

03/01/2005Tucker, Sec Definitions  Tree: a tree is a special type of graph that contains designated vertex called a root so that there is a unique path from the root to any other vertex in the tree. Equivalently, a tree graph contains no circuits.  Rooted Tree: a directed tree graph with all edges directed away from the root a bc d ef g h i j Root = the unique vertex with in- degree of 0

03/01/2005Tucker, Sec a b c d e f g h i j k Parent of g and h Children of d Siblings of each other Level 1 Level 2 Level 3  Level Number: the length of the path from the root a to x  Parent: the vertex y is a parent of x if they are connected by an edge  Children: the vertex y is a child of x if they are connected by an edge  Siblings: two vertices with the same parent

03/01/2005Tucker, Sec Theorem 1 A tree with n vertices has n – 1 edges. Choose a root, and direct all edges away from the root. Since each vertex except the root has a single incoming edge, there are n –1 non-root vertices and hence n –1 edges. Root = a Proof b c d e f a a b c de f

03/01/2005Tucker, Sec  Leaves: vertices with no children  Internal Vertices: vertices with children  m-ary Tree: when each internal vertex of a rooted tree has m children  Binary Tree: when m = 2 Definitions Leaves Internal vertices

03/01/2005Tucker, Sec  Height of a Rooted Tree: the length of the longest path to the root.  Balanced Tree (“good”): if all the leaves are at levels h and h-1, where h is the height of the tree. Definitions h h-1 Height (h) is 3

03/01/2005Tucker, Sec Theorem 2 If T is an m-ary tree with n vertices, of which i vertices are internal, then, n = mi + 1. Proof Each vertex in a tree, other than the root, is the child of a unique vertex. Each of the i internal vertices has m children, so there are a total of mi children. Adding the root gives n = mi + 1 m = 3 i = 3 n = 10

03/01/2005Tucker, Sec Corollary T is a m-ary tree with n vertices, consisting of i internal vertices and l leaves. Note: The proof of the corollary’s formulas follow directly from n=mi+1 (Theorem 2) and the fact that l + i = n

03/01/2005Tucker, Sec Example 1 If 56 people sign up for a tennis tournament, how many matches will be played in the tournament? Setting up as a binary tree, there will be 56 leaves and i matches with two entrants entering a match. Shortened Graph Entrants Matches

03/01/2005Tucker, Sec Theorem 3 T is a m-ary tree of height h with l leaves.  l ≤ m h and if all leaves are at height h, l = m h  h ≥ `é log m l ù and if the tree is balanced, h = é log m l ù a b c d e f g h i l = 5 h = 3 m = 2

03/01/2005Tucker, Sec There exists a sequence (s 1, s 2,…,s n-2 ) of length n-2. This is called a Prufer Sequence Start with the leaf of the smallest label (2). Its neighbor is 5. 5 = s 1 Delete the edge. Take the next smallest leaf (4). Its neighbor is 3. 3 = s 2 Delete the edge. Continue like this obtaining, (5,3,1,7,3,6) Note: There is a 1:1 correspondence to the Prufer Sequence and the tree Prufer Sequence 4

03/01/2005Tucker, Sec Example Find the graph that has the Prufer Sequence (6,2, 3, 3)

03/01/2005Tucker, Sec Theorem 4 There are n n-2 different undirected trees on n items Two different trees on 8 items.

03/01/2005Tucker, Sec Proof of Theorem 4 There are n n-2 different undirected trees on n items. We showed there is a 1-to-1 correspondence between trees on n items and Prufer sequences of length n-2. Count Prufer sequences. This means there are n n-2 different Prufer sequences. Since each tree has a unique Prufer Sequence, there are n n-2 different trees. (__, __, __, __, __, __) n choices …

03/01/2005Tucker, Sec Create a Prufer Sequence from the graph: Class Problem

03/01/2005Tucker, Sec Create a Prufer Sequence from the graph: (5,6,1,1,5,6) Solution