P Vs NP Turing Machine. Definitions - Turing Machine Turing Machine M has a tape of squares Each...

Click here to load reader

  • date post

    20-Jan-2016
  • Category

    Documents

  • view

    223
  • download

    0

Embed Size (px)

Transcript of P Vs NP Turing Machine. Definitions - Turing Machine Turing Machine M has a tape of squares Each...

P Vs NP

P Vs NPTuring MachineDefinitions - Turing MachineTuring Machine M has a tape of squaresEach Square is capable of storing a symbol from set (including blank Symbol b) is an input string such that and b .Machine Starts with input String , Initial State is q, final state is qaccept or qreject.At each step M is in a state q, scans symbol s The action is to output a symbol, enter a new state and move tape head left/right

Definitions - Turing MachineFormally, Turing Machine M is a Tuple:(, ,Q, ) is the finite, non-empty alphabet of MQ is the finite, non-empty set of States of M and b . is the transition function, such that: : (Q {qaccept, qreject}) Q {1, 1}

Definitions - Turing Machinegiven (q, s) = (q1, s1, h) in ,If M is in q, Scanning s Thenq1 is the new state s1 is the output symbolThe tape moves left if h is 1 or right if h is +1M halts if it reaches a state qaccept or qrejectDefinitions - Turing MachineExample of simulator:http://ironphoenix.org/tril/tm/Definitions L(M)L(M) is a Language accepted by M, such thatM is a Turing Machine is finite, non-empty set of alphabet* is the set of finite strings over If w * is Input to ML(M) = {w | M accepts w}M halts at an accepting state.

Definitions tM(w)Time M takes to accept w - number of stepstM(w) = means M never halts.

Definitions TM(n)Worst case time for MFor n N, TM(n) is worst case run time for MTM(n) = max{tM(w) | w n}, wheren is set of all string in of length n

Definitions Polynomial TimeM runs in Polynomial time:There exists k, such that for all nTM(n) nk + k

PP in P vs NP stands for Polynomial More specifically Deterministic PolynomialP is a Set of Languages:P = {L | L = L(M), M runs in Polynomial Time }

Definitions TM(n)Worst case time for MFor n N, TM(n) is worst case run time for MTM(n) = max{tM(w) | w n}, wheren is set of all string in of length n

Definitions Checking RelationChecking Relation is a binary relation:R * 1* , Over some alphabet and 1Sort of all sets of combinations over and 1A Language LR over 1 {#} is defined as: LR = {w#y | R(w, y)}# is used to separate w and yR is Polynomial iff LR P.

NPNP in P Vs NP stands for Non-deterministic Polynomial.A Language L over is in NP iff there is k N , Polynomial Time checking Relation R, and for all w * w L y(|y| |w|k and R(w, y))Where |w| is length of w, |y| is the length of y

Is P = NPThe question is: Suppose that solutions to a problem can be verified quickly. Then, can the solutions themselves also be computed quickly?Quickly is defined as in Polynomial timeIn Travelling Salesman Problem a route can be quickly verified,but the problem can be quickly solved !

History c.ec.e. Computably enumerableL is c.e. (or semi-decidable) iff L = L(M) for some Turing machine ML is c.e. iff there is checking relation R(x, y), L = {x | yR(x, y)}

History DecidableL is decidable iff L = L(M) for some Turing machine M which satisfies the condition that M halts on all input strings w (compare with c.e.)

History - c.e. and DecidableHalting Problem (HP): HP = {M | M is a Turing machine which halts on input M}HP is c.e. but it is not decidable.

History - ReducibilitySymbol for one to many reducibility is m Definition:Suppose that Li is a language over i, i = 1, 2. Then L1 m L2 iff there is a (total) computable function f : 1* 2* , such that x L1 f(x) L2, for all x 1*

History Reducibility: Consequencesif L1 m L2 and L2 is decidable, then L1 is decidable.Alternatively: if HP m L then L is undecidable

History Reducibility: ExampleTravelling Salesman Problem can be reduced to Hamiltonian Graph Problem

History - NP-Complete, c.e. Completec.e. complete definition:A language L is c.e.-complete iff L is c.e., and L m L for every c.e. language LHP is c.e. Completem is transitive.

History - NP-Complete, Polynomial timePolynomial Time computation first introduced in 1960s by Cobham [Cob64] and Edmonds [Edm65].Polynomial Time Algorithms good AlgorithmsIs Polynomial of n100 a good Algorithm ?NP-Complete is plynomial time equivalent of c.e. Complete.

History - NP-Complete, DefinitionSuppose that Li is a language over i, i = 1, 2. Then L1 p L2 (L1 is p-reducible to L2) iff there is a polynomial-time computable functionf : 1* 2* , such that x L1 f(x) L2, for all x 1*A language L is NP-complete iff L is in NP, and L p L for every language L in NPFocus on reducibility is polynomial

History - NP-Complete, PropositionsIf L1 p L2 and L2 P then L1 P.If L1 is NP-complete, L2 NP, and L1 p L2 then L2 is NP-complete.If L is NP-complete and L P, then P=NP.

Some NP-Complete Problems - SATSatisfiability (SAT):given a boolean function F of M variables x1, x2 .. xM. F can involve the operators and, or and not. The problem is to find values for these variables which give the function F the value true

Some NP-Complete Problems - 3SATAn important special case of Satisfiability is 3-SAT Satisfiability (SAT). Instances of 3-SAT are restricted to formulas in conjunctive normal form with three literals per clause:(P Q R) ( ~P Q ~R) (P ~Q S) ( ~P ~R ~S)

Attempts at proving Over the years several attempts have been made to Prove P = NP or P != NPThe latest in Aug 2010 by Vinay Deolalikar announcing P != NP. Shown to be no correctSince 1987, 34 papers try to Prove P = NPSince 1987, 25 papers try to Prove P != NPRef : http://www.win.tue.nl/~gwoegi/P-versus-NP.htm