COMPUTER SCIENCE AND ENGINEERING
ALGORITHMS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
3^n
|
|
3n
|
|
n^3
|
|
n^30
|
Detailed explanation-1: -Unreasonable Time: If the number of steps is an exponential function of the size of the input (or another function larger than any polynomial), we say that the algorithm takes an unreasonable amount of time. For an algorithm that takes 2n time, just adding 1 to the input size (n) doubles the number of steps!
Detailed explanation-2: -Reasonable algorithms grow at a polynomial rate or slower. Unreasonable algorithms grow exponentially. The time to solve an unreasonable algorithm grows very quickly even for relatively small problem sizes.
Detailed explanation-3: –It is also unreasonable because there is not an algorithm that can solve the problem in a reasonable amount of time.-We need to use a heuristic to come up with a solution that is “good enough” for most instances of the problem.