Computers, Programming
An algorithm is a clearly defined sequence of performing mathematical operations
Computer computing is based on the 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 block of the beginning and the end of the algorithm is represented on the scheme 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 description of the order of actions 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 the data for compliance with a 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 using another kind of algorithm - with branching.
As a rule, the solution of simple problems can be depicted in the form of a small block diagram. But if the task set before 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, pre-defined 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 represented 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.
Similar articles
Trending Now