Chapter 7: Time Complexity

For Your Enjoyment


Chapter 7.3, The Class NP

Definitions

Examples of NP Problems

Proof that SUBSET-SUM is in NP

  N = "On input <S, t>:
       1. Nondeterministically select a subset c of the numbers in S.
       2. Test whether c is a collection of numbers that sum to t.
       3. If the test passes, accept; otherwise, reject."

OR

  V = "On input <<S, t>, c>:
      1. Test whether c is a collection of numbers that sum to t.
      2. Test whether S contains all the numbers in c.
      3. If both pass, accept; otherwise, reject."

Active Learning

Test Your Comprehension

In-Class Notes


Valid XHTML 1.0!