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

the rst index has to b e 1 b ecause only the pair 10 and
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1 P
  • st's
Corresp
  • ndence
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
  • lists
  • f
\corresp
  • nding"
strings (w 1 ; w 2 ; : : : ; w n ) and x 1 ; x 2 ; : : : ; x n ), do es there exist a nonempt y sequence
  • f
in tegers i 1 ; i 2 ; : : : ; i k suc h that w i 1 w i 2
  • w
i+k = x i 1 x i 2
  • x
i k ?
  • In
tuition: w e can try all lists i 1 ; i 2 ; : : : ; i k in
  • rder
  • f
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
  • th
lists is 10101001011. Another Example F rom the course reader: (10; 011; 101) and (101; 11; 011).
  • Another
argumen t wh y this instance
  • f
PCP has no solution:

The rst index has to b e 1 b ecause
  • nly
the pair 10 and 101 b egin with the same sym b
  • l.

Then, whatev er indexes w e c ho
  • se
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
  • nding
pair there are at least as man y 1's in the second list). Th us, the t w
  • 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 L u to MPCP .

This is the
  • nly
reason for MPCP: it mak es the reduction from L u easier. 4. Conclude that if PCP is decidable, so is MPCP , and so is L u (whic h w e kno w is false). 1
slide-2
SLIDE 2 Reduction
  • f
MPCP to PCP T ric k: giv en a MPCP instance, in tro duce a new sym b
  • l
*.
  • In
the rst list, * app ears after ev ery sym b
  • l,
but in the second list, the * app ears b efor e ev ery sym b
  • l.

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 w 1 and x 1 from the MPCP 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 w 1 also gets an extra * at the b eginning.

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
  • l,
so this pair can b e used
  • nly
to complete a matc h.

Referred to as the \nal pair." Pro
  • f
the Reduction is Correct
  • If
the MPCP instance has a solution 1 follo w ed b y i 1 ; i 2 ; : : : ; i k , Then the PCP instance has a solution, whic h is the same, using the rst pair in place
  • f
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
  • ther
pair b egins with the same sym b
  • l.
Th us, remo ving the *'s and deleting the last pair giv es a solution to the MPCP instance. Reduction
  • f
L u to MPCP
  • In
tuition: The equal strings represen t a computation
  • f
a TM M
  • n
input w .

Sequence
  • f
ID's separated b y a sp ecial mark er #.
  • First
pair is # and #q w #. 2
slide-3
SLIDE 3
  • String
from rst list is alw a ys
  • ne
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. X and X for ev ery tap e sym b
  • l
X . Allo ws cop ying
  • f
sym b
  • ls
that don't c hange from
  • ne
ID to the next. 2. If
  • (q
; X ) = (P ; Y ; R), then q X and Y p is a 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
  • ut
CFL's W e are applying the theory
  • f
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
  • u
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
  • ssible
for y
  • u
to succeed.
  • Supp
  • se
next spring's CS154 pro ject is to tak e a CF G and tell whether it is am biguous. Y
  • u
can't do it b ecause the problem is undecidable! Con v erting PCP to CF G's F
  • r
eac h list A = (w 1 ; w 2 ; : : : ; w n ) w e can construct a gramma r and a language that represen ts all sequences
  • f
in tegers i 1 ; i 2 ; : : : ; i k and the strings w i 1 w i 2
  • w
i k that are constructed from those lists
  • f
in tegers.
  • Use
a 1 ; a 2 ; : : : ; a n as new sym b
  • ls
(not in the alphab et
  • f
the PCP instance) represen ting the in tegers.
  • The
\grammar for list A": S ! w 1 S a 1 j w 2 S a 2 j
  • j
w n S a n j .

Yields all concatenations
  • f
w 's follo w ed b y the rev erse
  • f
their index sequence. Reduction
  • f
PCP to CF G Am biguit y Problem Giv en lists A and B , construct grammar as follo ws:
  • S
! A j B .
  • A
is the start sym b
  • l
for a grammar from list A; B is the same for list B . 3
slide-4
SLIDE 4
  • If
there is a solution to the PCP instance, then the same string can b e deriv ed starting S ) lm A and S ) lm B .

Con v ersely , the
  • nly
w a y a string can ha v e t w
  • leftmost
deriv ations is if they b egin in these t w
  • w
a ys, b ecause the grammar
  • f
  • ne
list is unam biguous. Example Use the lists
  • f
  • ur
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: S ! A j B A ! 1Aa j 0Ab j 010Ac j 11Ad j
  • B
! 10B a j 10B b j 01B c j 1B d j
  • A
string with t w
  • leftmost
deriv ations: 10101001011dccaba.

S ) lm 1Aa ) lm 10Aba ) lm 101Aaba ) lm 101010Acaba ) lm 101010010Accaba ) lm 10101001011Adccaba ) lm 10101001011dccaba.

S ) lm 10B a ) lm 1010B ba ) lm 101010B aba ) lm 10101001B caba ) lm 1010100101B ccaba ) lm 10101001011B dccaba ) lm 10101001011dccaba. Undecidable Problem: Is the In tersection
  • f
Tw
  • CFL's
Empt y? Consider the t w
  • list
languages from a PCP instance. They ha v e an empt y in tersection if and
  • nly
if the PCP instance has a solution. Complemen ts
  • f
List Languages W e can get
  • ther
undecidabilit y results ab
  • ut
CFL's if w e rst establish that the complemen t
  • f
a list language is a CFL.
  • PD
A is easier approac h.
  • Accept
all ill-formed input (not a sequence
  • f
sym b
  • ls
follo w ed b y indexes) using the state.
  • F
  • r
inputs that b egin with sym b
  • ls
from the alphab et
  • f
the PCP instance, store them
  • n
the stac k, accepting as w e go. 4
slide-5
SLIDE 5
  • When
index sym b
  • ls
start, p
  • p
the stac k, making sure that the righ t strings w ere found
  • n
top
  • f
the stac k; again, k eep accepting un til
  • When
w e exp
  • se
the b
  • ttom-of-stac
k mark er, w e ha v e found a sequence
  • f
strings from the PCP list and their matc hing indexes. This string is not in the complemen t
  • f
the list language, so don't accept.
  • If
more index sym b
  • ls
come in, then w e ha v e a misma tc h, so start accepting again and k eep
  • n
accepting. Undecidable Problem: Is a CFL Equal to
  • ?
  • T
ak e an instance
  • f
PCP , sa y lists A and B .
  • The
union
  • f
the complemen ts
  • f
their t w
  • list
languages is
  • if
the instance has no solution, and something less if there is a solution. Undecidable Problem: Is the In tersection
  • f
Tw
  • CFL's
Regular? Key idea: the in tersection
  • f
list languages is regular if and
  • nly
if it is empt y . Th us, PCP reduces to regularit y
  • f
in tersection for CFL's.
  • Ob
viously , if empt y , it is regular.
  • Supp
  • se
the in tersection
  • f
t w
  • list
languages, for A and B , L A \ L B , is nonempt y . Then there is a solution to this instance
  • f
PCP , sa y string w and string
  • f
index sym b
  • ls
i.

Example: for the running PCP instance, w = 10101001011 and i = abaccd.
  • Then
i k is an index sequence that yields solution w k for all k .

General principle: concatenation
  • f
PCP solutions is a solution.
  • Consider
homomorphism h(0) = w and h(1) = i R .
  • h
1 (L A \ L B ) is f0 n 1 n j n
  • 1g.
  • Since
regular languages are closed under in v erse homom
  • rphism
, if the in tersection w ere regular, so w
  • uld
h 1 (L A \ L B ) b e.
  • Since
w e kno w this language is not regular, w e conclude that L A \ L B is not regular. 5