-->
当前位置:首页 > 题库

单选题:To solve a problem with input size $$N$$ by divide and conquer,

Luz5年前 (2021-05-10)题库1040
To solve a problem with input size $$N$$ by divide and conquer, algorithm A divides the problem into 6 subproblems with size $$N/2$$ and the time recurrences is

$$T(N) = 6T(N/2)+\Theta(N^2)$$.

Now we attempt to design another algorithm B dividing the problem into $$a$$ subproblems with size $$N/4$$ and the time recurrences is

$$T(N) = aT(N/4)+\Theta(N^2)$$.

In order to beat algorithm A, what is the largest integer value of $$a$$ for which algorithm B would be asymptotically faster than algorithm A? @[D](3)

A. 12
B. 18
C. 24
D. 36



A.12
B.18
C.24
D.36


答案:D