Lecture 13 NP and NP-complete.pdf - Comp 360 Algorithm Design(Fall 2017 Lecture 13 NP and NP-Complete Problems Instructor Yang Cai Based on Kevin

Lecture 13 NP and NP-complete.pdf - Comp 360 Algorithm...

This preview shows page 1 - 10 out of 30 pages.

Comp 360: Algorithm Design (Fall 2017) Lecture 13: NP and NP-Complete Problems Instructor: Yang Cai Basedon Kevin Wayne’sSlides.
Image of page 1
Review: Polynomial-time Reduction
Image of page 2
3 Polynomial-Time Reduction Reduction. Problem X polynomial reduces to problem Y if arbitrary instances of problem X can be solved using: n Polynomial number of standard computational steps, plus n Polynomial number of calls to oracle that solves problem Y. Notation. X P Y. We read this as “X is polynomial-time reducible to Y” or “Y is at least as hard as X”. Remarks. n We pay for time to write down instances sent to black box instances of Y must be of polynomial size. computational model supplemented by special piece of hardware that solves instances of Y in a single step
Image of page 3
4 Polynomial-Time Reduction Purpose. Classify problems according to relative difficulty. Design algorithms. If X P Y and Y can be solved in polynomial-time, then X can also be solved in polynomial time. Establish intractability. If X P Y and X cannot be solved in polynomial- time, then Y cannot be solved in polynomial time. Establish equivalence. If X P Y and Y P X, we use notation X P Y.
Image of page 4
5 Review Basic reduction strategies. n Simple equivalence: INDEPENDENT-SET P VERTEX-COVER. n Special case to general case: VERTEX-COVER P SET-COVER. n Encoding with gadgets: 3-SAT P INDEPENDENT-SET. Transitivity. If X P Y and Y P Z, then X P Z. Pf idea. Compose the two algorithms. Ex: 3-SAT P INDEPENDENT-SET P VERTEX-COVER P SET-COVER .
Image of page 5
Definition of NP
Image of page 6
7 Decision Problems Decision problem. n The input to a computational problem encoded as a binary string. n X is a set of strings. n Instance: string s. n Algorithm A solves problem X: A(s) = yes iff s X. Polynomial time. Algorithm A runs in poly-time if for every string s, A(s) terminates in at most p(|s|) "steps", where p( ) is some polynomial. PRIMES : X = { 2, 3, 5, 7, 11, 13, 17, 23, 29, 31, 37, …. } Algorithm. [Agrawal-Kayal-Saxena, 2002] p(|s|) = |s| 8 . length of s
Image of page 7
8 NP Def. Algorithm C(s, t) is a certifier for problem X if for every string s, s X iff there exists a string t such that C(s, t) = yes . If C(s, t) = yes, then s X. If C(s, t) = no, doens’t mean s X . Maybe s X or s X but t is not a correct certificate. To make sure s X, need to make sure for any t, C(s, t) = no. NP. Decision problems for which there exists a poly-time certifier. C(s, t) is a poly-time algorithm and |t| p(|s|) for some polynomial p( ). "certificate" or "witness” or “proof”
Image of page 8
9 NP NP. Decision problems for which there exists a poly-time certifier.
Image of page 9
Image of page 10

You've reached the end of your free preview.

Want to read all 30 pages?

  • Winter '13
  • AdrianRoshanVetta

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors