MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

ALGORITHMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
An algorithm with an efficiency rating of
A
reasonable time
B
unreasonable time
C
Either A or B
D
None of the above
Explanation: 

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: -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-3: -Time and space complexity are the two main measures for calculating algorithm efficiency, determining how many resources are needed on a machine to process it. Where time measures how long it takes to process the algorithm, space measures how much memory is used.

Detailed explanation-4: -Overview. An algorithm is considered efficient if its resource consumption, also known as computational cost, is at or below some acceptable level. Roughly speaking, ‘acceptable’ means: it will run in a reasonable amount of time or space on an available computer, typically as a function of the size of the input.

There is 1 question to complete.