Trees L Al-zaid Math1101.

Slides:



Advertisements
Similar presentations
Trees Chapter 11.
Advertisements

Chapter 9 Graphs.
Graph-02.
Chapter 10: Trees. Definition A tree is a connected undirected acyclic (with no cycle) simple graph A collection of trees is called forest.
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 Copyright M.R.K. Krishna Rao 2003 Ch 9 - Trees Definition: A tree is a connected undirected graph with no simple circuits. Since a tree cannot have a.
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
Applied Discrete Mathematics Week 12: Trees
Rooted Trees. More definitions parent of d child of c sibling of d ancestor of d descendants of g leaf internal vertex subtree root.
03/01/2005Tucker, Sec Applied Combinatorics, 4th Ed. Alan Tucker Section 3.1 Properties of Trees Prepared by Joshua Schoenly and Kathleen McNamara.
MATH 310, FALL 2003 (Combinatorial Problem Solving) Lecture 10, Monday, September 22.
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
Trees and Tree Traversals Prof. Sin-Min Lee Department of Computer Science San Jose State University.
May 5, 2015Applied Discrete Mathematics Week 13: Boolean Algebra 1 Dijkstra’s Algorithm procedure Dijkstra(G: weighted connected simple graph with vertices.
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.
7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the.
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.
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.
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.
1 12/2/2015 MATH 224 – Discrete Mathematics Formally a graph is just a collection of unordered or ordered pairs, where for example, if {a,b} G if a, b.
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.
Graphs 9.1 Graphs and Graph Models أ. زينب آل كاظم 1.
Discrete Mathematics Chapter 5 Trees.
1 Slides by Sylvia Sorkin, Community College of Baltimore County - Essex Campus Trees.
Homework #5 Due: October 31, 2000 Christine Kang Graph Concepts and Algorithms.
 Quotient graph  Definition 13: Suppose G(V,E) is a graph and R is a equivalence relation on the set V. We construct the quotient graph G R in the follow.
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.
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.
Graph Concepts and Algorithms Using LEDA By Caroline Moore and Carmen Frerichs (252a-at and 252a-ao) each graph in the presentation was created using gw_basic_graph_algorithms.
CSC 252: Algorithms October 28, 2000 Homework #5: Graphs Victoria Manfredi (252a-ad) notes: -Definitions for each of the graph concepts are those presented.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
Graph Terms By Susan Ott. Vertices Here are 7 vertices without any edges Each Vertex is labeled a different color and number.
Leda Demos By: Kelley Louie Credits: definitions from Algorithms Lectures and Discrete Mathematics with Algorithms by Albertson and Hutchinson graphics.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 10.
Section10.1: Introduction to Trees
CSC 252 Pallavi Moorthy Homework 5. 1.) Vertices, edges From cd../../handout/demo/graph_alg/gw_shortest_path.
Trees.
Applied Discrete Mathematics Week 14: Trees
Applied Discrete Mathematics Week 15: Trees
Minimization of Circuits
Graph Graphs and graph theory can be used to model:
Trees Chapter 11.
Data Structures and Algorithms
12. Graphs and Trees 2 Summary
Introduction to Trees Section 11.1.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 10 Trees Slides are adopted from “Discrete.
Spanning Trees Discrete Mathematics.
8.5 Equivalence Relations and 8.6 Partial Ordering
Connectivity Section 10.4.
Discrete Mathematics – CIS166
10.1 Graphs and Graph Models
Graphs Examples on some basic graph concepts and definitions All graphics are taken from the LEDA demos: basic_graph_algorithms, gw_shortest_paths, graphwin.
Theorem 5.13: For vT‘, l’(v)= min{l(v), l(vk)+w(vk, v)}
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.
Discrete Mathematics Lecture 13_14: Graph Theory and Tree
And the Final Subject is…
10.4 Connectivity Dr. Halimah Alshehri.
Applied Discrete Mathematics Week 13: Graphs
GRAPHS.
Presentation transcript:

Trees L Al-zaid Math1101

DEFINITION 1 A tree is a connected undirected graph with no simple circuits. Because a tree cannot have a simple circuit, a tree cannot contain multiple edges or loops. Therefore any tree must be a simple graph. L Al-zaid Math1101

Which of the graphs shown in Figure 2 are trees? EXAMPLE 1 Which of the graphs shown in Figure 2 are trees? Solution: L Al-zaid Math1101

Forests Any connected graph that contains no simple circuits is a tree. What about graphs containing no simple circuits that are not necessarily connected? These graphs are called forests and have the property that each of their connected components is a tree. L Al-zaid Math1101

THEOREM 1 An undirected graph is a tree if and only if there is a unique simple path between any two of its vertices. L Al-zaid Math1101

The Root & Rooted Trees In many applications of trees, a particular vertex of a tree is designated as the root. Because there is a unique path from the root to each vertex of the graph (by Theorem1), we direct each edge away from the root. Thus, a tree together with its root produces a directed graph called a rooted tree. L Al-zaid Math1101

Rooted Tree DEFINITION 2 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. L Al-zaid Math1101

m-ary & full m-ary DEFINITION 3 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. L Al-zaid Math1101

EXAMPLE 3 Are the rooted trees in Figure 7 full m -ary trees for some positive integer m ? Solution: L Al-zaid Math1101

Properties of Trees THEOREM 2 A tree with n vertices has n - 1 edges. THEOREM 3 A full m-ary tree with i internal vertices contains n=m.i+1 vertices. L Al-zaid Math1101

Homework Page 693 1 (a,c) 3 (a,b,c,d,e,f,g,h) 5 17 18 L Al-zaid Math1101