i2tutorials

Data Structures-Properties of tree

Properties of tree

 

A tree is a structure that represents the hierarchical relationships between individual elements and the nodes. It is connected to an acyclic undirected graph. One example of graphic representation of a tree is:

 

Labeled trees

A labeled tree is a tree whose vertices have been assigned unique numbers. Two labeled trees are isomorphic and the corresponding parts of them have the same label. 

Example:

 

Unlabeled trees

A labeled tree is a tree whose vertices have not been assigned unique numbers. 

 

Rooted trees

A rooted tree is a connected acyclic graph with a special node known as the root of the tree and all the edges originate from it. 

Example:

 

Binary search tree

A binary search tree is one in which the:

  1. X in left sub-tree of vertex V, Value(X) ≤ Value (V)
  2. Y in right sub-tree of vertex V, Value(Y) ≥ Value (V)

Example:

 

Reference

Properties of tree

Exit mobile version