Computability and Complexity Lecture 6 Reductions via Computation - - PowerPoint PPT Presentation

computability and complexity
SMART_READER_LITE
LIVE PREVIEW

Computability and Complexity Lecture 6 Reductions via Computation - - PowerPoint PPT Presentation

Computability and Complexity Lecture 6 Reductions via Computation Histories Undecidability of Emptiness of Linear Bounded Automata Undecidability of Post Correspondence Problem given by Jiri Srba Lecture 6 Computability and Complexity 1/15


slide-1
SLIDE 1

Computability and Complexity

Lecture 6

Reductions via Computation Histories Undecidability of Emptiness of Linear Bounded Automata Undecidability of Post Correspondence Problem

given by Jiri Srba

Lecture 6 Computability and Complexity 1/15

slide-2
SLIDE 2

Reduction via Computation Histories

Recall Reduction from A to B A language A is reducible to language B iff a decider for B can be used to algorithmically construct a decider for problem A. If A is reducible to B and A is undecidable, then B is undecidable. Definition (Accepting/Rejecting Computation History) Let M be a TM. A computation history of M on input w is a sequence of configurations C1, C2, . . . , Cℓ such that: C1 = q0w is the initial configuration, Ci yields Ci+1 for all 1 ≤ i < ℓ, and Cℓ is a halting configuration (in either accept or reject state). If Cℓ is accepting, then the history is called accepting. If Cℓ is rejecting, then the history is called rejecting. M accepts w iff M on w has an accepting computation history.

Lecture 6 Computability and Complexity 2/15

slide-3
SLIDE 3

Linear Bounded Automaton and the Emptiness Problem

Definition Linear bounded automaton (LBA) is a restricted Turing machine M such that when M runs on any input string w, its head always stays within the first |w| cells. Theorem The language ALBA is decidable. Emptiness Problem: ”Given an LBA B, is L(B) = ∅?” ELBA

def

= {B | B is an LBA such that L(B) = ∅ } Theorem The language ELBA is undecidable. Proof: By reduction from ATM to ELBA via computation histories.

Lecture 6 Computability and Complexity 3/15

slide-4
SLIDE 4

Proof (Reduction for ATM to ELBA)

1 Assume that we have a decider R for ELBA. 2 Using R, we construct a decider S for ATM:

S = ” On input M, w:

  • 1. From M and w build an LBA B such that

L(B) = ∅ if and only if M accepts w

  • 2. Run R (decider for ELBA) on B.
  • 3. If R accepted then S rejects.

If R rejected then S accepts. ”

3 We know that S cannot exist, and hence R cannot exist either. 4 Conclusion: ELBA is undecidable.

TO DO (The Tricky Part) From M and w construct an LBA B s.t. L(B) = ∅ iff M accepts w.

Lecture 6 Computability and Complexity 4/15

slide-5
SLIDE 5

Proof (Construction of LBA B from M and w)

Idea: We construct B such that it accepts exactly all strings of the form #C1#C2#C3# . . . #Cℓ# where C1, C2, C3, . . . , Cℓ is an accepting computation history

  • f M on w.

Now clearly L(B) = ∅ if and only if M accepts w.

Lecture 6 Computability and Complexity 5/15

slide-6
SLIDE 6

Proof (Construction of LBA B from M and w)

B = ” On input x:

  • 1. If x is not of the form #C1#C2# . . . #Cℓ# for some

strings C1, . . . , Cℓ then B rejects.

  • 2. Verify whether #C1#C2# . . . #Cℓ# satisfies

the following three conditions: a) C1 = q0w b) Cℓ is an accept configuration c) Ci yields Ci+1 for all i (zigzag between them)

  • 3. If all three conditions are true, then S accepts,

else S rejects. ” Notice The constructed machine B is LBA. We actually never run B, it is merely the input for R (the decider for ELBA) in order to achieve a contradiction.

Lecture 6 Computability and Complexity 6/15

slide-7
SLIDE 7

More Undecidable Problem from Language Theory

Problem: ”Given a CFG G, is L(G) = Σ∗?” ALLCFG

def

= {G | G is a CFG such that L(G) = Σ∗ } Theorem The language ALLCFG is undecidable. Proof: very interesting technique based on computation histories (optional reading in the book). EQCFG

def

= {G1, G2 | G1 and G2 are CFGs s.t. L(G1) = L(G2) } Theorem The language EQCFG is undecidable. Proof: By reduction from ALLCFG. Next tutorial.

Lecture 6 Computability and Complexity 7/15

slide-8
SLIDE 8

Post Correspondence Problem (Emil Post, 1946)

Instance of the Post Correspondence Problem (PCP): A PCP instance over Σ is a finite collection P of dominos P = { t1 b1

  • ,

t2 b2

  • , · · · ,

tk bk

  • }

where for all i, 1 ≤ i ≤ k, ti, bi ∈ Σ∗. Match: Assume a given PCP instance P. A match is a nonempty sequence i1, i2, . . . , iℓ

  • f numbers from {1, 2, . . . , k} (repeating is allowed) such that

ti1ti2 . . . tiℓ = bi1bi2 . . . biℓ .

Lecture 6 Computability and Complexity 8/15

slide-9
SLIDE 9

Post Correspondence Problem (PCP)

Question: Does a given PCP instance P have a match? Language formulation: PCP def = {P | P is a PCP instance and it has a match } Theorem The language PCP is undecidable. Proof: By reduction via computation histories from ATM.

Lecture 6 Computability and Complexity 9/15

slide-10
SLIDE 10

Proof Structure (Undecidability of PCP)

The reduction will work in two steps:

1 We reduce ATM to MPCP. 2 We reduce MPCP to PCP.

MPCP (Modified PCP): MPCP def = {P | P is a PCP instance and it has a match which starts with index 1 } In reduction from ATM we will without loss of generality assume that on input M, w of ATM the machine M never attempts to move its head off the left-hand end of the tape.

Lecture 6 Computability and Complexity 10/15

slide-11
SLIDE 11

Proof (Reduction from ATM to MPCP)

For input M, w of ATM construct a MPCP instance P such that M accepts w iff P has a match starting with domino 1.

1 Add a start (first) domino

  • #

#q0w#

  • .

2 If δ(q, a) = (r, b, R) add the domino

qa

br

  • .

3 If δ(q, a) = (r, b, L) add the domino

cqa

rcb

  • for all c ∈ Γ.

4 Add the domino

a

a

  • for all a ∈ Γ.

5 Add the dominos

#

#

  • and

#

⊔#

  • .

6 Add the dominos

aqaccept

qaccept

  • and

qaccepta

qaccept

  • for all a ∈ Γ.

7 Finally add the domino

qaccept##

#

  • .

Lecture 6 Computability and Complexity 11/15

slide-12
SLIDE 12

Proof (Reduction from MPCP to PCP)

Conclusion MPCP is undecidable. Now we want to reduce MPCP to PCP: Given an instance P of MPCP we build an instance P′ of PCP s.t. P has a match starting with domino 1 iff P′ has a match. Let w = a1a2 . . . an be a string. We use the notation ∗w def = ∗a1 ∗ a2 ∗ . . . ∗ an, w∗ def = a1 ∗ a2 ∗ . . . ∗ an∗, and ∗w∗ def = ∗a1 ∗ a2 ∗ . . . ∗ an∗.

Lecture 6 Computability and Complexity 12/15

slide-13
SLIDE 13

Proof (Reduction from MPCP to PCP)

Given an instance P of MPCP we build an instance P′ of PCP s.t. P has a match starting with domino 1 iff P′ has a match. Construction of P′ from P (here ∗ and ⋄ are fresh symbols): For the first domino

t1

b1

  • in P we add

∗t1

∗b1∗

  • to P′.

For all dominos

ti

bi

  • in P we add the dominos

∗ti

bi∗

  • to P′.

We add the domino

∗⋄

  • to P′.

It is easy to see that if in P (where i1 = 1) ti1ti2 . . . tiℓ = bi1bi2 . . . btℓ then in P′ ∗ti1 ∗ ti2 ∗ . . . ∗ tiℓ ∗ ⋄ = ∗bi1 ∗ bi2 ∗ . . . ∗ btℓ ∗ ⋄ and vice verse.

Lecture 6 Computability and Complexity 13/15

slide-14
SLIDE 14

Conclusion

Conclusion PCP is undecidable. Facts: Undecidability of PCP can be further used to show that e.g. the following problems are undecidable too: ”Is a given CGF ambiguous?” ”Given CFGs G1 and G2 is L(G1) ∩ L(G2) = ∅?” And many more ...

Lecture 6 Computability and Complexity 14/15

slide-15
SLIDE 15

Exam Questions

Undecidability of emptiness for LBA. PCP and MPCP definitions and examples. Undecidability proofs of MPCP and PCP (two reductions).

Lecture 6 Computability and Complexity 15/15