Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I claim that merge-sort is actually a linear time algorithm -- i.e., faster than (NlogN). Below is a sketch of my proof that the runtime

I claim that merge-sort is actually a linear time algorithm -- i.e., faster than (NlogN).

Below is a sketch of my proof that the runtime of merge-sort is actually image text in transcribed.

For simplicity, I am only proving my claim for powers of 2 (so I don't have to worry about floors and ceilings).

We already know that the runtime of merge-sort is described by the recurrence relation

image text in transcribed

image text in transcribed for image text in transcribed

I want to show that image text in transcribed. To make this Big-Oh claim, I will show that that image text in transcribed for all image text in transcribed and some constant image text in transcribed.

BASE-CASE: image text in transcribed as long as image text in transcribed clearly such a constant exists!

INDUCTIVE HYPOTHESIS: Assume the claim holds for powers of 2 less than image text in transcribed where image text in transcribed is itself a power of 2:

image text in transcribed where image text in transcribed (and so image text in transcribed).

Notice that this covers image text in transcribed

Now I have to prove the claim holds at image text in transcribed.

PROOF:

image text in transcribed from recurrence relation and image text in transcribed

image text in transcribed by I.H. applied to image text in transcribed

image text in transcribed algebra

image text in transcribed algebra

image text in transcribed because image text in transcribed is a constant and

a constant times image text in transcribed is still image text in transcribed,

since we know that "constants don't matter"!

Q.E.D.

Of course, I am wrong! The runtime of MergeSort is really image text in transcribed.

Your Job: Answer this question:

What is fundamentally wrong with my proof?

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

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions