Download presentation
Presentation is loading. Please wait.
1
Intro to Theory of Computation
LECTURE 17 Last time Reductions Mapping reductions Today Computation history method CS 332 Sofya Raskhodnikova 3/17/2016
2
Exercise A language L is Turing-recognizable β L β€ π π¨ π»π΄
Only the β direction is true. Only the β direction is true. Both directions are true. Neither direction is true. {madam, dad, but, tub, book} 3/17/2016
3
Problems in language theory
ADFA decidable ACFG decidable EDFA decidable ECFG decidable EQDFA decidable ATM undecidable ETM undecidable EQCFG ? EQTM undecidable 3/17/2016
4
Computation history method
Proving undecidability for languages that do not involve TM descriptions Computation history method 3/17/2016
5
A linear bounded automaton (LBA)
A linear bounded automaton (LBA) is a TM variant that has bounded tape, with the number of tape squares equal to the size of the input. FINITE STATE CONTROL Linear memory (by increasing the alphabet β can use ``tracksββ on the tape). Every CFL can be decided by an LBA. 1 1 1 3/17/2016
6
Configurations A configuration of an LBA is a setting of state, head position and tape contents. 110β©π7βͺ Snapshot in the middle of computation q7 1 3/17/2016
7
Exercise How many distinct configurations does an LBA have if it has π states, π symbols in tape alphabet, and the tape of length π? πππ π+π+π π π π ππ π π None of the above. {madam, dad, but, tub, book} 3/17/2016
8
Prove that ALBA is decidable
ALBA= { π©, π β£ π© is an LBA that accepts string π } Idea: Given π©, π , simulate B on w. If it halts, we know the answer. If it loops, we can detect because B repeats a configuration. S = `` On input β©π©,πβͺ, where π© is an LBA and w is a string: Simulate B on w for ππ π π steps. If it accepts, accept. If it rejects or does not halt, reject.ββ 3/17/2016
9
starting configuration accepting configuration
Computation history An accepting computation history for a TM M on input w is a sequence of configurations entered by M on input w: A log πͺ π # πͺ π #β¦# πͺ β starting configuration accepting configuration 3/17/2016
10
Starting configuration
q0 1 πͺ π =β© π π βͺπ° β© π π βͺπ° 3/17/2016
11
Accepting configuration
qacc 1 πͺ β =β© π π βͺπ° β¦ π πππ β¦ 3/17/2016
12
Each πͺ π+π legally follows from πͺ π
q7 q5 1 2 1 1 πͺ π = β©π7βͺ πͺ π+π = β© π π βͺπ° π β©ππβͺ 1 1 0 3/17/2016
13
Given a TM M and a string w,
LBAs can check computation histories of TMs Given a TM M and a string w, we can construct an LBA that checks whether its input is the accepting computation history of M on w. 3/17/2016
14
Prove that ELBA is undecidable
ELBA = { π© β£ π© is a LBA and π³ π© =β
} Proof: Suppose to the contrary that TM R decides ELBA . We construct TM S that decides ATM. S = `` On input β©π΄,πβͺ, where π΄ is a TM and w is a string: Construct an LBA π© from π΄ and π: Run TM R on input <π©>. If , accept. O.w. reject.ββ π© = `` On input x, Accept if x = πͺ π #β¦# πͺ β is the accepting configfaddur computation history of M on w: πͺ π is the starting configuration of π΄ on π€ Each πͺ π+π legally follows from πͺ π πͺ β is an accepting configuration for π΄ ββ it rejects 3/17/2016
15
ALLPDA = { π· β£ π· is a PDA that accepts all strings }
ALLPDA is undecidable ALLPDA = { π· β£ π· is a PDA that accepts all strings } We can use the computation history method to show that ALLPDA is undecidable. It follows that ALLCFG is undecidable. It follows that EQCFG is undecidable. 3/17/2016
16
Problems in language theory
ADFA decidable ACFG decidable EDFA decidable ECFG decidable EQDFA decidable ATM undecidable ETM undecidable EQCFG undecidable EQTM undecidable 3/17/2016
17
Post Correspondence Problem
Domino: π ππ . Top and bottom are strings. Input: collection of dominos. ππ πππ , ππ πππ , ππ ππ , ππππ π Match: list of some of the input dominos (repetitions allowed) with top = bottom ππ πππ , ππ πππ , ππ ππ , ππ πππ , ππππ π Problem: determine if a match exists. POST={input with a match} is undecidable. We can use the computation history method to show that ALLPDA is undecidable. 3/17/2016
18
Exercise (πβπ)(πβπ)|πΈ| ππ πΈ ππ πΈ β
|πΊ| ππ πΈ β
πΊ (πβπ)(πβπ)
A two-dimensional automaton (2DIM-DFA) takes an πΓπ rectangle as input, for any π,πβ₯π. The boundary squares contain #; internal squares contain symbols from alphabet πΊ. The transition function πΉ:πΈΓ πΊβͺ # βπΈΓ π³,πΉ,πΌ,π« indicates the next state and head movement (left, right, up, down). How many distinct configurations does a 2DIM-DFA have on a given input? (πβπ)(πβπ)|πΈ| ππ πΈ ππ πΈ β
|πΊ| ππ πΈ β
πΊ (πβπ)(πβπ) None of the above. {madam, dad, but, tub, book} # # π π # π π # π π # π π # 3/17/2016
19
Exercise YES to both. NO to both. YES to 1, NO to 2.
Let π 2DIMβDFA = { π«,π β£ D is a 2DIM-DFA and π« accepts π} Can a 2DIM-DFA loop? Is π 2DIMβDFA decidable? YES to both. NO to both. YES to 1, NO to 2. NO to 1, YES to 2. {madam, dad, but, tub, book} 3/17/2016
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.