home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / sci / crypt / 5158 < prev    next >
Encoding:
Internet Message Format  |  1992-11-21  |  3.4 KB

  1. Xref: sparky sci.crypt:5158 sci.math:15346 comp.theory:2501
  2. Newsgroups: sci.crypt,sci.math,comp.theory
  3. Path: sparky!uunet!secapl!Cookie!frank
  4. From: frank@Cookie.secapl.com (Frank Adams)
  5. Subject: Re: Cryptography and P=NP
  6. Message-ID: <1992Nov21.191944.87493@Cookie.secapl.com>
  7. Date: Sat, 21 Nov 1992 19:19:44 GMT
  8. References: <1992Nov18.193900.20199@rchland.ibm.com> <1992Nov19.172719.1540@fid.morgan.com> <1992Nov19.193036.26711@rchland.ibm.com>
  9. Organization: Security APL, Inc.
  10. Lines: 55
  11.  
  12. In article <1992Nov19.193036.26711@rchland.ibm.com> lwloen@vnet.ibm.com writes:
  13. >In article <1992Nov19.172719.1540@fid.morgan.com>, sethb@fid.morgan.com (Seth Breidbart) writes:
  14. >|> In article <1992Nov18.193900.20199@rchland.ibm.com>
  15. >|> >Do all programs of class P halt?
  16. >|> 
  17. >|> Each program in P runs in polynomial time, so it must halt.
  18. >
  19. >Or is it, rather, P runs in polynomial time when it finds an answer?  I 
  20. >realise this is very basic, but I have yet to have encountered any significant
  21. >sub-set of programs that are not trivial that can be counted on to halt.
  22.  
  23. No; algorithms in P *must* halt in polynomial time.  A non-trivial set of
  24. programs that can be counted on to halt is the set of programs which have
  25. been proved to always halt.
  26.  
  27. One proves things in the first place about all programs in a class like P or
  28. NP by taking an unspecified Turing machine which is assumed to implement a
  29. program in the class.  One does a formal construction on that Turing
  30. machine, and proves that, if it is in fact in the class, the construction
  31. works.  (Once some basic theorems have been proved, it is rarely necessary
  32. to return to this level.)
  33.  
  34. >|> Number all the polynomial-time machines (by adding a clock to each
  35. >|> Turing Machine); do this in such a way that machine k runs in time < n^k.
  36. >|> The "universal algorithm" consists of running machine i until it halts,
  37. >|> and checking to see if an answer is found.  If machine k solves the
  38. >|> problem, then this algorithm runs in time k n^k.  If P != NP, then
  39. >|> this universal machine might not halt.  (More likely, it will always
  40. >|> halt, but not within any polynomial time bound.)
  41.  
  42. This construction contains a misstatement.  One is not numbering all the
  43. polynomial-time machines; rather, the construction builds a sequence of
  44. machines which will implement all polynomial-time algorithms.  (The set of
  45. all polynomial-time machines is not effectively enumerable.)  However, by
  46. taking *all* Turing machines, and modifying the kth one so that it halts
  47. with failure if it would otherwise have taken more than time (n+1)^k, you
  48. will get each polynomial-time algorithm.  (The quoted n^k has a problem with
  49. n=1; this can be fixed more directly, but it does not affect the remainder of
  50. the argument.) The key point is that every algorithm occurs infinitely often
  51. in any effective list of all Turing machines; one can always add some extra
  52. "overhead" to the machine.
  53.  
  54. (There is also a problem with the stated bound; given a problem in NP with a
  55. non-deterministic time bound of n^j, if j > k, the actual bound will be
  56. k n^j, not k n^k.)
  57.  
  58. Given a problem which actually is in NP, this universal machine will in fact
  59. solve it in polynomial time if P=NP -- indeed, it will solve any problem in
  60. P, given an NP formulation, in polynomial time.  If the NP problem is in not
  61. in P, it will always halt, but will not necessarily run in polynomial time.
  62.  
  63. As a practical algorithm, it doesn't make it; a run time of O(n^10^20),
  64. which could well happen, is not practical.
  65.  
  66.  
  67.