Abstract data type-tree, Data Structure & Algorithms

Assignment Help:

Definition: A set of data values & related operations that are accurately specified independent of any particular implementation.

As the data values and operations are described with mathematical precision, instead of as an implementation in a computer language, we might reason about effects of the operations, relationship to other abstract data types, whether a programming language implements the particular data type, etc.

Regard the given abstract data type:

Structure data tree

type Tree = nil | fork (Element , Tree , Tree)

Operations:

null : Tree -> Boolean leaf : Tree -> Boolean

fork : (Element , Tree , Tree) -> Tree

left : Tree -> Tree                 // It illustrated the properties of tree that left of a tree is also a tree.

right: Tree -> Tree contents: Tree -> Element height (nil) = 0 |

height (fork(e,T,T')) = 1+max(height(T), height(T'))

weight (nil) = 0 |

weight (fork(e,T,T')) = 1+weight(T)+weight(T')

2310_ABSTRACT DATA TYPE-TREE.png                       

 Figure: A binary tree


Related Discussions:- Abstract data type-tree

Data mining assignment, The assignment aims at consolidating your knowledge...

The assignment aims at consolidating your knowledge on data mining techniques and developing practical skills through solving a problem of transcription factor binding sites recogn

Determine the term - loops, Loops There are 3 common ways of performin...

Loops There are 3 common ways of performing a looping function: for ... to ... next, while ... endwhile and repeat ... until The below example input 100 numbers and find

Algorithm to insert a node in between any two nodes, Q. Write down an algor...

Q. Write down an algorithm to insert a node in between any two nodes in a linked list         Ans. Insertion of a the node after the given element of the listis as follows

Road transport booking system, what algorithms can i use for the above titl...

what algorithms can i use for the above title in my project desing and implmentation of road transport booking system

Explain the interfaces in ruby, Explain the Interfaces in Ruby Recall...

Explain the Interfaces in Ruby Recall that in object-oriented programming, an interface is a collection of abstract operations that cannot be instantiated. Even though Ruby i

Explain th term input and output- pseudocode, Explain th term input and ou...

Explain th term input and output-  Pseudocode Input and output indicated by the use of terms input number, print total, output total, print "result is" x and so on.

Show that towers of hanoi is o (2n), Question 1 Discuss the advantages of ...

Question 1 Discuss the advantages of implementation checks preconditions Question 2 Write a ‘C' program to search for an item using binary search Question 3 Show that To

Calculus, basic calculation for algorith.

basic calculation for algorith.

Balance theorem, Question 1 Discuss the following theorems with respect to...

Question 1 Discuss the following theorems with respect to Splay Trees- Balance Theorem Dynamic Finger Theorem   Question 2 Write a C program for implementation

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