22
CS1010: Theory of Computation Lorenzo De Stefani Fall 2019 Lecture 14: Other approaches to reduction

CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

CS1010:TheoryofComputation

LorenzoDeStefaniFall2019

Lecture14:Otherapproachestoreduction

Page 2: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

Outline

•  MappingReducibilty•  NonTuring-recognizablelanguages•  Reductionsviacomputationhistories•  ThePCPproblem(ataglance)

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 2

FromSipserChapter5.1-5.3

Page 3: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

EQTMEQTM={<M1,M2>|L(M1)=L(M2)}–  itisundecidable!WesawreductionfromETM

–  wecouldreducefromATMaswell

•  M1isaTMthataccepts•  M2isaTMthatacceptsisMacceptsw(simulateMonw)

–  fisthereductionfunction

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 3

⌃⇤<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

< M,w ><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Reduction

Decider

accept accept

reject rejectf(< M,w >) !< M1,M2 ><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

DEQTM<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

< M1,M2 ><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

⌃⇤<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Page 4: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

Computablefunctions

AfunctioniscomputableifthereexistsaTMMsuchthatforevery,Mhaltswithjustonitstape–  Example:Letbeafixedalphabetanddefineas:

•  IfforsomeTM,thenwhereM’isMwithqacceptandqrejectswapped;•  Otherwise,

–  fiscomputable!

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 4

f : ⌃⇤ ! ⌃⇤<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

x 2 ⌃⇤<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

f(x)<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

f(x)<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

⌃<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

w =< M ><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

f(w) =< M 0 ><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

f(w) = w<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Page 5: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

Mappingreducibility

Alanguageismappingreducibleto(write)ifthereexistsacomputablefunction

suchthatforeveryThatis,thefunctionmapsmembersofAtomembersofBandnon-membersofAtonon-membersofB•  Example:.Thecomputablefunctionis

suchthatM1andM2areasdefinedinthepreviousexample

•  Then,

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 5

A ✓ ⌃⇤<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

B ✓ ⌃⇤<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

A m B<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

f : ⌃⇤ ! ⌃⇤<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

x 2 ⌃⇤<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

x 2 A if and only if f(x) 2 B<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

f(< M,w >) =< M1,M2 ><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

< M,w >2 ATM () f(< M,w >) 2 EQTM<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

ATM m EQTM<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Page 6: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

PropertiesofMappingReducibility

Theorem5.22:IfandBisdecidable,thensoisAProof:Since–  Thereexistsacomputablefunctionfthatrealizesthe

reductionfromAtoB–  Sincefiscomputable,thereexistsMfthatcomputesthe

reduction–  LetMBbeadeciderforB,constructadeciderMAforA:

1.  OninputxforMA,simulateMfonxtocomputef(x)2.  SimulateMBonf(x).AcceptxiffMBacceptsf(x)

–  SincethenMAdecidesA.1.  Bymappingreducibilityifthen2.  IfMBacceptsthenMAacceptsaswell

10/22/19

TheoryofComputation-Fall'19LorenzoDeStefani 6

A m B<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

A m B<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

x 2 A<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

f(x) 2 B<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Page 7: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

PropertiesofMappingReducibility

Corollary5.23:IfandAisundecidable,thensoisBProof:Let–  Thereexistsacomputablefunctionfthatrealizesthe

reductionfromAtoB–  Sincefiscomputable,thereexistsMfthatcomputesthe

reduction–  AssumetowardscontradictionsthatthereexistsadeciderMB

forB,constructadeciderMAforA:1.  OninputxforMA,simulateMfonxtocomputef(x)2.  SimulateMBonf(x).AcceptxiffMBacceptsf(x)

–  SincethenMAdecidesAàcontradiction!

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 7

A m B<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

A m B<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Page 8: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

Example:DECIDERTMisUndecidable

•  •  Showthat•  Showthatthereexistsacomputablefunctionmappingthetwolanguages– Oninput<M,w>,foutputs<M’>suchthat:M’oninputxsimulatesMonwanditacceptsxifMacceptsworentersaninfiniteloopotherwise

– Tocomputef(buildM’)wemodifyM–  Thisfunctioniscomputable

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 8

ATM m DECIDERTM<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

DECIDERTM = {< M > |TM M is a decider}<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

< M,w >2 ATM () < M 0 >2 DECIDERTM<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Page 9: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

MappingReducibilityandRecognizability

Theorem5.28:IfandBisrecognizable,thensoisAProof:Since–  Thereexistsacomputablefunctionfthatrealizesthe

reductionfromAtoB–  Sincefiscomputable,thereexistsMfthatcomputesthe

reduction–  LetMBbearecognizerforB,constructarecognizerMAforA:

1.  OninputxforMA,simulateMfonxtocomputef(x)2.  SimulateMBonf(x).

1.  Accept(resp.,Reject)xifMBaccepts(resp.,reject)f(x)2.  LooponxifMBloopsonf(x)

–  SincethenMArecognizesA.

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 9

A m B<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

A m B<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Page 10: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

PropertiesofMappingReducibility

Corollary5.29:IfandAisnotTuring-recognizable,thenneitherisBProof:Since–  Thereexistsacomputablefunctionfthatrealizesthe

reductionfromAtoB–  Sincefiscomputable,thereexistsMfthatcomputesthe

reduction–  Assumetowardscontradictionsthatthereexistsarecognizer

MBforB,constructarecognizerMAforA:1.  OninputxforMA,simulateMfonxtocomputef(x)2.  SimulateMBonf(x).

1.  Accept(resp.,Reject)xifMBaccepts(resp.,reject)f(x)2.  LooponxifMBloopsonf(x)

–  SincethenMArecognizesAàcontradiction! 10/22/19

TheoryofComputation-Fall'19LorenzoDeStefani 10

A m B<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

A m B<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Page 11: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

EQTMisnotTMrecognizable

•  WewouldliketouseCorollary5.29.•  WhichnonTuringRecognizablelanguageLwhichismappingreducibleEQTMtocanweuse?– WeknowATMisundecidable.– WeknowATMisTuringrecognizable.–  ThisimpliesisnotTuring-recognizable.

•  Weneedtoshow

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 11

ATM<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

ATM m EQTM<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Page 12: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

Constructacomputablefunctionfwhichrealizesthereductionfromto•  Oninput<M,w>,freturns<M1,M2>whichoninputx– M1rejectsx– M2runswonMandaccepts(rejects,loop),ifMdoes

•  fiscomputable–  – 

•  isnotturingrecognizable

10/22/19 TheoryofComputation-Fall'19LorenzoDeStefani 12

ATM m EQTM<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

< M,w >2 ATM ! L(M1) = L(M2) = ; !< M1,M2 >2 EQTM<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

< M,w >/2 ATM ! L(M1) 6= L(M2) !< M1,M2 >/2 EQTM<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

EQTM<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Page 13: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

Mappingreducibilityandcomplement

Theorem:IfthenProof:Since–  Bydefinitionthereexistsacomputablefunction

suchthatforevery,–  Butthenthesamefunctionmustalsobesuchthatfor

every,

Example:–  SinceisnonTuring-recognizableneitheris

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 13

A m B<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

A m B<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

f : ⌃⇤ ! ⌃⇤<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

x 2 ⌃⇤<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

x 2 A if and only if f(x) 2 B<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

x 2 ⌃⇤<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

x 2 A if and only if f(x) 2 B<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

ATM m DECIDERTM<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

ATM m DECIDERTM<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

!<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

ATM<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

DECIDERTM<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Page 14: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

ReminderofconfigurationsofaTM•  AtanystepaTMisinacertainconfigurationwhichisspecifiedby:–  thestate–  thecurrentheadlocation–  thesymbolatthecurrentheadlocation

•  WesaythataconfigurationC1yieldsC2ifthereisatransitionwhichallowsgofromC1toC2

10/1/19 TheoryofComputation-Fall'19LorenzoDeStefani 14

Page 15: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

Typesofconfigurations•  Startingconfiguration:instartingstate,headpositionatthebeginningoftheinput– Leftmostpositionofthetapeoccupiedbytheinput

•  Acceptingconfiguration:inacceptingstate•  Rejectingconfiguration:inrejectingstate•  Haltingconfiguration:eitheracceptingorrejectingconfigurations

10/1/19 TheoryofComputation-Fall'19LorenzoDeStefani 15

Page 16: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

Computationhistories

•  AnacceptingcomputationhistoryforaTMisasequenceofaconfigurationsC1C2...Cjsuchthat:–  C1isthestartconfigurationforinputw–  Cjisanacceptingconfiguration,and–  EachCifollowslegallyfromCi-1

•  Analogousdefinitionforrejectingcomputationhistory•  Computationhistoriesarefinite–ifMdoesnothaltona

giveninputthereisnohistory•  ForDeterministicTM:anyacceptingorrejectingcomputation

historiesforasingleinput•  Non-DeterministicTMs:multiplepossiblehistories

correspondingtothepossibleexecutionbranches

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 16

Page 17: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

LinearBoundedAutomaton

•  SupposewereducethepowerofaTMsothattheheadnevermovesoutsidetheboundariesoftheinputstring

•  SuchaTMiscalledLinearBoundedAutomaton

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 17

Lemma5.8:LetMbeaLBAwithqstatesandgsymbolsinthetapealphabet.Thereareexactlyqngndistinctconfigurationsofatapeoflengthn

Proof:Mcanbeinoneofqstates,theheadcanbeononeofncells,therearegnpossiblestringsonthetapeatanytime

Page 18: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

ALBAisdecidable

•  WeneedtobuildadeciderDforALBA•  WesimulateMoninputw

–  IfMacceptsandhalts/rejectsDhalts/rejectsaccordingly•  Howdowehandleloops?

–  ConsiderthesequenceofconfigurationofMoninputwC1,C2,…,Cj,…Ci–  Ifthereexistj,isuchthatCj=Ciwehaveacycle!–  Thecomputationcancontinueonthatloopforever!–  Canwedetecttheloop?FromLemma5.8thereareafinitenumberof

possibleconfigurations!Ifthereisaloopwewilldetectinfinitetime–  IfloopisdetectedtheDrejects!–  MloopsiffdoesnotacceptwàDisdecider!

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 18

Theorem5.9:Isdecidable.

ALBA = {< M,w > |M M is an LBA that accepts string w}<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Page 19: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

ComputationoverComputationHistories

•  ConsideranacceptingcomputationhistoryofaTMC1C2…Ci•  EachconfigurationCicanbecodifiedasastring<Ci>!•  Considerthefollowingstring

•  Thesetofallvalidacceptinghistoriesisalsoalanguage!•  Suchstringshavefinitelenghts!

–  Noloopsifacceptinghistory!•  AnLBABcancheckifagivenstringisavalidaccepting

computationhistoryforaTMMacceptingw–  CheckthatC1isavalidstartingconfigurationforM–  CheckthatCiisavalidacceptingconfigurationforM–  CheckthatCj+1followslegallyfromCjforj=1,2,..i-1

•  IfthenMacceptsw!

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 19

L(B) 6= ;<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Page 20: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

•  Itisundecidable!•  Proofidea:reductionfromATM

–  AssumetowardscontradictionthatRdecidesELBA–  ShowhowtobuildadeciderDforATM

–  UsetheconstructionpreviouslyseentoobtainanLBABsuchthat

–  GivenBasinputtoR,thenwehave

–  Thus,

–  Daccepts/rejectsifRrejects/acceptsBàDdecidesATM!–  Contradiction!

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 20

ELBA = {< M,w > |M is an LBA and L(B) = ;}<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

L(B) 6= ; () w 2 L(M)<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

R rejects B () L(B) 6= ;<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

R rejects B () w 2 L(M)<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Page 21: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

ThePost-CorrespondenceProblem

•  Areissuesofundecidabilityconfinedtoproblemsconcerningautomataandlanguages?

•  No!Thereareotheralgorithmic,naturalundecidableproblems•  ThePostCorrespondenceProblem(PCP)istilingproblemover

strings:–  Atile,ordominocontainstwostringst(top)andb(bottom)

•  Considerasetofgivendominos

•  Amatchisalistofthesedominossothatwhenconcatenatedthetopandthebottomstringsareidentical

•  Somesetshavenomatch!

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 21

t

b

�=

hcaa

i

<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>

Page 22: CS1010: Theory of Computation - Brown Universitycs.brown.edu/courses/csci1010/files/doc/notes/Lecture-14...Theory of Computation - Fall'19 Lorenzo De Stefani 17 Lemma 5.8: Let M be

ThePost-CorrespondenceProblem

•  Givenasetofdominos,oraninstanceofthePCPproblemswewouldliketobeabletodecidewhetherthereexistsamatch!

•  Canwerephrasethisistermsoflanguages?

•  CanwedecidethelanguageLPCP?•  Theorem5.15:LPCPisundecidable!•  Proofidea:

–  ReductionfromATMusingcomputationhistoriesapproach!–  Weshowthecontradiction:ifLPCPisdecidablesowouldATM–  Wewillreduceaninput<M,w>toaPCPinstancethathasamathcifand

onlyifMacceptsw!•  Ifinterestedinthedetailschecksection5.2

10/22/19 TheoryofComputation-Fall'19

LorenzoDeStefani 22

LPCP = {< P > |P is an instance of PCP and it has a match}<latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit><latexit sha1_base64="(null)">(null)</latexit>