Computer technology is based on the principle of sequential execution of mathematical operations. By virtue of this, there is a need to compile programs that in a given order perform some specific sequence of actions. Since programs can be huge and cumbersome, a specialist often faces the need for graphical (visual) preparation of a work plan - an algorithm.
An algorithm is a clear absolute record of the sequence of mathematical operations necessary to complete a computer task. It can also be noted that it is a sequence of step-by-step implementation of the initial input data into the final result. The fact is that the goal of any program is to take sequential actions: interrogate the user (input the source data), perform specified actions with the data, and output the result.
The beginning and ending block of the algorithm is depicted in the diagram as an oval and has one output and one input, respectively. Data input and output blocks - in the form of a parallelogram. Blocks of mathematical operations are represented as rectangles and also have one input and one output.
The simplest (basic) type of procedure description is a linear algorithm. This kind of visual image of the program is performed as a step-by-step conversion of the entered external data into the final result with subsequent output to visual devices. In a linear algorithm, each subsequent operation or action begins to be performed strictly after the end of the previous operation or action.
Often there is a need to check the data for compliance with any condition. And depending on the result you need to perform one or another action. It is easy to guess that the program will be described using another version of the algorithm - with branching.
A branching algorithm is a description of a given sequence of actions, which includes checking the data for compliance with a given condition. The result of such a check can be either compliance of the data being checked with the given condition or non-compliance. And depending on the result, either one further sequence of actions is performed, or another.
The check block is depicted as a rhombus with one input and two outputs, corresponding to a positive or negative test.
As a rule, the solution of simple problems can be represented as a small block diagram. But if the task assigned to the programmer is large enough, then the algorithm depicted on paper (monitor) can turn into a bulky monster. To simplify the visual image of the sequence of actions, auxiliary structures are used.
An auxiliary algorithm is a fragment of a plan that describes a specific, predetermined sequence of actions taken separately from the basic algorithm and designed to simplify and reduce the initial size of the latter. This fragment can be used any number of times, provided that the input data is strictly consistent.
The block of the auxiliary algorithm is depicted on the diagram in the form of a rectangle with a conditional description indicating the place where you can find a schematic, that is, opened, image of the block.