title: Why is NP only a set of decision problems?
body: <p>Taken from Wikipedia but all definitions I have seen are similar to this:</p>
  <blockquote>
  <p>&quot;NP is the set of decision problems where the &quot;yes&quot;-instances can be accepted in polynomial time by a non-deterministic Turing machine.&quot;</p>
  </blockquote>
  <p>Why is NP restricted to only decision problems? Is it?</p>
  <p>Lets take subset sum as an example:</p>
  <p>(type 1) Decision problem - Is there a subset B of A that sums up to k?</p>
  <p>(type 2) &quot;Normal&quot; problem - what is the subset B of A that sums up to k?</p>
  <p>I write &quot;Normal&quot; on type 2 there because that feels like what you usually do when you solve such a problem.</p>
  <p>Am I right in understanding, using the definition of NP, that type 1 is in NP while type 2 is not?</p>
  <p>It feels like the definition would work equally well in the way it is sometimes written informally</p>
  <blockquote>
  <p>&quot;All <em><strong>problems</strong></em> whose solutions can be checked in polynomial time&quot;.</p>
  </blockquote>
  <p>(I found a similar question but it didn't really seem to answer this question)</p>