ALGORITHMS

An algorithm is defined as a sequence of uniquely interpretable instructions capable of solving a problem leading to the desired result within a limited time.
An algorithm must have the following properties:
- Generality: it must solve a class of problems and not a single problem.
- Finiteness: the instructions that compose it and the number of actions to be performed must be a finite number.
- Completeness: it must cover all the possible cases that may arise regarding a problem.
- Non-ambiguity: each instruction must be precisely defined and unambiguous.
- Executability: there must be a possibility that it can be executed in a limited time.
An algorithm will be said to be "correct" if, given a problem, the algorithm is able to solve it. An algorithm will be said to be "efficient" if, in addition to solving the problem, the algorithm will be able to provide the solution in a short time.
Algorithms are subdivided into:
- deterministic: when, given the same input data, for each instruction there is only one next step, as if there was only one possible way.
- non-deterministic: when, given equal input data, there is at least one instruction that admits different subsequent steps.
An algorithm can be expressed schematically. In that case it will be called a flowchart.