题目
题目
单项选择题

Recr_12 Identify the recurrence relation for the  function shown below.

选项
A.T ( n ) = { Θ ( 1 ) if  n < 2 3 T ( n 4 ) + Θ ( l o g n ) otherwise {"version":"1.1","math":"T(n) = \begin{cases} \Theta(1) & \text{if } n < 2 \\ 3T\left(\frac{n}{4}\right) + \Theta(logn) & \text{otherwise} \end{cases} "}
B.T ( n ) = { Θ ( 1 ) if  n < 2 3 T ( n 4 ) + Θ ( n 2 l o g n ) otherwise {"version":"1.1","math":"T(n) = \begin{cases} \Theta(1) & \text{if } n < 2 \\ 3T\left(\frac{n}{4}\right) + \Theta(n^2logn) & \text{otherwise} \end{cases} "}
C.T ( n ) = { Θ ( 1 ) if  n < 2 3 T ( n 4 ) + Θ ( n 2 ) otherwise {"version":"1.1","math":"T(n) = \begin{cases} \Theta(1) & \text{if } n < 2 \\ 3T\left(\frac{n}{4}\right) + \Theta(n^2) & \text{otherwise} \end{cases} "}
D.T ( n ) = { Θ ( 1 ) if  n < 2 3 T ( n 4 ) + Θ ( n ) otherwise {"version":"1.1","math":"T(n) = \begin{cases} \Theta(1) & \text{if } n < 2 \\ 3T\left(\frac{n}{4}\right) + \Theta(n) & \text{otherwise} \end{cases} "}
E.T ( n ) = { Θ ( 1 ) if  n < 2 3 T ( n 4 ) + Θ ( n l o g n ) otherwise {"version":"1.1","math":"T(n) = \begin{cases} \Theta(1) & \text{if } n < 2 \\ 3T\left(\frac{n}{4}\right) + \Theta(nlogn) & \text{otherwise} \end{cases} "}
查看解析

查看解析

标准答案
Please login to view
思路分析
Question restatement: Identify the recurrence relation for the function shown below. Answer options to evaluate: 1) T(n) = { Θ(1) if n < 2; 3 T(n/4) + Θ(log n) otherwise } 2) T(n) = { Θ(1) if n < 2; 3 T(n/4) + Θ(n^2 log n) otherwise } 3) T(n) = { Θ(1) if n < 2; 3 T(n/4) + Θ(n^2) otherwise } 4) T(n) = { Θ(1) if n < 2; 3 T(n/4) + Θ(n) otherwise } 5) T(n) = { Θ(1) if n < 2; 3 T(n/4) + Θ(n log n) otherwise } 6) T(n) = { Θ(1) if n < 2; 3 T(n/4) + Θ(n log n) otherwise } Option 1 analysis: - This option uses Θ(log n) as the non-recursive combination cost. The dominant work outside the recursive calls would be proportional to log n. Unless there is a hidden n factor in the combine step, this is unlikely to reflect a typical divide-by-4 recurrence where the combine cost scales with n or a higher order term. Therefore, this option seems to understate the work unless the problem explicitly def......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

类似问题

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!