in Programming recategorized by
241 views
3 votes
3 votes

Which of the following statement(s) is/are true?

  1. If $\text{T1}(x) = \text{O}(f(x))$ and $\text{T2}(x) = \text{O}(g(x))$ then $\text{T1}(x) + \text{T2}(x) = \text{O} (\max(f(x), g(x))$
  2. If $\text{T}(x) = \text{O}(cf(x)),$ where $c$ is some positive constant then $\text{T}(x) = \text{O}(f(x)).$
  3. If $\text{T1}(x) = \text{O}(f(x))$ and $\text{T2}(x) = \text{O}(g(x))$ then $\text{T1}(x) \ast \text{T2}(x) = \text{O}(f(x) \ast g(x))$
  4. $2^{(n+1)} = \text{O}(2^{n} ).$
in Programming recategorized by
241 views

2 Answers

3 votes
3 votes

All options are correct.

1 comment

In option c i tried dividing both sides by 2.. eventually getting  2^n <= c*2^n-1 which is wrong., can you please point out my mistake.

0
0
1 vote
1 vote

Answer for this question are options A,B,C,D

 

Answer:

Related questions