Please enable JavaScript.
Coggle requires JavaScript to display documents.
TREES, Binary Tree Traversals and Related Properties, Searching and…
TREES
-
-
ROOTED TREES
For every two vertices in a tree, there always exists exactly one simple path from one of theses vertices to the other.
A Rooted Tree is usually depicted by placing its root on the top, the vertices adjacent to the root below it, the vertice two edges apart form the root still below, and so on.
An obvius application of trees is for describing hierarchies, from file directories to organizational charts of enterprises.
For any vertex v in a tree T, all the vertices on the simple path from the root to that vertex are called ancestors of v. The vertex itself is usually considered its own ancestor. The set of ancestors that excludes the vertex itself is referred to as the set of proper ancestors.
If (u, v) is the last edge of the simple path from the root to vertex v, u is said to be the parent of v, and v is called a child of u.
Vertices that have the same parent are said to be siblings. A vertex with no children is called a leaf.
ORDERED TREES
Is a Rooted Tree in which all the children of each vertex are ordered. It is convenient to assume that in a tree's diagram, all the children are ordered left to right.
A binary tree can be defined as an ordered tree in which every vertex has no more than two children and each child is designated as either a left child or a right child of its parent. A binary tree may also be empty.
-
-