COMPUTER SCIENCE AND ENGINEERING
ALGORITHMS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
reasonable time
|
|
unreasonable time
|
|
Either A or B
|
|
None of the above
|
Detailed explanation-1: -n 2^n grows asymptotically faster than 2^n.
Detailed explanation-2: -Counting the operations. One way to measure the efficiency of an algorithm is to count how many operations it needs in order to find the answer across different input sizes.
Detailed explanation-3: -Algorithms with a polynomial efficiency or lower (constant, linear, square, cube, etc.) are said to run in a reasonable amount of time. Algorithms with exponential or factorial efficiencies are examples of algorithms that run in an unreasonable amount of time.
Detailed explanation-4: -Exponential Time-O(2^n) An algorithm is said to have an exponential time complexity when the growth doubles with each addition to the input data set. This kind of time complexity is usually seen in brute-force algorithms.