Welcome! Log In Create A New Profile

Advanced

2006 Q4

Posted by Rey 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar
Rey
2006 Q4
October 29, 2010 03:51PM
Question 4 (2006)

So L1 and L2 could be describe as follows.

The language L1 S -> L
The language L2 S -> L

Now take all nonterminals in L1 and append a subscript 1 and
take all nonterminals in L2 and append a subscript 2
So you get

S1 -> L1 and
S2 -> L2

Now create a new CFG of the combined languages and add the line

S -> S1S2

Obviously the languages have not been changed by the additional sub script, and no duplicate nonterminals have been created. The CFL create by S1 followed by the CFL S2 is still context free, therefore the product of two CFL's is context free/closed.

Now proof that the CFG is still correct (will fill later):
1) All words in L1L2 can be generated by S
2) S generates all words in L1L2
Sorry, only registered users may post in this forum.

Click here to login