Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Reducing your problem to another one will give you an <em>upper</em> bound on your O(), not a lower one.</p> <p>On the other hand, if you can use any solution to your problem to implement some other algorithm with a well-known lower bound (effectively reducing that problem to yours), that may give you the lower bound you're looking for.</p> <hr> <p>Answer:</p> <p>As others have suggested, you can use the datastructure S to implement sorting:</p> <pre><code>for i in range(input): Insert(S, input[i]) for i in range(input): x = Find_Smallest_Item(S) output[i] = x Delete(S, x) </code></pre> <p>For input of size N this algorithm makes N calls to each of your three operations. However, we know that <em>any</em> general purpose sorting algorithm must have a worst case of O(N log N).</p> <p>This means there will be cases for which the <em>average</em> time of the datastructure calls in the above sort is O(log N) per call. Since that is incompatible with any T() asymptotically better than log N, you have your lower bound.</p> <p>Some notes:</p> <ul> <li><p>The kind of datastructure described in your problem is called a <a href="http://en.wikipedia.org/wiki/Priority_queue" rel="nofollow">priority queue</a>.</p></li> <li><p>Since you're trying to prove a lower bound on <em>any possible</em> priority queue, you <em>can't</em> make an assumption about the implementation. Just because a particular datastructure gives you a particular O() performance, doesn't mean some completely different datastructure couldn't be better.</p></li> <li><p>There are many priority queue datastructures that satisfy O(log N) for all calls, so this is actually a <em>tight</em> lower bound.</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload