Trees - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Trees

Description:

... is called an m-ary tree if every internal vertex has no more than m children. ... An m-ary tree with m = 2 is called a binary tree. ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 8
Provided by: Mathematic91
Category:
Tags: an | connected | to | trees

less

Transcript and Presenter's Notes

Title: Trees


1
Chapter 10
  • Trees

2
Tree
  • A tree is a connected graph with no simple
    circuits.
  • Theorem An undirected graph is a tree if and
    only if there is a unique simple path between
    andy two of its vertices.

3
Terminology
  • Parent
  • Child
  • Siblings
  • Ancestors
  • Descendants
  • Leaf
  • Internal vertices
  • ?

4
Definitions
  • 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.
  • 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 treee if every
    internal vertex has exadtly m children. An m-ary
    tree with m 2 is called a binary tree.
  • A rooted m-ary tree of height h is balanced if
    all leaves are at level h or h-1
  • ?

5
Properties of trees
  • A full m-ary tree with i internal vertices
    contains n mi 1 vertices.
  • A full m-ary tree with
  • n vertrices has i (n - 1)/m internal vertices
    and l (m-1)n 1/m leaves
  • i internal vertices has n mi 1 vertices and
    l (m-1)i 1 leaves,
  • l leaves has n (ml-1)/(m-1) vertices and i
    (l-1)/(m-1) internal vertices.

6
Results
  • There are at most mh leaves in a m-ary tree of
    height h.
  • If an m-ary tree of height h has l leaves, then h
    ? ?logml?. If the m-ary tree if full and
    balanced, then h ?logml?.

7
The End
  • Chapter 10
Write a Comment
User Comments (0)
About PowerShow.com