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
State the complex reallocation procedure Some languages provide arrays whose sizes are established at run-time and can change during execution. These dynamic arrays have an in

Phong Shading Phong shading too is based on interpolation, but instead of interpolating the colour value, it is the normal vector, which is interpolated for each point and a co

As we talked in class, a program with two integer variables is universal. Now, we consider a special form of four variableprograms. Let G = (V; E) be a directed graph, where V is a

Example: (Single rotation into AVL tree, while a new node is inserted into the AVL tree (LL Rotation)) Figure: LL Rotation The rectangles marked A, B & C are trees

What is AVL Tree? Describe the method of Deletion of a node from and AVL Tree ?

Here is a diagram showing similarities between documents; this is an actual set of physics lab assignments from a large university. Each node (square) in the graph is a doc

How branching takes place in Instruction pipeline. Explain with suitable examples

Define Complete Binary Tree Complete Binary Tree:- A whole binary tree of depth d is that strictly binary tree all of whose leaves are at level D.

Q. Describe what do you understand by the term array? How does an array vary from an ordinary variable? How are the arrays represented in the specific memory?

Consider the digraph G with three vertices P1,P2 and P3 and four directed edges, one each from P1 to P2, P1 to P3, P2 to P3 and P3 to P1. a. Sketch the digraph. b. Find the a