Home  >  Article  >  What are the five characteristics of computer algorithms?

What are the five characteristics of computer algorithms?

青灯夜游
青灯夜游Original
2020-11-23 17:35:10126931browse

The five characteristics of computer algorithms are: 1. Finiteness, the algorithm must be able to terminate after executing a limited number of steps; 2. Exactness, each step of the algorithm must have an exact definition; 3. Input terms, an algorithm has 0 or more inputs; 4. Output terms, an algorithm has one or more outputs; 5. Feasibility, each calculation step can be completed within a limited time.

What are the five characteristics of computer algorithms?

Algorithm refers to an accurate and complete description of a problem-solving solution. It is a series of clear instructions for solving problems. Algorithm represents a systematic method of description. Problem-solving strategies. In other words, it is possible to obtain the required output within a limited time for certain standardized inputs. If an algorithm is flawed or inappropriate for a problem, executing the algorithm will not solve the problem. Different algorithms may use different time, space, or efficiency to complete the same task. The quality of an algorithm can be measured by its space complexity and time complexity.

The instructions in an algorithm describe a computation that, when run, can start from an initial state and a (possibly empty) initial input, go through a limited and clearly defined series of states, and finally produce an output and Stop at a final state. The transition from one state to another is not necessarily deterministic. Some algorithms, including randomized algorithms, contain random inputs.

An algorithm should have the following five important characteristics:

  • Finiteness

    The existence of the algorithm Definiteness means that the algorithm must be able to terminate after executing a limited number of steps;

  • Definiteness

    Each step of the algorithm must have an exact definition;

  • Input

    An algorithm has 0 or more inputs to describe the initial situation of the operation object. The so-called 0 inputs refer to the algorithm itself. The initial conditions are specified;

  • Output item (Output)

    An algorithm has one or more outputs to reflect the result of processing the input data. An algorithm without an output is meaningless;

  • Effectiveness

    Any computational steps performed in an algorithm can be broken down into basic executables The operation steps, that is, each calculation step can be completed within a limited time (also called effectiveness).

The above is the detailed content of What are the five characteristics of computer algorithms?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn