Docsity

CFL Closed Under Set Intersection - Slides - Computability and Languages | CSE 460, Study notes of Computer Science

Toggle sidebar
bg1
1
1
Module 35
• Attempt to prove that CFL’s are closed
under intersection
– Review previous constructions
– Translate previous constructions to current
setting
– Prove modified result
2
High Level Overview
3
CFL closed under set intersection
•Let L
1and L2be arbitrary CFL’s
•Let M
1and M2be PDA’s s.t. L(M1) = L1, L(M2) =
L2
–M
1and M2exist by definition of L1and L2are CFL’s and
the fact that for every CFG, there is an equivalent PDA
• Construct PDA M3from PDA’s M1and M2
• Argue L(M3) = L1intersect L2
• There exists a PDA M3s.t. L(M3) = L1intersect L2
•L
1intersect L2is a CFL
4
Visualization
•Let L1and L2be arbitraryCFL’s
•Let M1and M2be PDA’s s.t. L(M1) = L1,
L(M2) = L2
•M1and M2exist by definition of L1
and L2are CFL’s and the fact that for
every CFG, there is an equivalent PDA
•Construct PDA M3from PDA’s M1and M2
•Argue L(M3) = L1intersect L2
•There exists a PDA M3s.t. L(M3) = L1
intersect L2
•L1intersect L2is a CFL
L1intersect L2
L1
L2
CFL
M3
M1
M2
PDA’s
5
Algorithm Specification
• Input
– Two PDA’s M1and M2
• Output
– PDA M3such that L(M3) = L(M1) intersection L(M2)
PDA M1
PDA M2
PDA M3
A
6
Review Previous Results
pf2

Partial preview of the text

Download CFL Closed Under Set Intersection - Slides - Computability and Languages | CSE 460 and more Study notes Computer Science in PDF only on Docsity!

1

Module 35

  • Attempt to prove that CFL’s are closed

under intersection

  • Review previous constructions
  • Translate previous constructions to current setting
  • Prove modified result

2

High Level Overview

3

CFL closed under set intersection

  • Let L 1 and L 2 be arbitrary CFL’s
  • Let M 1 and M 2 be PDA’s s.t. L(M 1 ) = L 1 , L(M 2 ) = L (^2) - M 1 and M 2 exist by definition of L 1 and L 2 are CFL’s and the fact that for every CFG, there is an equivalent PDA
  • Construct PDA M 3 from PDA’s M 1 and M 2
  • Argue L(M 3 ) = L 1 intersect L 2
  • There exists a PDA M 3 s.t. L(M 3 ) = L 1 intersect L 2
  • L 1 intersect L 2 is a CFL 4

Visualization

•Let L 1 and L 2 be arbitrary CFL’s •Let M 1 and M 2 be PDA’s s.t. L(M 1 ) = L 1 , L(M 2 ) = L 2 •M 1 and M 2 exist by definition of L (^1) and L 2 are CFL’s and the fact that for every CFG, there is an equivalent PDA •Construct PDA M 3 from PDA’s M 1 and M 2 •Argue L(M 3 ) = L 1 intersect L 2 •There exists a PDA M 3 s.t. L(M 3 ) = L (^1) intersect L 2 •L 1 intersect L 2 is a CFL

L 1 intersect L 2

L 1

L 2

CFL

M 3 M 1

M 2

PDA’s

5

Algorithm Specification

  • Input
    • Two PDA’s M 1 and M 2
  • Output
    • PDA M 3 such that L(M 3 ) = L(M 1 ) intersection L(M 2 )

PDA M 1 PDA M 2 A PDA M^3

6

Review Previous Results

7

Underlying Idea *

  • Previous Results
    • recursive languages are closed under set intersection
    • r.e. languages are closed under set intersection
    • regular languages are closed under set intersection
  • What is the idea underlying the constructions used to prove these previous results?

8

Implementation with FSA’s *

  • Given the basic idea underlying these constructions, how was this idea implemented in when dealing with FSA’s?
  • That is, restate the construction used to prove that the regular languages are closed under set intersection. - Specify the output FSA in terms of the input FSA’s

9

Applying previous approach to

PDA’s

10

Applying approach to PDA’s *

  • Given the basic idea underlying these constructions, try and implement this idea in a construction working with PDA’s rather than FSA’s.
  • That is, give a construction specifying how the output PDA is built out of the input PDA’s

11

Problem *

  • Describe what goes wrong when applying this idea to PDA’s instead of FSA’s.
  • Does this prove that CFL’s are NOT closed under set intersection?

12

Modified Result *

  • What happens if the inputs are 1 FSA and 1 PDA?
  • What modified result does the resulting construction prove?