What is an algorithm?

Algorithm refers to the accurate and complete description of the solution and a series of clear instructions to solve the problem. The algorithm represents a systematic method to describe the strategy mechanism to solve the problem. That is to say, for a certain standard input, the required output can be obtained in a limited time. If an algorithm is flawed or not suitable for a problem, executing this algorithm will not solve the problem. Different algorithms may use different time, space or efficiency to accomplish the same task. The advantages and disadvantages of an algorithm can be measured by space complexity and time complexity.

The instructions in the algorithm describe a calculation. When it is running, it can start from an initial state and an initial input (which may be empty), go through a series of limited and clearly defined states, and finally produce an output and stop at a final state. The transition from one state to another is not necessarily certain. Some algorithms, including randomization algorithms, contain some random inputs.

The concept of formal algorithm stems in part from trying to solve the decision-making problem put forward by Hilbert, and then trying to define effective computability or effective method. These attempts include recursive functions proposed by Kurt G?del, Jacques Herbrand and Stephen Cole Kleene at 1930, 1934 and 1935 respectively, λ calculus proposed by Allonzot Church at 1936, and formulas proposed by Emil Leon Post at 1936. Even at present, it is usually difficult to define intuitive ideas as formal algorithms.