22.04.2014 Views

Lecture 3

Lecture 3

Lecture 3

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Proving new closure properties<br />

Method 2<br />

Adapt a machine<br />

Example: If L is regular so is L’ = {a1a3a5..a2n-1 | a1..a2n∊L}<br />

Let M be a DFA for L<br />

Define δ’(p,a) = {δ(p,ab) |<br />

b∊Σ}<br />

I extended δ:Q×Σ* → Q in the<br />

obvious way<br />

Make δ’ : 2 Q → 2 Q using union<br />

∀P⊆Q, δ’(P,a) = ∪p∊Pδ’(p,ab)<br />

F’ is subsets of Q containing<br />

a state of F<br />

M’ = (Q,Σ,δ’,{q0},F’) is an NFA for L’<br />

Proof ?<br />

Prove by induction on n that<br />

δ’(P,a1..an) = ∪q∊P{δ(q,a1b1a2b2..bn-1anbn) | bi∊Σ}<br />

Clearly if n=0, δ’(P,ε)={δ(q,ε) | q∊P}=P<br />

Assume ind.hyp. true ∀i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!