Docsity

Satisfiability Problem - Automata and Complexity Theory - Lecture Slides, Slides of Theory of Automata

Partial preview of the text

Download Satisfiability Problem - Automata and Complexity Theory - Lecture Slides and more Slides Theory of Automata in PDF only on Docsity!

1

The Satisfiability Problem

Cook’s Theorem: An NP-Complete

Problem

Restricted SAT: CSAT, 3SAT

2

Boolean Expressions

Boolean, or propositional-logic expressions are built from variables andconstants using the operators AND, OR,and NOT.

Constants are true and false, representedby 1 and 0, respectively.

We’ll use concatenation (juxtaposition) forAND, + for OR, - for NOT, unlike the text.

4

The Satisfiability Problem (

SAT )

Study of boolean functions generally is concerned with the set of

truth

assignments

(assignments of 0 or 1 to

each of the variables) that make thefunction true.

NP-completeness needs only a simpler question (SAT): does there exist a truthassignment making the function true?

5

Example: SAT

(x+y)(-x + -y) is satisfiable.

There are, in fact, two satisfying truthassignments:

x=0; y=1.

x=1; y=0.

x(-x) is not satisfiable.

7

Example: Encoding for SAT

(x+y)(-x + -y) would be encoded by the string

(x1+x10)(-x1+-x10)

8

SAT is in

NP

There is a multitape NTM that can decide if a Boolean formula of length n is satisfiable.

The NTM takes O(n

2

) time along any path.

Use nondeterminism to guess a truth assignment on a second tape.

Replace all variables by guessed truth values.

Evaluate the formula for this assignment.

Accept if true.

10

Assumptions About NTM for L

One tape only.

Head never moves left of the initialposition.

States and tape symbols are disjoint.

Key Points: States can be namedarbitrarily, and the constructionsmany-tapes-to-one and two-way-infinite-tape-to-one at most squarethe time.

11

More About the NTM M for L

Let p(n) be a polynomial time bound for M.

Let w be an input of length n to M.

If M accepts w, it does so through a sequence I

0

I

1

I

p(n)

of p(n)+1 ID’s.

Assume trivial move from a final state.

Each ID is of length at most p(n)+1, counting the state.

13

Picture of Computation as an Array

Initial ID

X

00

X

01

…

X

0p(n)

X

10

X

11

…

X

1p(n)

I

1

I

p(n)

X

p(n)

X

p(n)

…

X

p(n)p(n)

... ...

14

Intuition

From M and w we construct a boolean formula that forces the X’s to representone of the possible ID sequences ofNTM M with input w, if it is to besatisfiable.

It

is

satisfiable iff some sequence leads

to acceptance.

16

Points to Remember

The boolean function has components thatdepend on n.

These must be of size polynomial in n.

Other pieces depend only on M.

No matter how many states/symbols m has,these are of constant size.

Any logical formula about a set ofvariables whose size is independent of ncan be written somehow.

17

Designing the Function

We want the Boolean function thatdescribes the X

ij

’s to be satisfiable if

and only if the NTM M accepts w.

Four conditions:

Unique: only one symbol per position.

Starts right: initial ID is q

0

w.

Moves right: each ID follows from thenext by a move of M.

Finishes right: M accepts.

19

Starts Right

The Boolean Function needs to assertthat the first ID is the correct one withw = a

1

…a

n

as input.

X

00

= q

0

.

X

0i

= a

i

for i = 1,…, n.

X

0i

= B (blank) for i = n+1,…, p(n).

Formula is the AND of y

0iZ

for all i,

where Z is the symbol in position i.

20

Finishes Right

Somewhere, there must be an accepting state.

Form the OR of Boolean variables y

ijq

where i and j are arbitrary and q is anaccepting state.

Note: differs from text.