Question

(a) Construct a 2−3 tree for the list f,l,o,w,c,h,a,r,t,i,n,g. Use the alphabetical order of the letters...

(a) Construct a 2−3 tree for the list f,l,o,w,c,h,a,r,t,i,n,g. Use the alphabetical order of the letters to compare them and insert them successively starting with the empty tree.

(b) Assuming that the probabilities of searching for each of the keys (i.e., the letters) are the same, find the largest number and the average number of key comparisons for successful searches in this tree.

Full description plz

Homework Answers

Answer #1

Given:They have been asked to construct a 2-3 tree for list f,l,o,w,c,h,a,r,t,i,n,g right from empty tree we have to insert them and need to find largest number and average number of key comparisons

My answer:(a)

This is 2-3 tree for f,l,o,w,c,h,a,r,t,i,n,g

(b) The largest number of key comparison in successful search will be in the search for f,o.the average number of key comparison will be the following expression

  • 1/12 f(f)+1/12 f(l)+1/12 f(o)+1/12 f(w)+1/12 f(c)+1/12 f(h)+1/12 f(a)+1/12 f(r)+1/12 f(t)+1/12 f(i)+1/12 f(n)+1/12 f(g)

After solving this with level values we will get the answer.

Know the answer?
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
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT
Active Questions
  • GPS Watches Please submit your finalized marketing plan. Conduct a final proof read.
    asked 8 minutes ago
  • A business PhD student who lived on a naval base, looked at prices of items at...
    asked 18 minutes ago
  • 1 Consider diversity, interpersonal communication, & technology in the workplace & explain the roles they may...
    asked 26 minutes ago
  • 1 Explain how "triggers to imbalance" in work-life balance influence the imbalance & how they can...
    asked 41 minutes ago
  • Spaulding is the leading maker for basketballs in the US. Spaulding prides itself on the quality...
    asked 52 minutes ago
  • Select True or False for the following statements about Heisenberg's Uncertainty Principle.  True False  It is possible to...
    asked 1 hour ago
  • Explain why, to maximize entropy, ice must remain at 0 degrees Celsius until all of it...
    asked 1 hour ago
  • THE CODE MUST BE PYTHON superHeroes = {   "MoleculeMan": {       "age": 29,       "secretIdentity": "Dan Jukes",       "superpowers":...
    asked 1 hour ago
  • Which of the four complexes of the mitochondrial electron transfer chain does not directly contribute to...
    asked 1 hour ago
  • Police response time to an emergency call is the difference between the time the call is...
    asked 2 hours ago
  • A space vehicle is traveling at 5030 km/h relative to Earth when the exhausted rocket motor...
    asked 2 hours ago
  • You have 3 parallel production lines which supply the assembly line. Acceptable quality percentage(AQP) for lines...
    asked 2 hours ago