Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Can Someone please help me with this please:

Task:

The purpose of this assignment is to empirically measure attributes for binary search trees.

Steps:

Create a program that will build a binary search tree (BST) by adding new elements one at a time.

You may use whatever data structure you wish for this BST.

For any node in the BST, the left subtree contains keys <= the root, and the right subtree keys > the root.

Predict the average number of nodes you must visit to determine if a given key is in a BST consisting of 100 nodes, where keys are integers between 1 and 100, based on a tree's height.

Use your program to create 100, 100 node BSTs by randomly adding integers between 1 and 100.

For each of these 100, randomly generated BSTs, determine (a) its height, and (b) the average number of nodes visited to determine if a key is in the tree.

Search for all values between 1 and 100.

Create, using Excel, a graph plotting tree height versus average search length, using both your predicted and empirical data.

Create a Word doc comparing your predicted average search lengths with your empirically derived values. If they differ, discuss why. If they are the same, discuss why.

Submit:

Source code

Excel workbook

Word doc summarizing experimental findings

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93122256

Have any Question?


Related Questions in Computer Engineering

You have a deck of magic the gathering cards with 60 cards

You have a deck of Magic the Gathering cards with 60 cards total. In the deck you have 20 Mana cards, 18 Spells, 3 Artifacts, 12 Creatures, 6 Enchantments and 1 Planes Walker. What is the probability that you draw 2 arti ...

The switch statementhere is the question in its entirety

The switch statement Here is the question in its entirety, but the actual problem is at the end. I just felt that I would give an overview of what I am asking. The program has to be in c++ (.cpp) and must compile as such ...

The socket example of pages 130 and 131 of the os-book

The Socket example of pages 130 and 131 of the OS-Book (Abraham Silberschatz 8th edition) is the basis of this problem. However, instead of using the Loopback IP (127.0.0.1), which emulates the socket connection on the h ...

Question 1 write data to the file the program should ask

Question : 1. Write data to the file The program should ask user for an integer and write that integer to a file. Save the program as Part1.cpp. 2. Read the data from the file The program should read the data from the fi ...

Two one-cent coins were weighed on an electronic balance of

Two one-cent coins were weighed on an electronic balance of high sensitivity, and an average mass per coin of 2.4918 g was obtained from the data. How could you use the same number of significant figures as the value obt ...

Can someone help me with this java problem and explain the

Can someone help me with this Java problem and explain the parts please! Write a method "totalDays" that takes three integer arguments (number of weeks, number of days, number of hours) and returns the total real number ...

There has been a substantial interest in predictability of

There has been a substantial interest in predictability of stock return in recent years. For example, DeBondt and Thaler (1985, 1987) report that long-term past losers (three- to five-years) outperform long-term past win ...

Suppose that you are given a sorted list of n elements

Suppose that you are given a sorted list of n elements followed by f(n) randomly ordered elements. How would you sort the entire list if a. f(n) = 2? b. f(n) = vn? c. How large can f(n) be for the entire list to be sorte ...

Which will take fewer flips on average successively

Which will take fewer flips, on average: successively flipping a quarter until the pattern HHT appears, i.e., until you observe two successive heads followed by a tails; or successively flipping a quarter until the patte ...

Question the subnet mask for a class c network is

Question : The subnet mask for a class C network is 255.255.255.248. How many subnetworks are available? How many assignable hosts ids per subnet? The response must be typed, single spaced, must be in times new roman fon ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As