edited by
5,099 views
21 votes
21 votes

Let $T(n)$ be the function defined by $T(1) =1, \: T(n) = 2T (\lfloor \frac{n}{2} \rfloor ) + \sqrt{n}$ for $n \geq 2$.

Which of the following statements is true?

  1. $T(n) = O \sqrt{n}$

  2. $T(n)=O(n)$

  3. $T(n) = O (\log n)$

  4. None of the above

edited by

2 Answers

Best answer
38 votes
38 votes

Answer is $B$.

using master method (case 1)

where a = 2, b = 2

O(n1/2) < O(nlogba)

O(n1/2) < O(nlog22)

edited by
0 votes
0 votes
n^(log2 2)=n

f(n)=√n

n^(log2 2) is polynomially greater then f(n)

Extended Master's theorm CASE 1:

f(n)=O(n^(logb a)-e) e>0,then T(n)=Θ(n^logb a)

T(n)=Θ(n) Option B
Answer:

Related questions

4.8k
views
5 answers
11 votes
Kathleen asked Sep 29, 2014
4,800 views
Consider the following function.Function F(n, m:integer):integer; begin if (n<=0) or (m<=0) then F:=1 else F:F(n-1, m) + F(n, m-1); end;Use the ... calls are made to the function $F$, including the original call, when evaluating $F(n, m)$.
6.8k
views
4 answers
33 votes
Kathleen asked Sep 29, 2014
6,751 views
Consider a graph whose vertices are points in the plane with integer co-ordinates $(x,y)$ such that $1 \leq x \leq n$ ... of a maximum weight-spanning tree in this graph? Write only the answer without any explanations.
5.3k
views
3 answers
22 votes
Kathleen asked Sep 29, 2014
5,272 views
The correct matching for the following pairs is ... $\text{A-4 B-1 C-2 D-3}$
38.1k
views
8 answers
64 votes
Kathleen asked Sep 29, 2014
38,140 views
Which one of the following regular expressions over $\{0,1\}$ denotes the set of all strings not containing $\text{100}$ as substring?$0^*(1+0)^*$0^*1010^*$0^*1^*01^*$0^*(10+1)^*$