DOC PREVIEW
UT Dallas CS 6363 - lec14

This preview shows page 1-2-3-4 out of 11 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Lecture 14 0 0 1 NP Completeness Chapter 34 Old Edition Chapter 36 Discussion here is from the old edition 0 0 2 Preliminaries Definition 1 An abstract problem Q is a binary relations on a set I of problem instances and a set S of problem solutions Example 2 SHORTEST PATH An instance is a graph G V E and two vertices A solution is an ordered sequence of vertices possibly the empty sequence if no path exists A given instance may have more than one solution Definition 3 A decision problem is a problem having a yes no or 0 1 solution So here the solution set S 0 1 Many problems are of the optimization variety but have a corresponding decision problem associated with them that come about very naturally So we will only consider decision problems from now on Encodings An encoding considered here is binary A set S of abstract objects is mapped by a mapping e S 7 0 1 A problem whose instance set is the set of binary strings is called a concrete problem We say that an algorithm solves a concrete problem in time O T n if when it is provided a instance i of length n i it takes time at most O T n If T n O nk then we say that the problem is polynomial time solvable This notion can be extended to abstract decision problem Q via a mapping e that maps an instance i I to a string Q i in 0 1 Meaningless strings are mapped to 0 Complexity Classes P is the class of concrete decision problems that are polynomial time solvable 0 0 3 Formal Language Framework P P is a finite set of symbols called anPalphabet A language L over is any set of strings made up of symbols in P represents the empty string and P represents P the empty language So L where is the language of all strings on P Operations Union L1 L2 intersection L1 L2 complementation L L concatenation L x1 x2 x1 L1 x2 L2 Closure or Kleene Star L L L2 L3 where Lk L concatenated with itself k times Algorithm A accepts rejects a string x 0 1 if given input x the algorithm outputs A x 1 0 The language accepted by an algorithm A is the set L x 0 1 A x 1 Such an algorithm that accepts 1 L may not reject x L A language L is decided by an algorithm A i x L A x 1 and x L A x 0 So every string is either accepted or rejected A language L is accepted in polynomial time by an algorithm A if for any n length string x L the algorithm accepts x in time O nk for some fixed k A language L is decided in polynomial time by an algorithm A if for any n length string x the algorithm decides x in time O nk for some fixed k P L there is an algorithm A that decides L in polynomial time L there is an algorithm A that accepts L in polynomial time 0 0 4 NP Poly time verification A verification algorithm is a two argument algorithm A where one argument is an input binary string x and the other is a binary string y called a certificate A two argument algorithm A verifies an input string x if there is a certificate y such that A x y 1 The language verified by a verification algorithm A is L x 0 1 y 0 1 3 A x y 1 So A verifies L if for each x L there is a y that A can use in proving that x L Also for any x L there should be no such y proving that x L Complexity Class NP is the class of languages that can be verified by a polynomial time algorithm So L N P i there is polynomial time algorithm A and a constant c such that L x 0 1 y 0 1 y O x c 3 A x y 1 Algorithm A is said to verify language L in poly time If L P then L N P since there is a poly time algorithm to decide L the verification algorithm simply ignores the second argument Hence P N P whether equality holds is the famous problem Open Question Is the following true L N P L N P If L N P then we say L is in the complexity class co NP Note P N P co N P Again we do not know if equality holds 0 0 5 NP completeness and Reducibility NPC is a subset of NP with the property that if any problem in NPC has or does not have a poly time algorithm then every problem in NP does does not So these are the hardest problems in NP Language L1 is poly time reducible to a language L2 written as L1 p L2 if there exists a poly time computable function f 0 1 7 0 1 such that for all x 0 1 x L1 f x L2 f is called the reduction function and the poly time algorithm that computes it is called a reduction algorithm Lemma 4 L1 p L2 L2 P L1 P 2 0 0 6 NP completeness A language L is NP complete if 1 L N P and 2 L0 p L for every L0 N P If language satisfies only condition 2 it said to be NP hard Theorem 5 If any NP complete problem is poly time solvable then P N P If any problem in NP is not poly time solvable then all NP complete problems are not poly time solvable First Problem Circuit Satisfiability Given a boolean combinational circuit composed of AND OR and NOT gates shown below is it satisfiable We say that a one output boolean combinational circuit is satisfiable it has a truth assignment a set of boolean input values that causes the output to be 1 For the circuit below x1 1 x2 1 x3 0 is such an assignment Combinational elements nodes of this graph NOT AND OR NAND NOR XOR AND 3 Combinational circuit is made up of such elements in an acyclic manner Example all lines are directed from left to right x1 x5 x2 x3 x4 x8 x6 x9 x7 Boolean Formula satisfiability An instance of SAT is a boolean formula composed of 3 x10 1 boolean variables 2 boolean connectives one or two inputs and one output such as AND OR NOT implication if and only if and 3 parenthesis Example x1 x2 x1 x3 x4 x2 A truth assignment for a boolean formula is a set of values for the variables in and a satisfying assignment is a truth assignment that causes it to evaluate to 1 If a satisfying assignment exists for a formula then it is satisfiable SAT satisfiability problem asks if a given formula is satisfiable For the example formula x1 0 x2 0 x3 1 x4 is a …


View Full Document

UT Dallas CS 6363 - lec14

Documents in this Course
Exam #1

Exam #1

5 pages

lec4

lec4

5 pages

lec3

lec3

5 pages

lec1

lec1

3 pages

lec14

lec14

11 pages

lec13

lec13

22 pages

lec12

lec12

8 pages

lec11

lec11

3 pages

lec10new

lec10new

11 pages

lec9

lec9

13 pages

lec8

lec8

9 pages

lec7

lec7

10 pages

lec6

lec6

8 pages

lec7

lec7

10 pages

lec6

lec6

8 pages

lec4

lec4

5 pages

lec3

lec3

5 pages

lec1

lec1

3 pages

lec14

lec14

11 pages

lec13

lec13

22 pages

lec12

lec12

8 pages

lec11

lec11

3 pages

lec10new

lec10new

11 pages

lec9

lec9

13 pages

lec8

lec8

9 pages

lec4

lec4

5 pages

lec3

lec3

5 pages

lec1

lec1

3 pages

lec14

lec14

11 pages

lec13

lec13

22 pages

lec12

lec12

8 pages

lec11

lec11

3 pages

lec10new

lec10new

11 pages

lec9

lec9

13 pages

lec8

lec8

9 pages

lec7

lec7

10 pages

lec6

lec6

8 pages

lec13

lec13

22 pages

lec12

lec12

8 pages

lec11

lec11

3 pages

lec10new

lec10new

11 pages

lec9

lec9

13 pages

lec8

lec8

9 pages

lec7

lec7

10 pages

lec6

lec6

8 pages

lec4

lec4

5 pages

lec3

lec3

5 pages

lec1

lec1

3 pages

greedy

greedy

4 pages

siphon

siphon

18 pages

hwk5

hwk5

3 pages

Load more
Loading Unlocking...
Login

Join to view lec14 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view lec14 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?