Foundations-of-Computer-Science practice question 7 of 15

Which of the following best defines an algorithm?

Full set: 71 questions
Answer options
A:

A. A random collection of computer parts

B:

B. A finite sequence of steps for solving a problem

Correct answer
C:

C. A type of monitor resolution

D:

D. A storage device used for backups

Correct Answer:
B. B. A finite sequence of steps for solving a problem
Explanation

An algorithm is a well-defined, step-by-step procedure or set of rules designed to solve a specific problem or perform a computation. A key characteristic of an algorithm is that it must be finite, meaning it is guaranteed to terminate after a certain number of steps. It must also be unambiguous, with each step being precisely defined, to ensure a correct and predictable outcome for a given input.

Why Incorrect

A. A random collection of computer parts: This describes computer hardware, not a logical process for problem-solving.
C. A type of monitor resolution: This is a specification for a display device, indicating the number of pixels, and is unrelated to algorithms.
D. A storage device used for backups: This describes a hardware component used for data preservation, not a computational method.

References

1. Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2009). Introduction to Algorithms (3rd ed.). MIT Press. Chapter 1, Section 1.1, "Algorithms," defines an algorithm as "any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output."

2. Knuth, D. E. (1997). The Art of Computer Programming, Volume 1: Fundamental Algorithms (3rd ed.). Addison-Wesley. Section 1.1, "Algorithms," lists five key features of an algorithm, including finiteness.

Scroll to Top