• edited by
10,468 views
26 26 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

2 Answers

Best answer
50 50 votes
Answer is $B$.

using master method (case $1$)

where $a = 2, b = 2$

$O(\sqrt{n}) < O(n^ {log_b a})$

$O(\sqrt{n}) < O(n^{log_2 2})$

$O(\sqrt{n}) < O(n^1)$
• edited by
1 1 vote
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:
Position:
Show:

Related questions

19 19 votes
6 answers 6 answers
8.9k
8.9k views
Kathleen asked Sep 29, 2014
8,912 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-1, m-1); end;Use the recurrence relation $\b...
92 92 votes
11 answers 11 answers
51.7k
51.7k views
Kathleen asked Sep 29, 2014
51,677 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^*$$...
50 50 votes
4 answers 4 answers
12.2k
12.2k views
Kathleen asked Sep 29, 2014
12,205 views
Consider a graph whose vertices are points in the plane with integer co-ordinates $(x,y)$ such that $1 \leq x \leq n$ and $1 \leq y \leq n$, where $n \geq 2$ is an intege...
28 28 votes
3 answers 3 answers
8.8k
8.8k views
Kathleen asked Sep 29, 2014
8,798 views
The correct matching for the following pairs is $$\begin{array}{|ll|ll|}\hline \text{A.} & \text{All pairs shortest path} & \text{1.} & \text{Greedy} \\\hline \text{B.} ...