Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a) Suppose you draw the decision tree for mergesort when applied to an array of 4 elements. - What will be the exact length of

a) Suppose you draw the decision tree for mergesort when applied to an array of 4 elements. - What will be the exact length of the longest path in the tree? (Assume that the optimization described above is not being used.) - What will be the exact length of the shortest path in the tree? (Assume that the optimization described above is not being used.) - What will be the exact length of the shortest path in the tree? (Assume that the optimizationdescribed above is being used.)

b) Suppose you draw the decision tree for mergesort when applied to an array of 2k elements. What will be the exact length of the longest path in the tree? (Assume that the optimization described above is not being used.) Your answer should be a formula in which k is the only variable. Simplify your formula as much as possible and express it using standard mathematical notation. Use ^ as the exponentiation operator. Your formula cannot contain summations. Write your formula as a sum or difference of terms, with higher order terms appearing before lower order terms. Include no spaces. Indicate multiplication by adjacency, not by using a multiplication symbol. Use parentheses only where your formula would mean something else if you left them out. Here are some examples: 7k^2-4k+8 (5)2^k+3k-7

c) Suppose you draw the decision tree for mergesort when applied to an array of 2k elements. What will be the exact length of the shortest path in the tree? (Assume that the optimization described above is not being used.)

Your answer should be a formula in which k is the only variable. Simplify your formula as much as possible and express it using standard mathematical notation. Use ^ as the exponentiation operator. Your formula cannot contain summations. Write your formula as a sum or difference of terms, with higher order terms appearing before lower order terms. Include no spaces. Indicate multiplication, not by using a multiplication symbol. Use parentheses only where your formula would mean something else if you left them out. Here are some examples: 7k^2-4k+8 (5)2^k+3k-7 d) Suppose you draw the decision tree for mergesort when applied to an array of 2k elements. What will be the exact length of the shortest path in the tree? (Assume that the optimization described above is being used.) Your answer should be a formula in which k is the only variable. Simplify your formula as much as possible and express it using standard mathematical notation. Use ^ as the exponentiation operator. Your formula cannot contain summations. Write your formula as a sum or difference of terms, with higher order terms appearing before lower order terms. Include no spaces. Indicate multiplication, not by using a multiplication symbol. Use parentheses only where your formula would mean something else if you left them out. Here are some examples:

I know A is 5, 4, 3 respectively and B is (k-1)2^k+1, but I cannot figure out c or d for the life of me. I would prefer to know the answer for d if you can only answer one question. Thank you!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions