0

In chapter 10.3. Selection in worst - case linear time ($k$th minimum) from Introduction to Algorithms by Cormen, Leiserson and Rivest, the time complexity expected for step 5 of the algorithm presented in this chapter is said to take $T(n)=7n/10 + 6$ at worst.

From my point of view the time complexity is the one specified above because the number of elements larger than the median of all medians is at least $3n/10-6$, thus the remaining search space is $7n/10 + 6$, where $n$ is the size of input data.

How off am I?

Raphael
  • 72,336
  • 29
  • 179
  • 389
theSongbird
  • 303
  • 2
  • 15
  • 1
    I am confused by your question. Are you disagreeing or agreeing with the claim? Where/why do you think you're "off"? – ryan Oct 27 '17 at 22:17
  • @ryan I agree with the claim and I'm trying to give myself some kind of intuitive reasoning. I'm not entirely sure that my way of seeing this is plausible/ true. – theSongbird Oct 28 '17 at 07:52
  • Note that you are in all likelihood linking to a pirated copy of CLRS. (I doubt that the owner of the website has a license for world-wide distribution of CLRS.) You should instead transcribe the algorithm here so the question can stand on its own. – Raphael Oct 29 '17 at 11:33
  • Which reasoning does the book give? Have you tried a precise derivation as opposed to remaining on the intuitive level? – Raphael Oct 29 '17 at 11:34

0 Answers0