Conversion of general trees into the binary trees, Data Structure & Algorithms

By taking an appropriate example explain how a general tree can be represented as a Binary Tree.                                                                   

Conversion of general trees into the binary trees:

A general tree can be changed into an equivalent binary tree. This conversion process or technique is called the natural correspondence between general and binary trees.

The algorithm is written below:

(a) Insert the edges connecting siblings from left to right at the same level.

(b Erase all edges of a parent to its children except to its left most offspring.

(c) Rotate the obtained tree 450 to mark clearly left and right subtrees.

A general tree shown in figure (a) converted into the binary tree shown in (b)

 

1508_BTS.png

1768_BTS1.png

Posted Date: 7/10/2012 1:15:53 AM | Location : United States







Related Discussions:- Conversion of general trees into the binary trees, Assignment Help, Ask Question on Conversion of general trees into the binary trees, Get Answer, Expert's Help, Conversion of general trees into the binary trees Discussions

Write discussion on Conversion of general trees into the binary trees
Your posts are moderated
Related Questions
how to convert 12 hour format into 24 hour format using c program

Range: A Structured Type in Ruby Ruby has a numerous structured types, comprising arrays, hashes, sets, classes, streams, and ranges. In this section we would only discuss rang

explain working of siso-register to store 1011 and show timing diagram &table

1. The following is a recursive algorithm to calculate the k -th power of 2. Input k a natural number Output kth power of 2 Algorithem: If k =0then return 1 Else return 2* po

how to design a cache simulator with 4-way set associative cache

prove that n/100=omega(n)

Q. Define the sparse metrics and also explain the representation of a 4X4 matrix using linked list.         Ans: A matrix in which number of zero entries is quite h

In the present scenario of global warming, the computer hard ware and software are also contributing for the increase in the temperature in the environment and contributing for the

red black tree construction for 4,5,6,7,8,9

Indexed Sequential Files An index is inserted to the sequential file to provide random access. An overflow area required to be maintained to permit insertion in sequence. I