Path: utzoo!attcan!uunet!yale!wald-david From: wald-david@CS.YALE.EDU (david wald) Newsgroups: comp.lang.c Subject: Re: The Halting Problem (was: YALF (yet another lint foulup)) Message-ID: <47406@yale-celray.yale.UUCP> Date: 12 Jan 89 23:15:59 GMT References: <9255@smoke.BRL.MIL> <379@lakart.UUCP> <9341@ihlpb.ATT.COM> <9371@ihlpb.ATT.COM> <2686@ficc.uu.net> <47306@yale-celray.yale.UUCP> <47372@yale-celray.yale.UUCP> Sender: root@yale.UUCP Reply-To: wald-david@CS.YALE.EDU (david wald) Organization: Yale University Computer Science Dept, New Haven CT 06520-2158 Lines: 56 In article <47372@yale-celray.yale.UUCP> Krulwich-Bruce@cs.yale.edu (Bruce Krulwich) writes: >In article <47306@yale-celray.yale.UUCP>, wald-david@cs.yale.edu (david wald) writes: >>In article <2686@ficc.uu.net> jair@ficc.uu.net (jair bobys) writes: >>>FSAs, or Finite State Automata, model Regular Languages. Since the Regular >>>Languages are a subset of the Recursively Enumerable Languages, as are all >>>other types (Context Free and Context Sensitive), and the Turing Machine >>>models Recursively Enumerable Languages, the FSAs are, loosely speaking, a >>>subset of Turing Machines (as concerns computing power). As a result of >>>this, if something is provably uncomputable by a Turing Machine, as in the >>>case of the Halting Problem, it is simply uncomputable by any machine. >> >>But the question was not whether a FSA could check the halting problem. >>Rather, it was (originally) whether it is possible to check for >>termination of C programs, and (by the third posting) whether the >>halting problem for FSAs is computable (by a TM, presumably, although >>perhaps by an FSA). It has already been pointed out that 1) the answer >>to the second question is "yes", and 2) that the two questions are not >>equivalent. > >I think that theoretically (this is COMP.THEORY, isn't it?) the two questions >are the same. On any particular machine that you run a C program there is a >finite amount of memory/storage. This is the same as a bounded-TM, in which >the TM program is different from the bound placed on the space it can use. I don't think they are. This discussion began with the question of whether it is possible to determine from a C program whether it will halt. Given that the program itself gives you no information about the size of the system it will be running on, you cannot take that bound into account. Therefore, the only meaningful deterministic interpretation of the question "does the program halt" is "does the program halt, assuming its malloc()s never fail for lack of memory." To do the analysis properly, I suppose you should treat the program as a description of a nondeterministic machine, on which each malloc() will either fail or succeed, but the point about the upper bound still holds. Either way, then, you cannot place a bound on the machine, so the halting problem for C programs remains undecidable. Taking the program together with a machine, the problem can be treated as a FSA, in which case halting is certainly decidable, if unreasonable. On the other hand, the comment I was responding to stated that the halting problem was undecidable *by* an FSA, which is true, but a different question. ============================================================================ David Wald wald-david@yale.UUCP waldave@yalevm.bitnet wald-david@cs.yale.edu "A monk, a clone and a ferengi decide to go bowling together..." ============================================================================