+ All Categories
Home > Documents > Complexity theory and combinatorial optimization Class #2 – 17 th of March

Complexity theory and combinatorial optimization Class #2 – 17 th of March

Date post: 15-Jan-2016
Category:
Upload: shyla
View: 20 times
Download: 0 times
Share this document with a friend
Description:
Complexity theory and combinatorial optimization Class #2 – 17 th of March. …. where we deal with decision problems, finite automata, Turing machines pink dogs, …. But also P, NP, NP-completeness, …. Introduction to computational intractability. - PowerPoint PPT Presentation
22
Complexity theory and combinatorial optimization Class #2 – 17 th of March e we deal with decision problems, finite automata, Turing mac nk dogs, …. o P, NP, NP-completeness, …..
Transcript
Page 1: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

Complexity theory and combinatorial optimizationClass #2 – 17th of March

…. where we deal with decision problems, finite automata, Turing machines pink dogs, ….

But also P, NP, NP-completeness, …..

Page 2: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

Introduction to computational intractability

Is my problem efficiently solved by a computer?

an automatic m

achine

an algorithm?

Page 3: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

What’s a problem?

Decision problems: each instance is a question

Formal definition with language theory

More natural problems: “meta-language”

encoding scheme

That is the problem ….

Page 4: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

What’s an algorithm?

• The pink dog question

Does a pink dog exist?Does a pink dog exist (outside London)?

Since the answer is yes, it can be answered

Since there are only a finite number of dogs (outside London) and since for each one a can decide whether it is pink or notit can be answered.

Will be ever exist any pink dog outside London?

To answer it one needs a formal model of dogs.

Page 5: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

What’s an algorithm?

• Computability models

o Lambda-calculus (A. Church, 1931)o General recursive functions (K. Gödel, 1934)o Turing machines (A. Turing, 1936)

o Random-Access Machines, …

• Church thesis

Before the first computer

• The pink dog question

Page 6: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

What’s an algorithm: the Turing machine model

• From finite states automaton ….. to Turing machines

• 1-tape (deterministic) Turing Machine (DTM)

• multi-tape Turing machines

• non-deterministic Turing machines (NDTM)

o transition function transition relationo put non-determinism at the beginning

• equivalence between all these Turing machines models

• universal Turing Machine

Example

Page 7: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

Problems solved by Turing machines

• Is L recognized by M?

• Is L decided by L?

• The halting problem: an example of undecidable problem

M: DTM, L a language on the same input alphabet

Decision problem solved by an algorithm?(through an encoding scheme)

Page 8: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

Complexity of Turing machines

• Complexity of DTM (halting for each instance)

• Complexity of NDTM

• Polynomial-time: considered as efficiency (Cobham-Edmond’s thesis)

• Difference between DTM and NDTM (from complexity point of view)

• From languages to problems (reasonable encoding schemes)

A notion of efficiency

Page 9: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

P, NP and NP-completeness

• The class P

• The class NP

• Exponentially solving problems in NP

• Polynomial reductions

• NP-complete problems

Page 10: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

Some NP-complete problems

• SAT

• Cook’s theorem (1971)

•How to prove NP-completeness after Cook?

• 3-SAT

• to be continued during the next class

Page 11: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

Enjoy your vacation

Page 12: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

)1()11( )10(

)1()11()10(

)1()11()10(

)1()11()10(

)1()11()1(

1 0

0444

43

322

211

10

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,b,qq

b

NN

N

N

YN

00101

0 11 00 b b b b b b …

q0 q1 q1 q2 qN

An Example of 1-tape Deterministic Turing Machine

NY qqqqqqqQ

bO

,,,,,,

,1,

43210

Page 13: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

00111

0 11 10 b b b b b b …

q0 q1 q1 q2 q2 q2

)1()11( )10(

)1()11()10(

)1()11()10(

)1()11()10(

)1()11()1(

1 0

0444

43

322

211

10

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,b,qq

b

NN

N

N

YN

Page 14: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

00111

11 10 b b b b b b …

q4 q4 q4 q4 q3 q2

)1()11( )10(

)1()1()10(

)1()11()10(

)1()11()10(

)1()11()1(

1 0

0444

43

322

211

10

,b,q,,q,,qq

,b,q,b,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,b,qq

b

NN

N

N

YN

b

Page 15: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

00111

b1 10 b b b b b b …

q4 q0 q1 q2 q2

b

)1()11( )10(

)1()11()10(

)1()11()10(

)1()11()10(

)1()11()1(

1 0

0444

43

322

211

10

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,b,qq

b

NN

N

N

YN

Page 16: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

00111

b1 1 b b b b b b …

q4 q4 q3 q2

b

)1()11( )10(

)1()11()10(

)1()11()10(

)1()11()10(

)1()11()1(

1 0

0444

43

322

211

10

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,b,qq

b

NN

N

N

YN

b

Page 17: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

00111

b1 b b b b b b b …

q4 q0 qN

b

)1()11( )10(

)1()11()10(

)1()11()10(

)1()11()10(

)1()11()1(

1 0

0444

43

322

211

10

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,b,qq

b

NN

N

N

YN

Page 18: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

0011

b1 10 0 b b b b b …

q0

)1()11( )10(

)1()11()10(

)1()11()10(

)1()11()10(

)1()11()1(

1 0

0444

43

322

211

10

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,b,qq

b

NN

N

N

YN

Page 19: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

0011

b1 10 b b b b b b …

q4 q4 q4 q3 q2

)1()11( )10(

)1()11()10(

)1()11()10(

)1()11()10(

)1()11()1(

1 0

0444

43

322

211

10

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,b,qq

b

NN

N

N

YN

b

Page 20: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

0011

b1 b0 b b b b b b …

q4 q0 q1 q2

b

)1()11( )10(

)1()11()10(

)1()11()10(

)1()11()10(

)1()11()1(

1 0

0444

43

322

211

10

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,b,qq

b

NN

N

N

YN

Page 21: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

0011

b1 b b b b b b b …

q3 q3q2

b

)1()11( )10(

)1()11()10(

)1()11()10(

)1()11()10(

)1()11()1(

1 0

0444

43

322

211

10

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,b,qq

b

NN

N

N

YN

b

Page 22: Complexity theory and combinatorial optimization Class #2 – 17 th  of March

0011

bb b b b b b b b …

q3 q0 qY

b

)1()11( )10(

)1()11()10(

)1()11()10(

)1()11()10(

)1()11()1(

1 0

0444

43

322

211

10

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,,qq

,b,q,,q,b,qq

b

NN

N

N

YN

What is the accepted language?


Recommended