From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: f8362,6acc1b7b08ef1c27 X-Google-Thread: 109d8a,6acc1b7b08ef1c27 X-Google-Thread: 1094ba,6acc1b7b08ef1c27 X-Google-Thread: 1164f8,6acc1b7b08ef1c27 X-Google-Thread: 108f76,6acc1b7b08ef1c27 X-Google-Attributes: gidf8362,gid109d8a,gid1094ba,gid1164f8,gid108f76,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!news.net.uni-c.dk!munin.diku.dk!not-for-mail From: torbenm@app-4.diku.dk (=?iso-8859-1?q?Torben_=C6gidius_Mogensen?=) Newsgroups: comp.theory,sci.math,comp.lang.fortran,comp.sys.dec,rec.arts.sf.written Subject: Re: The Helsinki Code, Part 3 Followup-To: comp.theory Date: 19 Dec 2005 10:54:31 +0100 Organization: Department of Computer Science, University of Copenhagen Message-ID: <7z3bkp1kfc.fsf@app-4.diku.dk> References: <1134912359.751859.157810@g49g2000cwa.googlegroups.com> <0Bmpf.169029$qk4.132225@bgtnsc05-news.ops.worldnet.att.net> NNTP-Posting-Host: app-4.diku.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: munin.diku.dk 1134986083 47797 130.225.96.216 (19 Dec 2005 09:54:43 GMT) X-Complaints-To: news@diku.dk NNTP-Posting-Date: Mon, 19 Dec 2005 09:54:43 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Xref: g2news1.google.com comp.theory:4380 sci.math:104544 comp.lang.fortran:11833 comp.sys.dec:1489 rec.arts.sf.written:95230 "James Giles" writes: > Gib Bogle wrote: > > Soren Kuula wrote: > ... > >> If it's the Bible, output a 0. Stop. > >> > >> If not, output a 1, followed by the input (possibly compressed in > >> some other way, doesn't matter). > > > > OK, we have compression. Now decompression? > > I disagree. We have yet to see the compression algorithm. > There must be some means of deciding whether the input > is the Bible or some other text. I can't offhand see a way > short of having a reference copy of the Bible built into the > compression program (or available to it). > > As for decompression, I again see no possibility other than > to have a reference copy of the Bible available to the > decompression program. It is left as an exercise for the > reader to determine how to distribute these reference > copies to insure that the compression and decompression > programs use the same one. > > So, I ask again: in what way does this constitute a compression > if copies of the text are required independently of the "compressed" > data. It seems to me to require *more* space: the space required > to store the reference copy, the space taken up by the compression > and decompression programs, and the bit taken up by the so-called > "compressed" text. Some text compression algorithms do word-by-word compression using a dictionary rather than letter-by-letter compression (though they fall back on that when they encounter words not in the dictionary). Using a corpus text isn't that much different. Basically, given a large text, you can compress it in the following way: Given the text to be compressed, find the longest prefix which occurs in the bible. Then output the position of that prefix in the bible and the length of it. Given that the input text is the bible, the position is 0 and the length is the length of the bible. It isn't hard to make the compression algorithm such that it special cases on this situation and outputs "@". So, it isn't unreasonable to assume a compression program that can compress the bible to one byte. It might not do much for other texts, though. But that is true of all compresson programs: You can't compress all strings (the average size of compressed strings is at least as long as the average size of the original strings), so your algorithms must assume some similarity in the texts it needs to compress -- either similarity to a corpus of texts or self-similarity. Dictionary-based compression uses the first of these, as does Huffman-encoding using a fixed table, while LZW compression and adaptive Huffman-encoding use the latter. Torben