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
Implement multiple stacks in a single dimensional array. Write algorithms for various stack operations for them.

Write an algorithm to print all even numbers in descending order and draw the flowchart

If quicksort is so quick, why bother with anything else? If bubble sort is so bad, why even mention it? For that matter, why are there so many sorting algorithms? Your mission (sho

A graph G might be defined as a finite set V of vertices & a set E of edges (pair of connected vertices). The notation utilized is as follows: Graph G = (V, E) Consider the g

Define about the class invariant A class invariant may not be true during execution of a public operation though it should be true between executions of public operations. For

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

how we can convert a graph into tree

#include #include int sumFact(int numb); int calculateFactorial(int digit); main() { int numb, sumfact; do{ printf ("Enter a number 1 to 9999\n"); scanf("%


how I can easily implement the bubble,selection,linear,binary searth algorithms?