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

Assignment Help:

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


Related Discussions:- Conversion of general trees into the binary trees

Advantages of the last in first out method, Materials consumed are priced i...

Materials consumed are priced in a systematic and realistic manner. It is argued that current acquisition costs are incurred for the purpose of meeting current production and sales

Find the shortest paths from bellman-ford algorithm, a) Find the shortest p...

a) Find the shortest paths from r to all other nodes in the digraph G=(V,E) shown below using the Bellman-Ford algorithm (as taught in class). Please show your work, and draw the f

Explain the method of overlapping and intersecting, Overlapping or Interse...

Overlapping or Intersecting A polygon overlaps or intersects the current background if any of its sides cuts the edges of the viewport as depicted at the top right corner of th

Cohen sutherland algorithm, Using the cohen sutherland. Algorithm. Find the...

Using the cohen sutherland. Algorithm. Find the visible portion of the line P(40,80) Q(120,30) inside the window is defined as ABCD A(20,20),B(60,20),C(60,40)and D(20,40)

space, What is Space complexity of an algorithm? Explain

What is Space complexity of an algorithm? Explain.

Steps of pre-order traversal, Pre-order Traversal The method of doing a...

Pre-order Traversal The method of doing a pre-order traversal iteratively then has the several steps(suppose that a stack is available to hold pointers to the appropriate nodes

Java, Ask consider the file name cars.text each line in the file contains i...

Ask consider the file name cars.text each line in the file contains information about a car ( year,company,manufacture,model name,type) 1-read the file 2-add each car which is repr

Explain how the shuttle sort algorithm works, Question 1 Explain how th...

Question 1 Explain how the shuttle sort algorithm works by making use of the following list of integers:11, 4, 2, 8, 5, 33, 7, 3, 1, 6. Show all the steps. Question 2

Methods, what is folding method?

what is folding method?

What is assertions, What is Assertions Introduction At every point...

What is Assertions Introduction At every point in a program, there are generally constraints on the computational state that should hold for program to be correct. For ins

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd