Traditional Culture Encyclopedia - Traditional festivals - What is an algorithm? Algorithms can be divided into several types.
What is an algorithm? Algorithms can be divided into several types.
1. is finite.
The finiteness of the algorithm means that the algorithm must be able to terminate after a limited number of steps;
2. Accuracy (sex)
Every step of the algorithm must have a precise definition;
3. Enter the project
An algorithm has zero or more inputs to describe the initial situation of the operation object. The so-called zero input means that the algorithm itself has set the initial conditions;
4. Output items
The algorithm has one or more outputs to reflect the results of processing the input data. An algorithm without output is meaningless;
5. Feasibility
Any calculation step performed in the algorithm can be decomposed into basic executable operation steps, that is, each calculation step can be completed in a limited time (also called effectiveness).
classify
Algorithms can be roughly divided into basic algorithms, data structure algorithms, number theory and algebra algorithms, computational geometry algorithms, graph theory algorithms, dynamic programming and numerical analysis algorithms, encryption algorithms, sorting algorithms, retrieval algorithms, randomization algorithms, parallel algorithms, Hermite deformation models and random forest algorithms.
Second, algorithms can be roughly divided into three categories:
1. Finite deterministic algorithm
This algorithm terminates in a limited time. They may take a long time to perform the assigned tasks, but they will still be terminated within a certain period of time. The result of this algorithm often depends on the input value.
2. Limited and uncertain algorithm
This algorithm terminates in a limited time. However, for a given value (or values), the result of the algorithm is not unique or certain.
3. Infinite algorithm
That is, those algorithms will not stop running because there is no defined termination condition or the input data cannot meet the defined conditions. Usually, the infinite algorithm is caused by the failure to define the termination condition.
Elements of the algorithm:
I. Operation and operation of data objects:
The basic operations that a computer can perform are described in the form of instructions. The set of all instructions that a computer system can execute becomes the instruction system of the computer system. The basic operations and operations of computers can be divided into the following four categories:
1, arithmetic operation: addition, subtraction, multiplication and division.
2. Logical operations: OR, AND, NOT, etc.
3. Relational operations: operations such as greater than, less than, equal to and unequal to.
4. Data transmission: input, output, assignment and other operations [1]
Second, the control structure of the algorithm:
The functional structure of the algorithm depends not only on the selected operations, but also on the execution order between the operations.
- Previous article:How to defat fresh milk
- Next article:What are the ideas of each school of thought in ancient Chinese philosophy?
- Related articles
- Is it hard to make the super ricey spicy chicken nuggets?
- Step diagram of flour steamed bread, how to make flour steamed bread well.
- What Five Blessingg mentioned in Shang Shu Hong Fan refers to?
- Are there any advantages or disadvantages in practicing martial arts?
- What is the telephone number of the sales office in Rong Sheng, Zhuzhou?
- Theme scheme of May Day activities
- The girl surnamed Zheng named her.
- What are the ways to learn traditional culture?
- How to draw a yurt?
- What kind of girls do boys usually find as wives?