Properties of binary tree

RacksaviR 177 views 10 slides Nov 05, 2021
Slide 1
Slide 1 of 10
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10

About This Presentation

Properties of Binary tree in Data Structure


Slide Content

PROPERTIES OF BINARY TREE - RACKSAVI.R, I M.Sc Information Technology, V.V.Vanniaperumal college for women, Virudhunagar .

PROPERTIES OF TREE? Every tree has a specific root node. A root node can cross each tree node. Every child has only one parent, but the parent can have many children.

The formula for the maximum number of nodes is derived , that each node can have only two descendents. Given a height of the binary tree “H” ,the maximum number of nodes in the tree is given as N max = 2 H - 1

The minimum height of a binary tree is determined as: H min = [ log 2 N ] + 1 For instance, If there are three nodes to be stored in the binary tree (N = 3) then H min = 2.

Maximum height of tree for N nodes: H min = N Minimum height of a tree: N min = H At each level i , max possible nodes are 2 i A tree with n nodes has exactly ( n – 1 ) edges or branches.

Maximum number of nodes at level ‘l’ of a binary tree is, 2 l-1 . A binary tree with L leaves at least in levels, Log 2 L + 1 . A leaves are on same level. All internal nodes (except root node) have at least [ (m/2) ] children.

A Binary tree is a fairly well-balanced tree since all leaf nodes must be at the bottom . If height of the leaf node is 0, log2 ( n+1 ) - 1

Keys are arranged in a proper order within a node. All keys in the sub tree to the left of a key are Predecessors. All keys to the right of the key are Successors.

For any non-empty binary tree, if n is the number of nodes and e is the number of edges, then n = e + 1 . For any non-empty binary tree T, if n0 is the number of leaf nodes ( degree=0 ) & n2 is the number of internal nodes( degree=2 ), then n = n 2 + 1 .

Thank you