# Module31 - 1 Module 31 • Closure Properties for CFL’s...

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

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

View Full Document

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

View Full Document

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

View Full Document

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.

Unformatted text preview: 1 Module 31 • Closure Properties for CFL’s – Kleene Closure – Union – Concatenation • CFL’s versus regular languages – regular languages subset of CFL 2 Closure Properties for CFL’s Kleene Closure 3 CFL closed under Kleene Closure • Let L be an arbitrary CFL • Let G 1 be a CFG s.t. L(G 1 ) = L – G 1 exists by definition of L 1 in CFL • Construct CFG G 2 from CFG G 1 • Argue L(G 2 ) = L * • There exists CFG G 2 s.t. L(G 2 ) = L * • L * is a CFL 4 Visualization L * L CFL CFG’s • Let L be an arbitrary CFL • Let G 1 be a CFG s.t. L(G 1 ) = L – G 1 exists by definition of L 1 in CFL • Construct CFG G 2 from CFG G 1 • Argue L(G 2 ) = L * • There exists CFG G 2 s.t. L(G 2 ) = L * • L * is a CFL G 1 G 2 5 Algorithm Specification • Input – CFG G 1 • Output – CFG G 2 such that L(G 2 ) = CFG G 1 CFG G 2 A 6 Construction • Input – CFG G 1 = (V 1 , Σ , S 1 , P 1 ) • Output – CFG G 2 = (V 2 , Σ , S 2 , P 2 ) • V 2 = V 1 union {T} – T is a new symbol not in V 1 or Σ • S 2 = T • P 2 = P 1 union ?? 7 Closure Properties for CFL’s Kleene Closure Examples 8...
View Full Document

{[ snackBarMessage ]}

### Page1 / 16

Module31 - 1 Module 31 • Closure Properties for CFL’s...

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

View Full Document
Ask a homework question - tutors are online