From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c42dbf68f5320193 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-10 21:04:27 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Generation of permutations Date: 10 May 2002 21:04:27 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0205102004.6142053c@posting.google.com> References: <5ee5b646.0205041652.63032ba6@posting.google.com> <3CDAB578.6F32339D@san.rr.com> <5ee5b646.0205091548.cd99d4c@posting.google.com> NNTP-Posting-Host: 205.232.38.244 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1021089867 7969 127.0.0.1 (11 May 2002 04:04:27 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 11 May 2002 04:04:27 GMT Xref: archiver1.google.com comp.lang.ada:23881 Date: 2002-05-11T04:04:27+00:00 List-Id: "Chad R. Meiners" wrote in message news:... > "Robert Dewar" wrote in message > news:5ee5b646.0205091548.cd99d4c@posting.google.com... > > To prove this, we assume the halting problem and then > > prove by equivalence to this problem. Let's take a > > bubble sort and in the middle of it, run some arbitrary > > Turing machine till it halts. But now the general > > algorithm will have to be able to determine if it > > halts (algorithm is a good sort) or does not halt > > (algorithm is junk, runs for ever). > > I just wanted you correct an error in this informal proof. The proof should > go like this. I see no error in the proof, you are somehow misreading what I wrote. Perhaps you misunderstand my short hand. When I say "assume the halting problem", I mean "assume that we have already shown that the halting problem for Turing Machines is undecidable". Was that your problem? I really can't understand your problem otherwise? The informal proof above is exactly correct, and seems quite clear to me, so if it does not seem clear to you, you are misreading it. > > Assume the existence of Is_Sort(x) (The program that decides if x is a > general sorting algorithm) > > We can construct Halt(Y,Z) (The program that decides if program Y halt on > input Z) as follows > > Build a machine x'(w) such that x' runs Y(Z) and then runs a bubble sort on > w. > > run Is_Sort(x') > > return true if x' is a sorting algorithm > return false if x' is not a sorting algorithm > > end of Halt > > Thus Halt is decidable > But Halt is undecidable thus contradiction > Ergo, Is_Sort cannot exist. > Is_Sort is undecidable. > > You should note that Robert's proof is in essence correct except that he > assumes that the wrong machine exists. This could have easily been a typo > but a very grievous one at that since the entire proof depends upon the > correct assumption.