✬ ✩ Griffith University 3130CIT Theory of Computation (Based on slides by Harald Søndergaard of The University of Melbourne) More Undecidability ✫ ✪ 14-0
✬ ✩ Computation Histories Sometimes it is useful to consider the language of computation histories for a machine. Some important reduction proofs rely on this. An accepting computation history for M on w is a sequence C 1 , . . . , C k of configurations, with C 1 the start configuration and C k an accepting configuration. A rejecting computation history is defined similarly. Note that these are finite sequences. A deterministic machine has at most one computation history (none if it fails to halt). ✫ ✪ 14-1
✬ ✩ Linear-Bounded Automata A linear-bounded automaton (LBA) is a Turing machine which can use only a finite segment of its tape, say, the part occupied by input. The acceptance problem for LBAs is decidable: A LBA = {� M, w � | M is an LBA that accepts w } can be decided because there are only finitely many different configurations for a given LBA. Let q = | Q | , n = | w | , t = | Γ | , and k = qnt n . The TM that decides A LBA simulates M on w for up to k steps, accepting or rejecting according to M . If M has not halted by then, the simulating machine rejects. ✫ ✪ 14-2
✬ ✩ LBA Emptiness is Undecidable Theorem: ELBA = {� M � | M is an LBA and L ( M ) = ∅} is undecidable. We reduce A TM to E LBA . For a given M and w , we can construct an LBA B which accepts exactly the accepting computation histories for M on w . # ���� # ���� # · · · # ���� # C 1 C 2 C k B has to check that • C 1 is the start configuration for M on w , • each C i +1 follows legally from C i , • C k is an accepting configuration. All this can be done in bounded space. ✫ ✪ 14-3
✬ ✩ LBA Emptiness is Undecidable (cont.) Now we are ready for the reduction. Assume that R decides E LBA . We can decide A TM as follows: 1. Given M and w , construct the LBA B . 2. Run R on � B � . 3. If R rejects, accept ; if it accepts, reject . But we already know that A TM is undecidable. Hence E LBA is undecidable. ✫ ✪ 14-4
✬ ✩ CFG Exhaustiveness is Undecidable Theorem: AllCFG = {� G � | G is a CFG and L ( G ) = Σ ∗ } is undecidable. For a proof, see Sipser page 181. Is this result surprising? Recall that {� G � | G is a CFG and L ( G ) = ∅} is decidable. ✫ ✪ 14-5
✬ ✩ Post’s Correspondence Problem Or just PCP . Given a finite set of “dominos” such as �� b � a � � � ca � � abc �� , , , ca ab a c Formally, a set of pairs ( t i , b i ) with t i , b i ∈ ΣΣ ∗ . (There is an infinite supply of each domino.) Is there a sequence of dominos that produce a match, that is, the top halves spell the same string as the bottom halves? In this case, yes: � a � � b � � a � � ca � � abc � ab ca a ab c ✫ ✪ 14-6
✬ ✩ PCP (cont.) How about this case? �� a � c � � bc � � � abc �� , , , cb ba aa c And this? �� ab � � bba � � aba �� , , aba aa bab And this? �� baa � � aaa �� , abaaa aa Yes, � � baa � aaa � � aaa � aa abaaa aa ✫ ✪ 14-7
✬ ✩ PCP Is Undecidable Theorem: PCP is undecidable. The proof has tedious details, but the idea is simple. We reduce ATM to PCP via computation histories. That is, for given M and w we construct an instance P of PCP such that P has a solution iff M accepts w . A solution to P will effectively simulate the running of M on w . Let M = ( Q, Σ , Γ , δ, q 0 , q a , q r ). ✫ ✪ 14-8
✬ ✩ PCP Is Undecidable (cont.) Dominos for the problem: To start the simulation: � � # # q 0 w 1 w 2 · · · w n # To simulate the tape head moving right: � qa � br whenever δ ( q, a ) = ( r, b, R ). To simulate the tape head moving left: � cqa � rcb whenever δ ( q, a ) = ( r, b, L ). ✫ ✪ 14-9
✬ ✩ PCP Is Undecidable (cont.) To simulate the tape not affected by a transition: � a � a for each a ∈ Γ. To make trailing blanks explicit: � # � � # � To let the top string “catch up” once we get to q a : � aq a � � q a a � � q a ## � , , q a q a # ✫ ✪ 14-10
✬ ✩ PCP Is Undecidable (cont.) Let us see how this works. Let w be 010 and assume M just moves through the input, reversing the bits. So δ ( q 0 , 0) = (1 , q 0 , R ) δ ( q 0 , 1) = (0 , q 0 , R ) δ ( q 0 , � � ) = ( q a , � � , L ) The match then begins � � # # q 0 010# The only way we can continue the match is � � � q 0 0 � � 1 � � 0 � � # � # # q 0 010# 1 q 0 1 0 # We are then forced to add � 1 � � q 0 1 � � 0 � � # � � 1 � � 0 � � q 0 0 � � # � 1 0 q 0 0 # 1 0 1 q 0 # ✫ ✪ 14-11
✬ ✩ PCP Is Undecidable (cont.) At this point the upper sequence is # q 0 010#1 q 0 10#10 q 0 0# and the lower is # q 0 010#1 q 0 10#10 q 0 0#101 q 0 # Using simple dominos and adding � # � � # � we extend the sequences to # q 0 010#1 q 0 10#10 q 0 0#101 q 0 # and # q 0 010#1 q 0 10#10 q 0 0#101 q 0 #101 q 0 � � # ✫ ✪ 14-12
✬ ✩ PCP Is Undecidable (cont.) Now we can use the last transition domino to get: # q 0 010#1 q 0 10#10 q 0 0#101 q 0 #101 q 0 � � # and # q 0 010#1 q 0 10#10 q 0 0#101 q 0 #101 q 0 � � #10 q a 1 � � # The match can then be completed using the three “catch up” dominoes. ✫ ✪ 14-13
✬ ✩ PCP Is Undecidable (cont.) We have cheated slightly, in that we required the match to begin with a designated domino. This is not a serious flaw. We reduced A TM to this modified PCP , and it is quite easy to reduce the latter to PCP proper. ✫ ✪ 14-14
✬ ✩ Domino Snakes Consider a finite set of types of tiles ⊠ . There are infinitely many tiles of each type. Can points X and Y in the plane be connected? Y X If there are no constraints on where the snake can go, the problem is decidable. ✫ ✪ 14-15
✬ ✩ Domino Snakes (cont.) Can X and Y be connected? Y X In finite segment of plane: also decidable. ✫ ✪ 14-16
✬ ✩ Domino Snakes (cont.) Can points X and Y be connected? Y X In half-plane: Undecidable! Sometimes our intuition is no guide at all. ✫ ✪ 14-17
Recommend
More recommend