The Gateway to Computer Science Excellence
0 votes
66 views

f(n)=O(g(n))

Which of the following is True?

  1. 2^f(n)=O(2^(g(n))
  2. log(f(n))=O(log(g(n))
  3. f(n)=O(f(n/2))
  4. f(n)=O(f(n)^2)
in Algorithms by Active (3.2k points) | 66 views
0
answer is B but can someone help me to how to solve these questions with 100% accuracy because i'm always trying to find counterexample and don't know a formal way to solve
0

@Mk Utkarsh could you please share your solution, I am a bit confused between D and B

+1
let $f(n) =\frac{1}{n}$

$(f(n))^2 = \frac{1}{n^2}$

$f(n) \neq O(\frac{1}{n^2})$

So D is incorrect and i'm not able to find counter example of B
0
B is the correct answer bro!

Please log in or register to answer this question.

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,291 answers
198,209 comments
104,889 users