An algorithm is a clearly defined sequence of performing mathematical operations
Computer hardware is based onthe principle of sequential execution of mathematical operations. Because of this, it becomes necessary to compile programs that perform certain specific sequences of actions in a given order. Since programs can be huge and cumbersome, a specialist often encounters the need for a graphic (visual) drawing up of a work plan - an algorithm.
The start and end block of the algorithm isscheme in the form of an oval and has one output and one input, respectively. Blocks input and output data - in the form of a parallelogram. Blocks of mathematical operations are represented in the form of rectangles and also have one input and one output.
The simplest (basic) type of order descriptionaction is a linear algorithm. This version of the visual image of the program is performed as a step-by-step transformation of the input 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 verify dataon the correspondence to any condition. And depending on the result you need to perform this or that action. It is not difficult to guess that the program will be described with the help of another version of the algorithm - with branching.
As a rule, the solution of simple problems can beto depict in the form of a small block diagram. But if the task assigned to the programmer is sufficiently large, then the algorithm depicted on the paper (monitor) can turn into a bulky monster. To simplify the visualization of the sequence of actions, auxiliary structures are used.
The auxiliary algorithm is a fragment of the plan,describing a certain, predetermined sequence of actions, taken apart from the basic algorithm and designed to simplify, reduce the original size of the latter. This fragment can be used any number of times provided that the input data are strictly matched.
The block of the auxiliary algorithm is depicted on the diagram in the form of a rectangle with a conditional description pointing to the place in which one can find a schematic, that is, an open, image of the block.