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=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no 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 08:15:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!news.voicenet.com!nntp.upenn.edu!msunews!not-for-mail From: "Chad R. Meiners" Newsgroups: comp.lang.ada Subject: Re: Generation of permutations Date: Fri, 10 May 2002 11:10:16 -0400 Organization: Michigan State University Message-ID: References: <5ee5b646.0205041652.63032ba6@posting.google.com> <3CDAB578.6F32339D@san.rr.com> <5ee5b646.0205091548.cd99d4c@posting.google.com> Reply-To: "Chad R. Meiners" NNTP-Posting-Host: arctic.cse.msu.edu X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com comp.lang.ada:23848 Date: 2002-05-10T11:10:16-04:00 List-Id: "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. 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.