Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Halting Problem

Name: Anonymous 2012-12-06 21:13

Is it possible that it's just academic garbage and will never effect 99.9999999998% of programmers?

Name: Anonymous 2012-12-06 21:28

>>1
Since won't ever have a debugger which tells you with 100% certainty that your code doesn't enter infinite loops, deadlocks, or what have you, then yes, I'd say that it affects you.

Name: Anonymous 2012-12-06 22:18

>>2
I don't debug. Debugging is for losers who can't get it right the first time.

Name: Anonymous 2012-12-06 22:22

>>3
Some people write programs longer than 10 lines

Name: Anonymous 2012-12-06 22:45

>>4
But less is more!

Name: Anonymous 2012-12-06 22:46

>>4
Not Perl programmers.

Name: Anonymous 2012-12-07 3:19

While halting problem is currently unsolvable in general, there are lots and lots and lots of particular cases where it can be practically solved, yielding useful results to the programmer/scientist.

Name: Anonymous 2012-12-07 3:46

>>7
it was trivially proven that the general halting problem is undecidable. There will never be an algorithm that decides the halting problem, given the algorithm is to be run on something equivalent to a touring machine.

Name: Anonymous 2012-12-07 12:08

>>8
*Turing

Name: Anonymous 2012-12-07 13:07

>>9
What? Anal Touring invented it.

Name: Anonymous 2012-12-07 18:22

>>8
I recently watched SPJ give a talk about the future of Haskell wherein he described a scenario in which Coq was used to solve a particular case of the halting problem. Coq being a human guided theorem prover.

Name: Anonymous 2012-12-07 18:23

Cock

Name: Anonymous 2012-12-07 18:25

>>11
Coq has proved many a theorem under my guidance, if you know what I mean.

Name: Anonymous 2012-12-07 20:28

For a finite machine a halting function exists for every program.

Name: Anonymous 2012-12-07 20:29

>>14
I mean a mapping exists for every program.

Name: Anonymous 2012-12-07 20:36

>>14
But then you've limited yourself to regular languages.

Name: Anonymous 2012-12-07 21:08

>>11
Suppose for the sake of contradiction that the halting problem is solved by a computable function, H. That is, H is an algorithm that will halt on all inputs, and if A is an algorithm and <A> is its encoding, then H(<A>) will indicate if A will halt when run.

We derive a contradiction by defining a new algorithm in terms of H.

Define an algorithm M as follows:
def M(A):
  if(H(A)):
    while True: pass
  else:
    return True

Define an algorithm, N, which will evaluate M(<N>) when run. Now we ask the question, does N halt?

Suppose that N does halt. Then we have that H(<N>) will be true and the true case of the if statement will be evaluated. But in that case, the algorithm will loop forever and never halt. A contradiction.

Now suppose that N does not halt. Then we have that H(<N>) will evaluate to false and the algorithm will return true. But then the algorithm does halt. A contradiction.

Since N must halt or not halt and a contradiction was reached in both cases. We must have that the initial assumption is false. That is, there cannot exist an algorithm H that decides the halting problem.

Name: Anonymous 2012-12-08 5:53

>>17
I said that halting problem is unsolvable in general you religious math cultist asshole.  That is, you can put any program as A in your irrelevant proof and blabber about how you cannot have a general function H.  I do not contest your proof, or millions of other proofs.  However there are particular cases which can be solved, yielding practical results.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List