Academic English for Computer Science by Noni Rizopoulou

Academic English for Computer Science by Noni Rizopoulou

Author:Noni Rizopoulou
Language: eng
Format: epub
Tags: eCult Hub
Publisher: Disigma
Published: 0101-01-01T00:00:00+00:00


The three constructs

Computer scientists have concluded that any program can be constructed from a combination of only three processes. These processes are the essential building blocks through which a program or an algorithm can be analyzed, debugged, or modified.

Figure 6.2 Three constructs of an algorithm

The first construct is called the sequence. The step-by-step execution of instructions lies at the heart of algorithmic thinking. This does not mean, however, that the steps involved in the process are always executed in a first-step, second-step fashion. Parallel algorithms can contain more than one sequence of steps, and the overall algorithm can comprise multiple threads of steps. These threads branch and reconnect at different processors in a multi-processor machine as they perform different parts of the overarching task.

The second construct is called the decision (selection) construct. Some problems cannot be solved with only a sequence of instructions. Decision will be reached after the testing of some required condition. If the result of the testing is true, you may proceed with the designated ordered set. If the result is false, you have to opt for a different sequence of instructions.

The third construct deals with the fact that, for some problems, the same sequence of instructions must be repeated. This characteristic of algorithmic systems leads to the repetition construct.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.