Any person in his daily life is forced to solve a large number of different tasks. He does not think about solving some problems (“buying groceries”), while others cause difficulties and long reflections (“collecting the Rubik's cube”). All the above examples of simple and complex tasks have in common that they can be broken down into individual understandable steps. The sequence of such steps can be used as a reminder to help solve the problem. This sequence can be called an algorithm.
Of course, you can collect a Rubik's cube without a memo, simply by moving the edges in a random order. But enumerating possible options can take a long time, it will be an unproductive and suboptimal process. It is much more convenient to have a list of steps, the sequential execution of which will always lead to a positive result. It is these principles that formed such a concept as an "algorithm".
Algorithm is a set of instructions (steps) describing the order of the executor's operations to achieve the result of solving a problem in a finite number of actions.
What is a performer?
For a better understanding of the algorithm in general, it is also necessary to consider the concept of "algorithm executor". An executor in the concept of an algorithm means an abstract system capable of performing the actions described by the algorithm, as well as having a number of characteristics. As a performer, one or another technical means is most often meant (a 3D printer, a CNC machine, a computer), however, it should be understood that this is a broad concept: the performer can be, for example, a person.
However, only a system that simultaneously possesses a number of parameters can be called a performer:
- environment;
- a system of commands;
- elementary actions;
- refusals, if the execution of actions is impossible.
Algorithm properties
The restrictions imposed on the concept of "performer" lead to the fact that the very concept of "algorithm" also has a number of properties and limitations. Algorithms have become widespread precisely because of these limitations, which contribute to standardization. Among the properties of algorithms are:
- massiveness (the ability of the algorithm to remain correct for different sets of input data);
- certainty (at any step of the algorithm, the performer must have enough data to execute it);
- determinism (for the same sets of input data, the same result should be obtained);
Why are algorithms needed?
The above properties provide widespread use of the algorithms. So algorithms serve to standardize descriptions of any processes. Without algorithms, any kind of computation would be impossible, and the solution to any problem would start from scratch - even if it was solved many times. The use of algorithms allows you to quickly solve problems of the same type, reduce the time spent on finding a solution, automate the process of finding it, and also distribute the found solution in a standardized form, which means everyone can understand it.