L12 - Overview of NP-completeness Definition: A polynomial...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
CS0250, Set 12 Overview of NP-completeness Definition : A  polynomial time algorithm  is an algorithm whose  running time is no more than a polynomial on the input size. We agree that  Example:  Bubble-Sort  sorts  n  numbers in  O ( n 2 ) time   it is a  polynomial time algorithm. There are a large class of problems called  NP-complete problems .   NP complete problems are special because we are almost sure  that there is no polynomial time algorithm for any of these  problems. An algorithm is an efficient algorithm if and only  if it is a polynomial time algorithm
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS0250, Set 12 Some famous NP-complete problems: – the SAT problem – the Clique problem – the Maximum independent set problem Note : They are all  decision  problems, which means that they only  ask for  yes / no  answer.
Background image of page 2
CS0250, Set 12 The SAT Problem Some definitions : – Boolean variable: A variable x is a Boolean variable if it can  either be TRUE or FALSE. – A Boolean formula  φ  composed of • Boolean variables, related by • Boolean connectives of AND ( ), OR ( ), NOT ( ¬ ). Example φ  = ((x 1   x 2  (x 1 ( ¬ x 3 ))   (x x 4 x x x 7 )). Note : The textbook also includes the “implication” and “if and only if”  connectives.  We omit them here because it can be shown easily that we can  express these two connectives using only AND, OR, NOT.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS0250, Set 12 Given  φ , the SAT problem asks to decide if there is a TRUE- FALSE assignment of the variables that makes  φ  to be TRUE.  Note : If there is such assignment, we say  φ  is satisfiable. Examples – Given Boolean formula        φ  = ((x 1   x 2  (x 1    ( ¬ x 3 )) (x x 4 x x x 7 )), the answer for SAT is  yes  because the formula  becomes TRUE after setting  x 1  = TRUE, x 2  = TRUE, and  x 3 =x 4 =x 5 =x 6 =x 7 = FALSE.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/05/2008 for the course CS CSIS0250 taught by Professor Dr.hing-fungting during the Summer '08 term at HKU.

Page1 / 18

L12 - Overview of NP-completeness Definition: A polynomial...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online