Newsgroups: comp.ai
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!purdue!lerc.nasa.gov!magnus.acs.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!vixen.cso.uiuc.edu!uchinews!uchinews.uchicago.edu!converse
From: converse@cs.uchicago.edu (timoshenko)
Subject: Re: P!=NP does NOT imply NPC cannot be solved
In-Reply-To: "Dr.'s message of 6 Sep 1995 03:39:09 GMT
X-Nntp-Posting-Host: orca.cs.uchicago.edu
Message-ID: <CONVERSE.95Sep6011614@orca.cs.uchicago.edu>
Sender: news@midway.uchicago.edu (News Administrator)
Organization: Univ. of Chicago Computer Science Dept.
References: <414fdj$alf@fly.HiWAAY.net>
	<Pine.ULT.3.91.950829112417.1923G-100000@snausage.cs.umd.edu>
	<KAMIYA.95Aug29135238@arapaho.cse.ucsc.edu>
	<421ae7$1hp@lyra.csx.cam.ac.uk> <422oqi$1sk@tang.ccr-p.ida.org>
	<marcoj-3108950859290001@fester.se.rl.af.mil>
	<42j54t$pg1@harbinger.cc.monash.edu.au>
Distribution: inet
Date: Wed, 6 Sep 1995 06:16:14 GMT
Lines: 102


   Can anyone tell me (simply) the difference between
   PSPACE, PSAPCE-compelte,NP-complete, NP-hard (am i missing any buzz words
   here...?)

[OK, I'll take a stab at a simple explanation, but see the references
at the end for an authoritative explanation.]

All of these terms have to do with classifying computational
problems by how much computer time or computer memory is needed to
solve them.  In particular, they characterize how the amount of
necessary time or memory _grows_ as the "size" of the problem 
grows.

As an example, take addition vs. multiplication.  If you had to
take a test of solving 50 arithmetic problems in an hour, and could
choose either single-digit multiplication problems or single-digit
addition problems, which would you choose?  The answer might depend on
how confident you felt in your multiplication tables vs. your
confidence about simple addition.  On the other hand, if you were to
be given a test of 5 10-digit arithmetic problems, would you prefer
that they were addition or multiplication problems?  That is, which 
type of problem would you prefer to face:

	  9324832524     or	  9324832524
	+ 4532593421     --     x 4532593421
	  ----------              ----------
          ??????????              ??????????

Most people would pick the addition problems here, because they
realize that the difficulty of multi-digit multiplication problems 
grows more quickly as you add more digits than the difficulty of multi-digit
addition problems.  In fact, given the usual way of solving these arithmetic
problems, the number of single-digit additions needed for a
multi-digit addition problem will be proportional to the number of
digits;  the number of single-digit multiplications needed for a
multi-digit multiplication problem will be proportional to the
_square_ of the number of digits.  (There is an approach to
multiplication that grows more slowly, but it still grows more quickly
than the addition problem.)

In general, the terms you ask about have to do with classifying
problems by how their solutions grow in consuming resources like time
and memory.  There's one final wrinkle, though: these terms classify
the problems by the resources that their _best_ _possible_ solutions
comsume.  So, if you manage to come up with a really inefficient way
to multiply, it doesn't change how the problem of multiplication is
classified.

OK, on to the terms you asked about. 

	PSPACE:  problems whose best algorithms need no more than
                 an amount of computer memory that grows as some
                 polynomial function of the input.  (Both addition
                 and multiplication fit easily into PSPACE.)

	PSPACE-COMPLETE:  problems that are in PSPACE (above), but
                 are also at least as "hard" as any problems in
                 PSPACE.

	P:  problems whose best algorithms need no more than a
		amount of time that grows as a polynomial function of
		the size of the input.  (Both addition and
                multiplication fit easily here also --- if n is the
                number of digits in the problem, then addition takes
                time proportional to n, and (naive) multiplication
                takes time proportional to n^2.  Both n and n^2 are
                polynomials.)
  
	NP:  problems for which the problem of checking whether 
                a given answer is right is in P.  (Note that,
                intuitively, this seems like a less stringent 
                requirement than being in P --- you don't have
                to generate a possible answer, you just have to
                check it.)

	NP-hard:  problems that are at least as hard as any in NP.
                  These problems are widely believed to not be in P,
                  although this remains to be proved.

	NP-complete:  problems that are both in NP and are NP-hard.

As a final example, take the following problem: Given a sequence of
digits, store in memory all of the permutations of that sequence.  The
answer for (1 2) would be ((1 2) (2 1)); the answer for (1 2 3) would
be ((1 2 3) (1 3 2) (2 1 3) (2 3 1) (3 1 2) (3 2 1)).  It turns out
that the size of the answer grows exponentially with the size of the
problem, and exponentials grow faster than any polynomial.  Writing
the answer down consumes both exponential time and exponential memory,
and even reading a proposed solution takes exponential time, so this
problem is "too hard" to fit in any of the categories above.  

Does that help?

	--Tim Converse

p.s. References:  Garey and Johnson, "Computers and Intractability",
and Hopcroft and Ullman, "Introduction to Automota Theory, Languages, 
and Computation".
-- 
-------------------------------------------------------------------------------
Tim Converse  U. of Chicago CS Dept.  converse@cs.uchicago.edu  (312) 702-8584
