In computability theory, the halting problem is a decision problem which can be stated as follows: given a description of a program and a finite input, decide whether the program finishes running or will run forever, given that input.Alan Turing proved in 1936 that a general algorithm to solve the halting problem for all possible program-input pairs cannot exist.