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.

Slides:



Advertisements
Similar presentations
Chapter 11 Trees Graphs III (Trees, MSTs) Reading: Epp Chp 11.5, 11.6.
Advertisements

Trees Chapter 11.
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.
CMPS 2433 Discrete Structures Chapter 5 - Trees R. HALVERSON – MIDWESTERN STATE UNIVERSITY.
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:
Discrete Mathematics – CIS166
Discrete Mathematics Transparency No. 8-1 Chapter 8 Trees.
CS2420: Lecture 13 Vladimir Kulyukin Computer Science Department Utah State University.
What is the next line of the proof? a). Let G be a graph with k vertices. b). Assume the theorem holds for all graphs with k+1 vertices. c). Let G be a.
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
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.
Is the following graph Hamiltonian- connected from vertex v? a). Yes b). No c). I have absolutely no idea v.
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.
Module #1 - Logic 1 Based on Rosen, Discrete Mathematics & Its Applications. Prepared by (c) , Michael P. Frank and Modified By Mingwu Chen Trees.
03/01/2005Tucker, Sec Applied Combinatorics, 4th Ed. Alan Tucker Section 3.1 Properties of Trees Prepared by Joshua Schoenly and Kathleen McNamara.
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE The trees.
Advanced Data Structures and Algorithms COSC-600 Lecture presentation-6.
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.
COSC2007 Data Structures II
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
Trees and Distance. 2.1 Basic properties Acyclic : a graph with no cycle Forest : acyclic graph Tree : connected acyclic graph Leaf : a vertex of degree.
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.
Lecture 8 Tree.
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.2 Trees  A tree is a connected graph without any cycles.
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.
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.
Discrete Structures – CNS 2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 9 Trees.
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.
Tree Representation and Terminology Binary Trees Binary Search Trees Pointer-Based Representation of a Binary Tree Array-Based Representation of a Binary.
Section10.1: Introduction to Trees
Trees.
Applied Discrete Mathematics Week 15: Trees
Graph Graphs and graph theory can be used to model:
Discrete Mathematicsq
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.
Advanced Algorithms Analysis and Design
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 10 Trees Slides are adopted from “Discrete.
Trees.
Discrete Mathematics – CIS166
Trees L Al-zaid Math1101.
Theorem 5.13: For vT‘, l’(v)= min{l(v), l(vk)+w(vk, v)}
Discrete Mathematics – CIS166
Trees 11.1 Introduction to Trees Dr. Halimah Alshehri.
And the Final Subject is…
Heaps Chapter 6 Section 6.9.
Presentation transcript:

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 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. oRooted Tree: a directed tree graph a bc d ef g h i j root Root = the unique vertex with in- degree of 0

oLevel Number: the length of the path from the root a to x oParent: for any vertex except the root a parent of x is the vertex y with an edge (y,x) oChildren: for any vertex say z with a connected edge with a parent (x,z) oSiblings: two vertices with the same parent a b c d e f g h i j k l m root children siblings parent Level # 3 Level #2

Theorem 1: A tree with n vertices has n – 1 edges. Assume that the tree is rooted. Since each vertex except the root has such a unique incoming edge, there are n – 1 nonroot vertices and hence n- 1 edges. a b c d e f Root = a Vertices = 6 Edges = 6 – 1 = 5

o Leaves: vertices with no children o Internal Vertices: vertices with children excluding the root o M-ary Tree: when each internal vertex of a rooted tree has m children o Binary Tree: when m = 2 o Height of a Rooted Tree: the length of the longest path to the root oLevel: A set distance form the root (ex: the vertices at level 3 is the set of vertices at distance 3 from the root) o Balanced Tree (“good”): if all the leaves are at levels h and h-1 Binary tree

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, and there are a total of mi children. Adding the root gives n = mi + 1

Corollary T is a m-ary tree with n vertices, consisting of i internal vertices and l leaves.  Given i, then l = (m – 1)i + 1 and n = mi + 1  Given l, then i = (l –1)/(m – 1) and n = (ml –1)/(m – 1)  Given n, then i = (n – 1)/m and l = [(m – 1)n + 1]/m n = m + l n – m = l m(i) +1 – m = l

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 5 ≤ ≥ [log 2 5] d e f g h i

Theorem 4 There are n n-2 different undirected trees on n items. Prufer Sequence: There exists a sequence (s 1, s 2,…,s n-2 ) of length n Start with the smallest leaf (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. (5,3,1,7,3,6)

Find the graph that goes to the Prufer Sequence (6,2,2,3,3,3) Set aside

Show that any tree with more than 1 vertex has at least 2 vertices of degree 1. By the corollary of theorem 2: l= ((m-1)n+1)/m Assume l=1 and n≥2 Then: l=((m-1)n+1)/m m=(m-1)n+1 (m-1)=(m-1)n 1=n

Create a Prufer Sequence from the graph: Create a graph from the Prufer Sequence: (3,3,3,3,3,5) (5,6,1,1,5,6)