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
What are the conditions under which sequential search of a list is preferred over binary search?

algorithm and flow chart to find weather the given numbers are positive or negative or neutral

Diffuse Illumination Diffuse illumination means light that comes from all directions not from one particular source. Think about the light of a grey cloudy day as compared to

floyd warshall algorithm

Q. Establish the usage of linked lists for polynomial manipulation.                                       Ans. Usag e of Linked List for Polynomial Manipulation. Link

write pseudocode to implement a queue with two stacks

Double ended queues are implemented along doubly linked lists. A doubly link list can traverse in both of the directions as it contain two pointers namely left pointers and righ

Use a random number generator to create 10 numbers between 1 and 1000 and store them in 2 different arrays.  The first array should contain the numbers as they are generated.  The

if two relations R and S are joined, then the non matching tuples of both R and S are ignored in

Threaded Binary Tree:- By changing the NULL lines in a binary tree to special links known as threads, it is possible to perform traversal, insertion and deletion without using