Big-O notation basic

One day your friend who has a tendency of lying on pretty much everything came up to you made the following three claims:

( A ) ( n + k ) x = O ( n x ) ( B ) 2 2 n + 1 = O ( 2 n ) ( C ) 2 n + 1 = O ( 2 n ) \begin{aligned} &(A) &\quad (n+k)^{ x }\quad &=&O(n^{ x }) \\ &(B) &\quad 2^{ 2n+1 }\quad &=&O(2^{ n }) \\ &(C)& \quad{ 2 }^{ n+1 }\quad &=&O({ 2 }^{ n }) \end{aligned}

For constant k k and x x , which of the statements is actually true?

A A and C C A A , B B and C C A A and B B B B and C C

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Geoff Pilling
Feb 3, 2017

For (A):

( n + k ) x n x (n+k)^x \to n^x for large x x O ( n x ) \implies O(n^x)

For (B):

2 2 n + 1 2 ] c d o t 2 2 n \quad 2^{ 2n+1 }\quad \to 2 ]cdot 2^{2n} O ( 2 2 n ) \implies O(2^{2n})

For (C):

2 n + 1 2 2 n \quad{ 2 }^{ n+1 }\quad \to 2 \cdot 2^n O ( 2 n ) \implies O(2^{n})

So, only A and B \boxed{\text{A and B}} were correct.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...