the rst index has to b e 1 b ecause only the pair 10 and
play

The rst index has to b e 1 b ecause only the pair 10 - PDF document

P ost's Corresp ondence Problem An undecidable, but RE, problem that app ears not to ha v e an ything to do with TM's. Giv en t w o lists of \corresp onding" strings ( w ; w ; : : : ; w ) and


  1. P ost's Corresp ondence Problem � An undecidable, but RE, problem that app ears not to ha v e an ything to do with TM's. � Giv en t w o lists of \corresp onding" strings ( w ; w ; : : : ; w ) and x ; x ; : : : ; x ), do es 1 2 n 1 2 n there exist a nonempt y sequence of in tegers i ; i ; : : : ; i suc h that w w � � � w = 1 2 k i i i + k 1 2 x x � � � x ? i i i 1 2 k � In tuition: w e can try all lists i ; i ; : : : ; i in 1 2 k order of k . If w e �nd a solution, the answ er is \y es." But if w e nev er �nd a solution, ho w can w e b e sure no longer solution exists, so w e can nev er sa y \no." Example (1 ; 0 ; 010 ; 11) and (10 ; 10 ; 01 ; 1). � A solution is 1 ; 2 ; 1 ; 3 ; 3 ; 4. � The constructed string from b oth lists is 10101001011. Another Example F rom the course reader: (10 ; 011 ; 101) and (101 ; 11 ; 011). � Another argumen t wh y this instance of PCP has no solution: ✦ The �rst index has to b e 1 b ecause only the pair 10 and 101 b egin with the same sym b ol. ✦ Then, whatev er indexes w e c ho ose to con tin ue, there will b e more 1's in the string constructed from the �rst list than the second (b ecause in eac h corresp onding pair there are at least as man y 1's in the second list). Th us, the t w o strings cannot b e equal. Plan to Sho w PCP is Undecidable 1. In tro duce MPCP , where the �rst pair m ust b e tak en �rst in a solution. 2. Sho w ho w to reduce MPCP to PCP . 3. Sho w ho w to reduce to MPCP . L u ✦ This is the only reason for MPCP: it mak es the reduction from L easier. u 4. Conclude that if PCP is decidable, so is MPCP , and so is L (whic h w e kno w is false). u 1

  2. Reduction of MPCP to PCP T ric k: giv en a MPCP instance, in tro duce a new sym b ol *. � In the �rst list, * app ears after ev ery sym b ol, but in the second list, the * app ears b efor e ev ery sym b ol. ✦ Example: the pair 10 and 011 b ecomes 1*0* and *0*1*1. ✦ Notice that no suc h pair can ev er b e the �rst in a solution. � T ak e the �rst pair and from the MPCP w x 1 1 instance (whic h m ust b e c hosen �rst in a MPCP solution) and add to the PCP instance another pair in whic h the *'s are as alw a ys, but also gets an extra * at the b eginning. w 1 ✦ Referred to as \pair 0." ✦ Example: if 10 and 011 is the �rst pair, also add to the PCP instance the pair *1*0* and *0*1*1. � Finally , since the strings from the �rst list will ha v e an extra * at the end, add to the PCP instance the pair $ and *$. ✦ $ is a new sym b ol, so this pair can b e used only to complete a matc h. ✦ Referred to as the \�nal pair." Pro of the Reduction is Correct � If the MPCP instance has a solution 1 follo w ed b y , Then the PCP i ; i ; : : : ; i k 1 2 instance has a solution, whic h is the same, using the �rst pair in place of pair 1, and terminating the list with the �nal pair. � If the PCP instance has a solution, then it m ust b egin with the \�rst pair," b ecause no other pair b egins with the same sym b ol. Th us, remo ving the *'s and deleting the last pair giv es a solution to the MPCP instance. Reduction of L to MPCP u � In tuition: The equal strings represen t a computation of a TM M on input w . ✦ Sequence of ID's separated b y a sp ecial mark er #. � First pair is # and # q w #. 0 2

  3. � String from �rst list is alw a ys one ID b ehind, unless an accepting state is reac hed, in whic h case the �rst string can \catc h up." � Some example pairs: 1. and for ev ery tap e sym b ol . Allo ws X X X cop ying of sym b ols that don't c hange from one ID to the next. 2. If ( q ) = ( P R ), then and is a � ; X ; Y ; q X Y p pair. Sim ulates a mo v e for the next ID. 3. If q is an accepting state, then X q Y and q is a pair for all X and Y . Allo ws ID to \shrink to nothing" when an accepting state is reac hed. Undecidable Problems Ab out CFL's W e are applying the theory of undecidabilit y in a useful w a y when w e sho w a real problem not to b e solv able b y computer. � Example: Y ou ma y think the CS154 pro ject w as hard, but at least there is an algorithm to con v ert RE's to DF A's, so it is at least p ossible for y ou to succeed. � Supp ose next spring's CS154 pro ject is to tak e a CF G and tell whether it is am biguous. Y ou can't do it b ecause the problem is undecidable! Con v erting PCP to CF G's F or eac h list A = ( w ; w ; : : : ; w ) w e can construct 1 2 n a gramma r and a language that represen ts all sequences of in tegers i ; i ; : : : ; i and the strings 1 2 k w w � � � w that are constructed from those lists i i i 1 2 k of in tegers. � Use a ; a ; : : : ; a as new sym b ols (not in the 1 2 n alphab et of the PCP instance) represen ting the in tegers. � The \grammar for list A ": ! S j j � � � j j � . w S a w S a w S a 1 1 2 2 n n ✦ Yields all concatenations of w 's follo w ed b y the rev erse of their index sequence. Reduction of PCP to CF G Am biguit y Problem Giv en lists and , construct grammar as follo ws: A B � S ! A j B . � A is the start sym b ol for a grammar from list A ; B is the same for list B . 3

  4. � If there is a solution to the PCP instance, then the same string can b e deriv ed starting S ) A and S ) B . lm lm ✦ Con v ersely , the only w a y a string can ha v e t w o leftmost deriv ations is if they b egin in these t w o w a ys, b ecause the grammar of one list is unam biguous. Example Use the lists of our �rst example: (1 ; 0 ; 010 ; 11) and (10 ; 10 ; 01 ; 1 ). Let a; b; c; d stand for the four index in tegers. The grammar is: ! j S A B ! 1 Aa j 0 Ab j 010 Ac j 11 Ad j A � ! 10 B j 10 B j 01 B j 1 B j B a b c d � � A string with t w o leftmost deriv ations: 10101001011 dccaba . ✦ ) 1 Aa ) 10 Aba ) 101 Aaba ) S lm lm lm lm 101010 Acaba ) 101010010 Accaba ) lm lm 10101001011 Adccaba ) lm 10101001011 dccaba . ✦ S ) 10 B a ) 1010 B ba ) lm lm lm 101010 B aba ) 10101001 B caba ) lm lm 1010100101 B ccaba ) lm 10101001011 B dccaba ) lm 10101001011 dccaba . Undecidable Problem: Is the In tersection of Tw o CFL's Empt y? Consider the t w o list languages from a PCP instance. They ha v e an empt y in tersection if and only if the PCP instance has a solution. Complemen ts of List Languages W e can get other undecidabilit y results ab out CFL's if w e �rst establish that the complemen t of a list language is a CFL. � PD A is easier approac h. � Accept all ill-formed input (not a sequence of sym b ols follo w ed b y indexes) using the state. � F or inputs that b egin with sym b ols from the alphab et of the PCP instance, store them on the stac k, accepting as w e go. 4

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend