Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Algorithem & Data Structure help

  1. Jun 7, 2008 #1
    problem: Show how to find the t-th largest element (t - 1 elements are larger and
    n - t elements are smaller) in the set of n elements in (n - t) + (t - 1)log (n - t + 2) comparisons.

    I've tried as hard as I can to solve this, and I came to relalize that i need to divide the array into two groups, one of (n-t+1) and the other to (t-1) elements.
    i can find the largest element in the (n-t+1) group, which will be the t-th largest element of all.
    what i cant understand is what should i do with the log expression. what is the +2 element inside the brackets stands for...

    will appriciate an answer, thanks.
     
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted