NP_Complete - NP-complete LanguagesPolynomial Time Computable function fsuch that for any string computesin polynomial time(wfwThere is a

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: NP-complete LanguagesPolynomial Time ReductionsPolynomial Computable function : fsuch that for any string computesin polynomial time: )(wfwThere is a deterministic Turing machine)|(|kwOM)|(||)(|kwOwf=since, cannot use more than tape spacein time M)|(|kwO)|(|kwOObservation:Language is polynomial time reducible to languageif there is a polynomial computable function such that:fBwfAw∈⇔∈)(ABDefinition:Suppose that is polynomial reducible to .If then . Theorem:PB∈ABPA∈Proof:Machine to decide in polynomial time:AOn input string :w1. Compute)(wfLet be the machine that decides BM2. Run on input )(wfMin polynomial time3. If acccept Bwf∈)(wM′Example of a polynomial-time reduction:We will reduce the 3CNF-satisfiability problemto theCLIQUE problem3CNF formula:)()()()(654463653321xxxxxxxxxxxx∨∨∧∨∨∧∨∨∧∨∨Each clause has three literals3CNF-SAT ={ : is a satisfiable 3CNF formula}wwLanguage:literalclauseA 5-clique in graphCLIQUE = { : graph contains a -clique}<kG,GkGLanguage:Theorem:3CNF-SAT is polynomial time reducible to CLIQUEProof:give a polynomial time reductionof one problem to the otherTransform formula to graph)()()()(432321421421xxxxxxxxxxxx∨∨∧∨∨∧∨∨∧∨∨Clause 2Clause 1Clause 31x2x1x2x4x1x2x3x2x4x4x3xTransform formula to graph. Example:Clause 4Create Nodes:)()()()(432321421421xxxxxxxxxxxx∨∨∧∨∨∧∨∨∧∨∨1x2x1x2x4x1x2x2x4x4x3x3xAdd link from a literal to a literal in everyother clause, except the complementξξ)()()()(432321421421xxxxxxxxxxxx∨∨∧∨∨∧∨∨∧∨∨1x2x1x2x4x1x2x3x2x4x4x3xResulting Graph114321====xxxx1)()()()(432321421421=∨∨∧∨∨∧∨∨∧∨∨xxxxxxxxxxxx1x2x1x2x4x1x2x3x2x4x4x3xThe formula is satisfied if and only ifthe Graph has a 4-cliqueEnd of ProofWe define the class of NP-completelanguagesDecidableNP-completeNP-complete LanguagesNPA language is NP-complete if:...
View Full Document

This note was uploaded on 12/02/2011 for the course AR 107 taught by Professor Gracegraham during the Fall '11 term at Montgomery College.

Page1 / 50

NP_Complete - NP-complete LanguagesPolynomial Time Computable function fsuch that for any string computesin polynomial time(wfwThere is a

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

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