Question

Additional Problem (25%) Chapters 9 and 10 discuss the different types of tree data structures that...

Additional Problem (25%)

  • Chapters 9 and 10 discuss the different types of tree data structures that you can build. For all the ones listed below, define them and discuss the differences in each. Also for each of them, discuss the advantages and disadvantages of using them to create an Abstract Data Type.

  • general tree
  • binary tree
  • binary search tree
  • heaps
  • B-trees
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

General Tree: A Tree in which each node having either 0 or more child nodes is called general tree. So we can say that a Binary Tree is a specialized case of General tree.
General Tree is used to implement File System.

1.) Binary Tree:- A binary tree is types of general tree. A general tree have maximum two children then that tree called as binary tree. Each child is designated as either left child or right child.

In simple words we can say that a binary tree is a finite set of nodes that is (i) either child is empty (ii) or consist of distinguished node called root and remaining nodes are partitioned into two disjont sets of subtree.

In the above example we can see that its have maximum two child of each root node in tree.

There are many types of binary tree like complete binary tree, extended binary tree full binary tree etc.

2,) Binary search Tree:- A binary search tree is ordered binary tree in which nodes are arranged in order. In left side all elements in its left subtree are less to the node, and all the elements in its right subtree are greater than the node.

In the above image we can see that in left side of node all elements value are less while right side greater.

3.) Binary heap tree:- A heap tree is complete binary heap tree in which the value of element insert in heap order property.

This is complete tree and this element is in sorted order.

There are two types of binary heap:-

a) Min heap : A binary heap tree in which root node value is less than child nodes.

b) max heap: A binary heap tree in which root node value is greater than child nodes.


5) B tree is self balancing binary search tree
Properties of B-Tree
1) All leaves are at same level.
.2) Every node except root must contain at least t-1 keys. Root may contain minimum 1 key.
3) All nodes may contain at most 2n– 1 keys.
4) Number of children of a node is equal to the number of keys in it plus 1.
5) B-Tree grows and shrinks from root which is unlike Binary Search Tree. Binary Search Trees grow downward and also shrink from downward.

6) A B-Tree is defined by the term minimum degree ‘n’. The value of t depends upon disk block size

Add a comment
Know the answer?
Add Answer to:
Additional Problem (25%) Chapters 9 and 10 discuss the different types of tree data structures that...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. program to use with number 1. 2. Comparing Python and Java Discussion Forum 14 days ago Use the Python...

    1. program to use with number 1. 2. Comparing Python and Java Discussion Forum 14 days ago Use the Python IDLE editor to create the source code for the "numberguess.py" pro- gram. This program is in the "Basic Python Pro- gramming" chapter in its "An Example Python Program: Guessing a Number" section. If you mistakenly create syntax errors, find and fix them. Run the program and test it with various values. Refer to the "numberguess.py Program document to see example...

  • I need help in C++ implementing binary search tree. I have the .h file for the...

    I need help in C++ implementing binary search tree. I have the .h file for the binary search tree class. I have 4 classic texts, and 2 different dictionaries. Classic Texts: Alice In Wonderland.txt A Tale of Two Cities.txt Pride And Prejudice.txt War and Peace.txt 2 different dictionaries: Dictionary.txt Dictionary-brit.txt The data structures from the standard template library can not be used.The main program should open the text file, read in the words, remove the punctuation and change all the...

  • Indexing With Trees Andrew Rosen Abstract a this lab you ate an ind r the wkd...

    Indexing With Trees Andrew Rosen Abstract a this lab you ate an ind r the wkd W Sa e (gt00.tat) althogh yos c tr w t yor ablity to pet together hiple deta trate and ots Cle ah fe to se what you t glete Your Assignment We will reate an Indertree, aspecial type of Binary Sdh Tr The IndeTree dos a bit moee than your staadand tree, as w wll to bald teatlook wee eah topic is lided in...

  • Below is a example of a ID3 algorithm in Unity using C# im not sure how...

    Below is a example of a ID3 algorithm in Unity using C# im not sure how the ID3Example works in the whole thing can someone explain the whole thing in more detail please. i am trying to use it with this data set a txt file Alternates?:Bar?:Friday?:Hungry?:#Patrons:Price:Raining?:Reservations?:Type:EstWaitTime:WillWait? Yes:No:No:Yes:Some:$$$:No:Yes:French:0-10:True Yes:No:No:Yes:Full:$:No:No:Thai:30-60:False No:Yes:No:No:Some:$:No:No:Burger:0-10:True Yes:No:Yes:Yes:Full:$:Yes:No:Thai:10-30:True Yes:No:Yes:No:Full:$$$:No:Yes:French:>60:False No:Yes:No:Yes:Some:$$:Yes:Yes:Italian:0-10:True No:Yes:No:No:None:$:Yes:No:Burger:0-10:False No:No:No:Yes:Some:$$:Yes:Yes:Thai:0-10:True No:Yes:Yes:No:Full:$:Yes:No:Burger:>60:False Yes:Yes:Yes:Yes:Full:$$$:No:Yes:Italian:10-30:False No:No:No:No:None:$:No:No:Thai:0-10:False Yes:Yes:Yes:Yes:Full:$:No:No:Burger:30-60:True Learning to use decision trees We already learned the power and flexibility of decision trees for adding a decision-making component to...

  • Recursion and Trees Application – Building a Word Index Make sure you have read and understood...

    Recursion and Trees Application – Building a Word Index Make sure you have read and understood ·         lesson modules week 10 and 11 ·         chapters 9 and 10 of our text ·         module - Lab Homework Requirements before submitting this assignment. Hand in only one program, please. Background: In many applications, the composition of a collection of data items changes over time. Not only are new data items added and existing ones removed, but data items may be duplicated. A list data structure...

  • The lab for this week addresses taking a logical database design (data model) and transforming it...

    The lab for this week addresses taking a logical database design (data model) and transforming it into a physical model (tables, constraints, and relationships). As part of the lab, you will need to download the zip file titled CIS336Lab3Files from Doc Sharing. This zip file contains the ERD, Data Dictionary, and test data for the tables you create as you complete this exercise. Your job will be to use the ERD Diagram found below as a guide to define the...

  • PPT 9' (Container Terminal Operation Management) 1. How do Seaport Container Terminals differ? 2. List the...

    PPT 9' (Container Terminal Operation Management) 1. How do Seaport Container Terminals differ? 2. List the content of the container terminal structure 3. List the Operation Pillars for container Terminal (CT) Planning. 4. How are Electronic Data Interchange (EDI) systems used in Port management? 5. What are the most important information which is checked and monitored by the Cargo Control? 6. What is COPRAR? 7. What are the two ways COPRAR Message functioning? 8. Describe the loading function. 9. Describe...

  • Assignment 5 will be way different. It will be more like what you will receive in...

    Assignment 5 will be way different. It will be more like what you will receive in a programming shop. By that I mean that some things are built for you and others you will need to create or finish. P.S. part of your grade will include: Did you add in the required files? Did you rename your project? does your linear searches work? Did you put your code in the correct modules? did you change modules that you weren't supposed...

  • This is in C. For this assignment we will write a simple database server. We will...

    This is in C. For this assignment we will write a simple database server. We will be creating a simple database of student records, so let’s describe these first. The format of a student record is as follows: typedef struct student {     char lname[ 10 ], initial, fname[ 10 ];     unsigned long SID;     float GPA; } SREC; Part One – the Server We will create a database server. The job of the server is to accept a...

  • Mountain Paths (Part 1) Objectives 2d arrays Store Use Nested Loops Parallel data structures (i.e...

    Mountain Paths (Part 1) in C++ Objectives 2d arrays Store Use Nested Loops Parallel data structures (i.e. parallel arrays … called multiple arrays in the zyBook) Transform data Read from files Write to files structs Code Requirements Start with this code: mtnpathstart.zip Do not modify the function signatures provided. Do not #include or #include Program Flow Read the data into a 2D array Find min and max elevation to correspond to darkest and brightest color, respectively Compute the shade of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT