Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To show that n<sup>k</sup> is O(2<sup>n</sup>), note that</p> <blockquote> <p>n<sup>k</sup> = (2<sup>lg n</sup>)<sup>k</sup> = 2<sup>k lg n</sup></p> </blockquote> <p>So now you want to find an n<sub>0</sub> and c such that for all n &ge; n<sub>0</sub>, </p> <blockquote> <p>2<sup>k lg n</sup> &le; c 2<sup>n</sup></p> </blockquote> <p>Now, let's let c = 1 and then consider what happens when n = 2<sup>m</sup> for some m. If we do this, we get</p> <blockquote> <p>2<sup>k lg n</sup> &le; c 2<sup>n</sup> = 2<sup>n</sup></p> <p>2<sup>k lg 2<sup>m</sup></sup> &le; 2<sup>2<sup>m</sup></sup></p> <p>2<sup>km</sup> &le; 2<sup>2<sup>m</sup></sup></p> </blockquote> <p>And, since 2<sup>n</sup> is a monotonically-increasing function, this is equivalent to</p> <blockquote> <p>km &le; 2<sup>m</sup></p> </blockquote> <p>Now, let's finish things off. Let's suppose that we let m = max{k, 4}, so k &le; m. Thus we have that</p> <blockquote> <p>km &le; m<sup>2</sup></p> </blockquote> <p>We also have that</p> <blockquote> <p>m<sup>2</sup> &le; 2<sup>m</sup></p> </blockquote> <p>Since for any m &ge; 4, m<sup>2</sup> &le; 2<sup>m</sup>, and we've ensured by our choice of m that m = max{k, 4}. Combining this, we get that</p> <blockquote> <p>km &le; 2<sup>m</sup></p> </blockquote> <p>Which is equivalent to what we wanted to show above. Consequently, if we pick any n &ge; 2<sup>m</sup> = 2<sup>max{4, k}</sup>, it will be true that n<sup>k</sup> &le; 2<sup>n</sup>. Thus by the formal definition of big-O notation, we get that n<sup>k</sup> = O(2<sup>n</sup>).</p> <p>I <em>think</em> this math is right; please let me know if I'm wrong!</p> <p>Hope this helps!</p>
    singulars
    1. This table or related slice is empty.
    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