コンピュータを利用するとき,アルゴリズムは重要である。アルゴリズムの説明として,適切なものはどれか。
平成25年度 春期 ITパスポート試験 問53
This question's explanation and your answers so far.
問 53
Incorrectア
“Software that converts a program into machine language directly executable by a computer” describes a language processor (translator program) such as a compiler or an assembler. An algorithm is the processing procedure itself that you work out in your head, not a piece of software (a product), so it does not fit.
- イ
正解 The correct answer is イ. An algorithm is the processing steps for achieving a specific purpose. For example, for purposes such as “arranging data in order from smallest to largest” or “finding the target data,” an algorithm is a description — written without ambiguity and in a finite number of steps — of what processing to perform in what order so that the result is always obtained. A computer can only work exactly as it is instructed, so the flow is: first think out the steps for solving the problem (the algorithm), then organize them with a flow diagram (flowchart) or the like, and finally write them in a programming language to make a program. Choice イ, “The processing steps for making a computer accomplish a specific purpose,” states this definition just as it is, so it is appropriate. Also keep in mind that many different sets of steps can be created for the same purpose, so it is important to choose a good algorithm that needs less processing time and less memory.
Incorrectウ
“A general term for artificial languages used to instruct a computer to perform a series of operations” describes a programming language. A programming language is a tool for writing an algorithm down; it is a different thing from the algorithm itself. It helps to remember this relationship: the same algorithm has the same content no matter which programming language it is written in.
Incorrectエ
“Designing buildings, industrial products, and the like using a computer” describes CAD (Computer Aided Design). It merely states one application field of computers and does not amount to the definition of an algorithm, which expresses processing steps.
- An algorithm is a finite, clearly defined set of processing steps for achieving a specific purpose. It is expressed with a flow diagram (flowchart) or the like, and is built by combining the three basic structures: sequence, selection, and repetition.
- Distinguish the confusing terms: software that converts a program into machine language is a language processor (compiler / assembler), the artificial language for writing instructions is a programming language, and designing with a computer is CAD — none of them is an algorithm.