Understanding the Halting Problem: A Simple Example

  • Thread starter teng125
  • Start date
  • Tags
    Example
It should work now.In summary, there are two types of examples that can be used to illustrate the halting problem: a program that may or may not halt, such as the 3n + 1 problem, and a proof of noncomputability, which can be found on Wikipedia. The 3n + 1 problem involves writing a program that will run the algorithm until it reaches either a finite loop or the number 1. The other type of example involves iterating through all legal proofs in ZFC and determining if one of them can prove a specific conjecture. In both cases, the halting problem demonstrates the limitation of computers to solve certain problems.
  • #1
teng125
416
0
can somnbody pls give me a simple example to show halting problem

pls

thanx
 
Physics news on Phys.org
  • #2
What exactly do you want an example of? A program which we don't know whether it halts? Or are you just looking for the standard proof of the halting problem's noncomputability?
 
  • #3
a simple example program which explains a program which we don't know whether it halts and also a simple example for the standard proof of the halting problem's noncomputability

thanx
 
  • #4
Well, I don't know what an "example" would be for the standard proof of the halting problem's noncomputability. If you want the proof itself you can find it on wikipedia.

For an example of a program which may or may not halt, consider the 3n + 1 problem. (find an explanation at http://acm.uva.es/p/v1/100.html) . Now write a program which does the following:

i <- 0
start:
i <- i + 1
run the 3n + 1 algorithm starting from i until one of the following two things happen:
if the sequence entered a finite loop of numbers that repeat over and over and do not include 1, return 0
otherwise if the sequence generated by that algorithm terminated in 1, goto start

You can turn any unsolved problem in mathematics into this kind of "example" of the halting problem. For example you could do: "Iterate through all legal proofs in ZFC. If one of them is a proof for Goldbach's conjecture, return 0. Otherwise keep iterating."
 
Last edited by a moderator:
  • #5
the link above is not found,
pls re - posted

thanx
 
  • #6
http://acm.uva.es/p/v1/100.html
for some reason the parenthesis was considered part of the link
 
Last edited by a moderator:

Related to Understanding the Halting Problem: A Simple Example

1. What is the Halting Problem?

The Halting Problem is a fundamental problem in computer science that asks whether a given program will ever stop or continue to run indefinitely.

2. Why is the Halting Problem important?

The Halting Problem has important implications for computer science and the development of algorithms. It shows that there are certain problems that cannot be solved by any algorithm, no matter how complex or powerful.

3. Can the Halting Problem be solved?

No, the Halting Problem is proven to be unsolvable. This was shown by Alan Turing in 1936 and has been confirmed by subsequent research and proofs.

4. What is the significance of the "simple example" in understanding the Halting Problem?

The simple example is a small program that demonstrates the core concept of the Halting Problem. By understanding this example, one can gain a better understanding of the broader implications and applications of the problem.

5. How does the Halting Problem relate to other areas of computer science?

The Halting Problem has connections to many other areas of computer science, such as artificial intelligence, complexity theory, and program verification. It serves as a fundamental barrier for solving certain types of problems and continues to be studied and explored in various fields.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Set Theory, Logic, Probability, Statistics
2
Replies
54
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Computing and Technology
Replies
9
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
2K
  • Programming and Computer Science
Replies
1
Views
939
  • Engineering and Comp Sci Homework Help
Replies
1
Views
764
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
11
Views
625
Back
Top