Algorithms: Sequential, Parallel and Distributed 4-2
Overview
In Chapter 4 we discuss trees and their applications to algorithms. Trees play many important
roles in both the design and analysis of algorithms. We begin the chapter by reviewing
definitions relating to binary trees and general trees. We then discuss mathematical properties
of binary trees and 2-trees, proving various lower bound results about the depth and leaf path
length. We then review the classical implementations of binary trees and general trees such as
the array implementation of the complete binary tree, the left-right child implementation of a
Chapter Objectives
After completing the chapter the student will know:
• Basic definitions relating to binary trees, trees and forests
• Mathematical properties of binary trees and 2-trees relating to depth and leaf-path
length
• Implementations of trees and forests: array implementation of the complete binary tree,
the left-right child implementation of a binary tree, the child-sibling representation of a
general tree and the parent representation of trees and forests
• Traversals of trees: preorder, inorder, postorder
• The binary search tree ADT and it application to the dictionary problem and treesort
• The heap ADT and its application to priority queues and heapsort
• The disjoint set ADT and algorithms Union and Find. Also, the collapsing rule and the
algorithm Find
Instructor Notes
Binary search trees will be revisited again in Chapter 10 of Part II in the discussion optimal
binary search trees. While most students will be familiar with the tree ADT, they probably
will not be familiar with the mathematical properties of trees. Thus, the instructor should make