Talk:Halting problem/Archive 2

message: Is this really that important? All these undecidable problems seem to rely on being able to use pathological cases where calculating the answer relies on already knowing the answer (passing the halting decider to itself as an argument)? Is this of any use to non-pathological cases?
:Yes.  Rice's Theorem, which follows from the Halting theorem, says that almost no properties of a program can be deduced from static analysis.   So, to pick one of many examples, you cannot tell just from looking at the source code of programs whether they will perform out-of-bounds array accesses, or raise exceptions.  -- Dominus 06:17, 30 May 2007 (UTC)
thread_title:  Importance and Consequences 

message: A presentation of Cantor's "pair" at the very beginning is pretty daunting. Why not just describe Turing's original argument? Although he uses what looks like a diagonalization process, Turing himself rejected diagonalization as a good demonstration of his proof. What he ended up with is a mechanistic demonstration that doesn’t require knowing hardly any math at all. Other authors have struggled to present his proof  in different ways, including Minsky, who states that “The result of  the simple but delicate argument … is perhaps the most important conclusion in this book. It should be contemplated until perfectly understood.” He goes on to observe that it is similar to “Russell’s paradox. “It is also related to the argument of Cantor, that one cannot “count” the real numbers. In fact the unsolvability of the halting problem is usually demonstrated by a form of Cantor’s ‘diagonal method.’ We prefer the present form because it suppresses the ‘enumeration’ required for the diagonal method.” (page 149, Minsky, Marvin L. Computation Finite and Infinite Machines, 1967, Prentice-Hall, NJ). Minsky uses a different argument, somewhat like Turings. 
Turing himself didn’t mention “halting”; this must have come later. In fact he wants his machines do quite the opposite. For clarity and cleverness, Turing’s original proof is where I always return when I am confronted with “the halting problem.” It can be found reprinted (along with papers by Godel, Rosser, Kellene and Post) in "The Undecidable, Basic Papers On Undecidable Propositions, Unsolvable Problems And Computable Functions", edited by Martin Davis, Raven Press, N.Y. 1965. 
Turing’s proof begins with a definition of a number as “computable if its decimal can be written down by a machine.” Turing then describes a typewriter-like mechanical device consisting of a table of instructions (what we now call a finite state machine) operating on a paper tape that can move left or right one square at a time. At each “square”, the table can “scan” (read, observe) a symbol or a blank and either write a symbol or erase a symbol. Turing calls the symbols 1 and 0 “symbols of the first kind” and others—e.g. letters, other numerals, etc— “symbols of the second kind”. He calls a machine that prints on its tape only a left-hand decimal-point and 1’s and 0’s, a “computing machine”. Finally he defines as “circular” a machine that (i) “never writes down more than a finite number of symbols of the first kind” (1’s and 0’s), (ii) reaches a state (what he calls a “configuration”) from which there is no “move”, or (iii) it goes on moving and perhaps printing symbols of the second kind but no more 1’s and 0’s. 
Note this odd definition indicates that a circle-free machine is one that goes on printing 1’s and 0’s forever (!) Turing goes on to show how to reduce a table of instructions to an Arabic numeral, and this he calls the “description number” of a machine M.  He defines as “satisfactory s” such a number that results in a circle-free machine—it goes on calculating the decimal forever— and “unsatisfactory u” such a number that results in a circle. 
Turing then demonstrates the existence of a so-called "universal" machine "U", that is, a single table of instructions that can "run" the description number of any machine M present on its tape and compute the same sequences as M. [Note how close Turing was to the modern concept of a computer.]   By various arguments and demonstrations, Turing takes great pains to show that all these premises and definitions to be reasonable and true.
The proof is of the form: “the assertion that H exists and is true and H implies “u” or “s” but not both, but in reality “not u” and “not s”” implies H is not true: [H  &  (H -> (u XOR s))  &  (~ u & ~ s)] -> ~H    
 
Turing begins with an assertion of "H" (made of universal machine U and the number equivalent to a machine D) that can test any integer N on the tape and determine whether or not N represents a “circle free” machine. This H marks the number-under-test with “u” (unsatisfactory) or “s” (satisfactory) and keeps a tally “R” of how many numbers have been satisfactory. He then asserts H itself to be "circle-free"—that is, it prints a decimal point and continues to print 1’s and 0’s ad infinitum. 
What is this number computed by H? It is easiest to see with an example: Suppose H has tested numbers 1 through 1326, and so far 17 of them have been “successful”. Then if the next number, e.g. 1327, is successful, the tally R becomes “18” and H will print the 18th “figure” (i.e. 1 or 0) computed by this "successful" number. Then H continues to the next number 1328. In all cases H, either (i) delivers the verdict “u” that the number-under-test is unsatisfactory or (ii) delivers the verdict that the number-under-test is satisfactory and printing the Rth figure, and always (iii) continues onward to the next number.
 
But what happens when H encounters its own description number K?  Machine H must yield a verdict of "u" or "s" in a finite number of steps. It cannot yield “u” (unsatisfactory) because of our accepted assertion that H is circle-free— that is, it always goes on computing and printing the “figures” of a decimal number ad infinitum. Thus K must be satisfactory. But is it? What happens when H tests K?  H must observe as “the machine known as K” does what H has been doing, i.e. testing numbers 1 through K-1. But eventually H observes that “the machine known as K” arrives at K again, and again it must proceed to test the numbers 1 through K-1, AND AGAIN ... Poor H never gets to write down the R(K)-th figure. It is in a circle, and by definition H is unsatisfactory. But this contradicts our assertion, and the proof has shown that no such H actually exists.
This proof is very subtle. It requires some time to assimilate. Don't blow it off as "archaic" because it doesn’t mention “halting”. The proof has nothing whatever to do with "halting", as in "when M arrives at the HALT instruction all machine motion ceases." Turing never mentions "HALT", at least that I can find in the original paper. “So what?” you wonder? Well, how can a machine looking for HALTs not halt when it hits one?? Are authors' reinterpretations of Turing theorem as a "halting problem" actually good proofs? Suppose the machine M testing for "HALT" runs into a HALT? It must HALT. It’s just a machine. It does what it is told. It will not recover. There's no UN-HALT instruction. No watch-dog timer will knock it out of its HALT state. No uber-observer-machine will keep it going.
Turing cannot allow his machines to “halt”; they must either get into a “tight loop” or not.  So he describes machines that have only the following instructions, and no others: “R” (move tape right one square), “L” (move tape left one square), “Ps” (print symbol s in the observed tape-square), “E” (erase symbol in the observed square), “jump to instruction p if symbol s is in the observed square”, “jump to instruction q if no symbol is in observed square”, “jump to instruction r if any symbol is in observed square.” More often than not he puts two or three instructions on the same "line" together with the multiple-branch structure of a finite-state machine.    
We have to remember that this Turing machine is supposed to be a real machine. Some authors describe super-simple versions of the Turing machine somethimes called POST machines [after Emil POST's description in an important paper of Turing’s era; see similar descriptions in Penrose's Emporer's New Mind, and Martin Davis's little paper 'What is a Computation 'found in Mathematics Today, Vintage Books, 1980.] Years ago I constructed an actual, real low-power CMOS-based POST machine that used only "mark" and "blank" as symbols and only the instructions RIGHT, LEFT, PRINT, ERASE, JUMP-IF-BLANK-to-instruction-aaa-ELSE-next-instruction, JUMP-IF-MARKED-to-instruction-aaa-ELSE-next-instruction, the unnecessary but useful "JUMP-to-instruction-aaa" ... but no HALT. My machine merely achieved HALT by creating a "circle" such as "instruction #37: JUMP-to-instruction 37." This was an interesting exercise, and I was able to write and actually test the universal machine on a simple little "number" that I put on the tape.
wvbaileyWvbailey 16:50, 6 January 2006 (UTC)
thread_title:  A simpler presentation? And add a useful reference. 

message: This contains a lot of useful information but needs a lot of cleanup before adding to the article. --Robert Merkel 22:04, 5 January 2006 (UTC)
replies: text: For your information, I have read Turing's paper.  The reason why I copied your material to the talk page is that it obscures the forest for the trees.  Think of your readers and try to give them readable context instead of just core dumping every single thing you know about the halting problem, please.  --Robert Merkel 04:29, 6 January 2006 (UTC)

text: I agree that the above text has some big problems. For one, it's extremely verbose. There's nothing wrong with a detailed description of Turing's proof, but I'm sure we could condense it down using modern terminology and notation to something much more managable. The style of the above is also rather grating, especially the highly informal language, the first-person anecdotal references, and the not-so-widely-accepted need to claim that Turing was not really describing a "halting problem". Deco 04:44, 6 January 2006 (UTC)
replies: text: Just to clarify, the present discussion is in reference to the material below. --Robert Merkel 04:47, 6 January 2006 (UTC)
replies: text: Oops. That's quite a bit nicer and briefer, but definitely needs some cleanup. Maybe we can add it to the end of the article in a nonprominent position and let it stabilize for a while? Deco 04:55, 6 January 2006 (UTC)
thread_title:  Data dump removal... 

message: The premise is supposedly that this function ...
 function trouble(string s)
     if halt(s, s) == false
         return true
     else
         loop forever
... doesn't work, thus disproving the possibility of halt().
But consider, instead of halt, a function verify; like halt, it takes in a string representing a program, but instead of dealing with the difficult halting problem, all it does is discern whether a program returns true or false  (If the program returns something else, or runs forever, um... I don't care.  Let's just say it throws an exception :P ).  So, if you have a similar trouble2 function:
 function trouble2(string s)
     if verify(s, s) == false
         return true
     else
         return false
and s is a string representing trouble2, you run into the same sort of contradiction that you did with the halting proof.  Are we to assume, then, that it is impossible to predict the outcome of a program at all?  If so, why does Turing seem to focus on halting specifically? ~ Booyabazooka 23:49, 21 May 2006 (UTC)
replies: text: You are on to what is called "Rice's Theorem", which Turing actually pre-[discovered? what's the word? --- discovered, mentioned, but just blew off as a trivial outcome] -- at the end of his proof #2. But first to clear up confusion relative to a historical fact: Turing's proofs had nothing whatever to do with "halting"; his paper contained three proofs: his first proof, upon which he based his second and third proofs, had to do with whether or not a procedure/algorithm could determine if another procedure/algorithm (that calculates the decimal part of a number) would end up in a "circle" -- a never-ending loop, and thereby fail to calculate its number. Nowhere does Turing's paper mention "halting". The word is never used by Turing. The so-called "halting" proofs seem to trace back to Martin Davis, and through him to his teacher Emil Post whose paper did mention a HALT instruction.  The various halting proofs are very different from Turing's "circle" proof -- the Turing proof is very "constructive" and hence very convincing but a bit harder to understand than the simple antinomy that the "halting" proof relies upon. But it's impossible to convince anyone of this who has not read the actual Turing paper. So the myth is perpetuated about "Turing's Halting Proof". There is no such thing. wvbaileyWvbailey 21:30, 22 May 2006 (UTC)
thread_title:  problem with trouble() proof 

message: From the article: 
 Gregory Chaitin has given an undecidable problem in algorithmic information theory
 which does not depend on the halting problem. 
What is the result that this sentence alludes to?  A reference is necessary for such a vague claim. (I am afraid that the original author of that sentence mistook the problem of determing the Kolmogorov complexity of binary strings as “not depending on the halting problem”, when this problem is completely equivalent to the halting problem.) CMummert 12:03, 20 June 2006 (UTC)
replies: text: "When in doubt, cut it out" (and paste it here) until someone can verify it.wvbaileyWvbailey 13:46, 20 June 2006 (UTC)

text: I have a question for CMummert: as you maybe can see above discussions I've been trying to drill down to the ultimate (true) historical source of the "halting problem". Early this year I first came to Wikipedia with this question: why does Turing's "circle proof" seem so different than the "halting proof"? I finally went to the Dartmouth library and drilled down as far as I could go. The trail stopped at Martin Davis and perhaps Kleene in the mid-1950's (I've ordered his book). Davis in his e-mails to me references the Post paper on "Recursive Unsolvability of a Problem of Thue" (1947); this paper refers to "the same degree of unsolvability" on p. 299 (Undecidable) (last paragraph, right before the "Appendix"), So this notion of "degree" must have "been around" at least in his head, in the late 1940's. Davis told me, and another correspondent proposed (see above), that the Halting Problem's degree of unsolvability [if I said that correctly...] is less than Turing's original "circle problem" of his first proof (0-prime versus 0-prime-prime ...). I'm not familiar with the unsolvability degrees (I assume it has to do with oracles ... in fact is it O-prime (as in "Oracle-") or zero-prime? -- Davis used O not zero). Do you agree that the two (Halting versus Circle) are of different degrees of unsolvability? (Or is there something even deeper going on?) If we can back up with published evidence I believe the article needs some rework.Thanks.wvbaileyWvbailey 13:25, 21 June 2006 (UTC)
thread_title:  Reference needed 

message: 500px|thumbnail|From Minsky (1967)
The above and following are derived from Minsky's proof (1967) but it is similar to the one on the article page. Some readers may find this easier to follow -- there does seem to be a lot of fiddling with the page example. If anyone thinks such a drawing is a good thing and would want me to modify or otherwise can suggest improvements lemme know and I can rework it, split it into pieces (see example below) so they're easier to see, whatever. If anyone is worried about copyright issues -- I did not cc exactly, and attribution to Minsky should be provided. If all think its a bad idea or a waste of time, lemme know and I'll just leave it here; this is easy to do once you get the hang of it. Click on the images to see better. wvbaileyWvbailey 16:13, 30 June 2006 (UTC)
thread_title:  possible illustration 

message: Given two general presentation of a group, the problem of determining if they give the same group is undecidable, in the Godelian sense.  Viz there is no algorithm or Turing machine that can systematically explore presentations and determine whether they specify the same group in a finite amount of time (in general -- in any particular case, you just might be able to work it out). This is isomorphic to the halting problem. Do we have an article on this?  
(There is an intuitive way to look at this: for any given presentation, you can try to write out every possible string that it generates; the problem is one of trying to compare all possible strings to determine if the same set was generated. Finitely-presented groups are kind-of-like context-free grammars, so one has a similar problem there: do two different grammars generate the same set of sentences? The CFG article does briefly get into the undecidability issue.) linas 14:48, 25 July 2006 (UTC)
replies: text: This presentation-of-a-groups-stuff is way too abstract for shlepps such as meself. A google search ... any hits? Modify search until sure of your new article title. Then: BE BOLD and create your own article. Have fun! But always remember us little guys (folk without the capacity for deep abstraction -- when I read the link me eyes rolled back in me little head, yikes! where's the snooze button?  ;-) wvbaileyWvbailey 01:56, 27 July 2006 (UTC)

text: the problem of determining if they give the same group is undecidable, in the Godelian sense
that's not a particularly appropriate word choice. It's important to distinguish between two quite different senses of "undecidable"; one means "undecidable as a decision problem" (that's the one you mean); the other means "independent of some fixed formal theory". The latter is the one more usually associated with Gödel, and though I prefer to use the word "independent" for that notion, Gödel himself did use the word "undecidable" in his famous paper. --Trovatore 04:18, 27 July 2006 (UTC)
thread_title:  Undecidability of group presentations 

message: At the end of the 2nd paragraph in "Common Pitfalls", shouldn't the text be:
   ...that repeats a previous state, is known to “halt”.
instead of:
   ...that repeats a previous state, is known to “not halt”.
62.195.243.191 15:40, 12 August 2006 (UTC)
replies: text: No, the article text is correct.  If it repeats a previous state, then the continuing execution will follow the same path as before, leading to a repeat of that state again and again, in a never-halting infinite loop.  -- Four Dog Night 17:59, 12 August 2006 (UTC)
thread_title:  Error? 

message: At a certain level of cognition, Trouble is the same function whether it is calling Halt or it's counter function DoesNotHalt. Only once you get to the point where you have the cognitive ability to make an association with the inputs to certain properties that they are expected to express. If Halt only receives Trouble, it has no way of knowing that the symbol halt refers to itself and thus cannot trace into itself. I have a problem with that being the case, and I don't know why. Perhaps it has to do with the fact that if you were to pass both Trouble and a linkage table, it seems the argument changes? Hackwrench 09:58, 27 September 2006 (UTC)
thread_title:  Cognition level 

message: The article would also be more useful with a clarification of what is meant by the separation of function and algorithm and why that separation serves any purpose. Hackwrench 10:17, 27 September 2006 (UTC)
thread_title:  Separation of function and algorithm 

message: The section "Formalization of the halting problem" talks only about the formalization of the concept of an algorithm and is at best incomplete. Hackwrench 10:22, 27 September 2006 (UTC)
thread_title:  Formalization of the halting problem