home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / compress / 2793 < prev    next >
Encoding:
Internet Message Format  |  1992-07-23  |  2.9 KB

  1. Path: sparky!uunet!portal!cup.portal.com!ts
  2. From: ts@cup.portal.com (Tim W Smith)
  3. Newsgroups: comp.compression
  4. Subject: Re: PERPETUAL MOTION
  5. Message-ID: <62692@cup.portal.com>
  6. Date: Thu, 23 Jul 92 21:42:17 PDT
  7. Organization: The Portal System (TM)
  8. References: <35610@sdcc12.ucsd.edu> <62020@cup.portal.com>
  9.   <7486@public.BTR.COM>
  10. Lines: 59
  11.  
  12. > I have not seen any counterexample to the primary refutation, that if
  13. > you consider all files of size less then or equal to N bits, you have a
  14. > certain number of different possible files, and if you compress them
  15. > ALL using a single method, either all will end up exactly the same
  16. > size, or at least one of them will get larger, or two different files
  17. > will compress to the same result meaning the method isn't reversible,
  18. > or the method simply will refuse to work on at least one file.
  19.  
  20. Most impossible compressors claim to only work on files past a certain
  21. size.  Let that size be M bits.  Let F(X) be the total number of files
  22. of X bits or less.  Let f(X) be the total number of files of X bits.
  23.  
  24. Assume we have some ordering of all files.  With each file, associate
  25. a number, which is the position of the file in this ordering relative
  26. to the first file of the same size.
  27.  
  28. Now consider the following compressor.  For files of length M+1, the
  29. first F(M) of them are mapped to files of length M or less.  The rest
  30. of the files of length M+1 are mapped to the files whose number is
  31. F(M) less than theirs.
  32.  
  33. This leaves us F(M) files of length M+1 that do not have files mapped
  34. onto them.
  35.  
  36. We can now do a similar thing for files of length M+2.  We map the
  37. first F(M) onto the files of length M+1 that have not been mapped to,
  38. and them map the rest to files whose number is F(M) less.
  39.  
  40. This leaves us F(M) files of length M+2 that have not been mapped
  41. onto.
  42.  
  43. Repeat forever.  At each step, there are F(M) files that compress, and
  44. applying this to a file of size N at most f(N)/F(M) times will compress
  45. it.
  46.  
  47. I don't recall all the WEB claims, but I think that this satisfies them
  48. in spirit.
  49.  
  50. Actually, the above is needlessly complex.  Arrange all possible files
  51. by increasing size.  Call the position of a given file on this list
  52. the index of that file.  "Compress" a file by mapping it to the file
  53. whose index is one less.  No file gets bigger, some files get smaller,
  54. and repeated application to a given file will make it smaller.
  55.  
  56. The above is the kind of thing I was trying to capture with the
  57. "subtract one" compressor.  I screwed up on the leading zeros,
  58. though.
  59.  
  60. Note that the above is completely useless as a real compressor.
  61. The fraction of files actually compressed by a single pass goes
  62. to zero as the file size goes up.  If you apply it repeatedly, you
  63. will use as much space to remember how many times you applied it
  64. as you save by using it.  And the compression ratio goes down
  65. as the file size goes up, approaching a limit of 1.
  66.  
  67. However, I believe that it *DOES* provide a counterexample to the
  68. usual counting argument. 
  69.  
  70. --Tim Smith
  71.