# l15 - Lecture 15 Decision and closure properties of CFLs...

This preview shows pages 1–6. Sign up to view the full content.

Lecture 15: Decision and closure properties of CFLs David Dill Department of Computer Science 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Outline Closure properties of CFLs. Decision properties of CFLs 2
Closure Properties Substitutions A substitution is sort of a generalized homomorphism, where we map each member of Σ to a language , not a string. a Σ ,s ( a ) = L a , where L a is a context-free language (over any alphabet) s ( ǫ ) = { ǫ } s ( xa ) = s ( x ) · s ( a ) ( note: · is concatenation of languages, not strings.) s ( L ) = u w L s ( w ) 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Substitution Theorem Theorem Substituting CFLs for terminal symbols in a CFL results in a CFL. Proof sketch Given CFGs for everything, create a new CFG. Rename nonterminals all CFGs as necessary to make sure they are disjoint. Make a new CFG by converting the terminals of the original CFG to sentence symbols from the substituted CFGs, then take the union of all the productions. The result is a CFG for s(L). 4
The book does this with substitutions. Direct constructions are also easy. Union – Given G 1 with sentence symbol S 1 , and G 2 with S 2 , make the nonterminals disjoint, add new sentence symbol S , and the productions S S 1 | S 2 . L ( G ) = L ( G 1 ) L ( G 2 ) . Concatenation – Similarly, S S 1 S 2 . Kleene Closure – Similarly,

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 15

l15 - Lecture 15 Decision and closure properties of CFLs...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online