Question

topic is Algorithms, where you see O it means big O.please solve and explain Is 2^(n+1)...

topic is Algorithms, where you see O it means big O.please solve and explain

Is 2^(n+1) = O(2^(2n)) ? Is 2^(2n) = O(2^n)?

Homework Answers

Answer #1
1)
2^(n+100) = O(2^n): Yes

Proof:
--------
f(n) = O(g(n)) means there are positive constants c and n0, such that 0 ≤ f(n) ≤ cg(n) for all n ≥ n0
2^(n+1) = O(2^n)
=>  2^(n+1) <= c(2^n)
=>  2^1*2^n <= c(2^n)
Let's assume c = 2
=>  2*2^n <= c(2^n)
=>  2*2^n <= 2(2^n)
=>  2^n <= 2^n
it's true for all n >= 1

so, 2^(n+1) = O(2^n) given c = 2 and n0 = 1

2)
2^2n = O(2^n):  No

Proof:
--------
f(n) = O(g(n)) means there are positive constants c and n0, such that 0 ≤ f(n) ≤ cg(n) for all n ≥ n0
assume 2^2n = O(2^n)
=>  2^2n <= c(2^n)
=>  2^n <= c
2^2n can be O(2^n) only if c >= 2^n

for f(n) = O(g(n)) then c must be a constant. here c >= 2^n which is not a constant
so, f(n) is not O(g(n))

hence 2^(2n) is not O(2^n)
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Given T(n)= T(n-1) + 2*n, using the substitution method prove that its big O for T(n)...
Given T(n)= T(n-1) + 2*n, using the substitution method prove that its big O for T(n) is O(n^2). 1. You must provide full proof. 2. Determine the value or the range of C.
Using Big O notation, indicate the time requirement of each of the following tasks in the...
Using Big O notation, indicate the time requirement of each of the following tasks in the worst case. Computing the sum of the first n even integers by using a for loop            [ Choose ] O(1) O(2n) O(n*log n ) O(2^n) O(log n) O(n^2) O(n) O(2) O(n^3)          Displaying all n integers in an array            [ Choose ] O(1) O(2n) O(n*log n ) O(2^n) O(log n) O(n^2) O(n) O(2) O(n^3)          Displaying all n integers in a sorted linked chain            [ Choose...
give T(n)=T(n-1)+2^n use substituiton method prove that it’s big oh O(n^2)
give T(n)=T(n-1)+2^n use substituiton method prove that it’s big oh O(n^2)
Find the big-O, big-Omega of the following functions (show steps please) a) f(n) = 5n^2 +...
Find the big-O, big-Omega of the following functions (show steps please) a) f(n) = 5n^2 + 1 b) f(n)= (nlogn+1)*(n+1)
Solve the following recurrence relation, subject to the basis. S(1) = 2 S(n) = S(n –...
Solve the following recurrence relation, subject to the basis. S(1) = 2 S(n) = S(n – 1) + 2n please explain how you solved this, thank you!
Solve the following recurrence relation, subject to the basis. S(1) = 2 S(n) =2S(n/2) + 2n
Solve the following recurrence relation, subject to the basis. S(1) = 2 S(n) =2S(n/2) + 2n
Solve the following recurrence relation, subject to the basis. S(1) = 2 S(n) =2S(n/2) + 2n
Solve the following recurrence relation, subject to the basis. S(1) = 2 S(n) =2S(n/2) + 2n
Determine where series converges or diverges: ∑(-1)n(n!)2/(2n)!
Determine where series converges or diverges: ∑(-1)n(n!)2/(2n)!
2. Write the big-O expression to describe the number of operations required for the following two...
2. Write the big-O expression to describe the number of operations required for the following two pieces of code. You need to explain your solution and show your work. (3 points) code 1: counter = 0       for (i = 1; i < n; ++i) {           for (j = 1; j < i; j++) { counter++; }    } code 2: counter = 0; for (i = 1; i < n; ++i) { for (j = 1; j <...
Solve the recurrence relation using the substitution method: 1. T(n) = T(n/2) + 2n, T(1) =...
Solve the recurrence relation using the substitution method: 1. T(n) = T(n/2) + 2n, T(1) = 1, n is a 2’s power 2. T(n) = 2T(n/2) + n^2, T(1) = 1, n is a 2’s power