Question 126
Consider the following statements :
(a) The running time of dynamic programming algorithm is always θ(ρ) where ρ is number of subproblems.
(b) When a recurrence relation has cyclic dependency, it is impossible to use that recurrence relation (unmodified) in a correct dynamic program.
(c) For a dynamic programming algorithm, computing all values in a bottom-up fashion is asymptotically faster than using recursion and memorization.
(d) If a problem X can be reduced to a known NP-hard problem. then X must be NP-hard
Which of the statement(s) is (are) true?
Answer : 2. Only (b) (a) The running time of dynamic programming algorithm is always θ(ρ) where ρ is number of subproblems.
(b) When a recurrence relation has cyclic dependency, it is impossible to use that recurrence relation (unmodified) in a correct dynamic program.
(c) For a dynamic programming algorithm, computing all values in a bottom-up fashion is asymptotically faster than using recursion and memorization.
(d) If a problem X can be reduced to a known NP-hard problem. then X must be NP-hard
Which of the statement(s) is (are) true?
| Previous | Next |
| UGC NET CS December 2019 - Question 125 | UGC NET CS December 2019 - Question 127 |
-
The running time of a dynamic program is the number of subproblems times the time per subproblem. This would only be true if the time per subproblem is O(1). False
-
Cyclic dependency is a relation between two or more modules which either directly or indirectly depend on each other to function properly. Such modules are also known as mutually recursive. So, we can’t get correct solution when we are using dynamic programming. True
- A bottom up implementation must go through all of the sub-problems and spend the time per subproblem for each. Using recursion and memoization only spends time on the subproblems that it needs. In fact, the reverse may be true: using recursion and memoization may be asymptotically faster then a bottom-up implementation. False
-
If a problem X can be reduced to a known NP-hard problem, then X must be NP-Complete. False
Hence, statement b is the only true.So, option 2 is correct answer