00:02
We are given two contextary grammars which generate two languages l of g one and l of g two and we are given sets and we are asked to show that there is a context tree grammar generating each of these sets so in part a we're given the set which is the union of l of g one and l of g two well to make this a little bit simpler suppose that the non non -termal symbols of g1 and g2 are disjoint.
01:22
And if this is not the case, we can obviously just give the symbols, say those in g2, new names so that the symbols will be destroyed.
01:35
And this won't change the language that the grammar generates.
01:42
And we have start symbols s1 and s2.
02:16
And now we'll want to take, we'll define our new grammar, g, by taking all the rules of production from g1 and g2 along with the symbols, so all the rules and symbols from g1 and g2, add a new symbol s, which is the start symbol for g.
03:19
And in part a, so you're trying to find grammar that generates lg1, you mean lg2, well, we want strings that generate that either grammar g1 or grammar g2 generate.
03:38
So we want to add the rules, s produces s1, and the rule s produces s2.
03:50
In this way we can produce or derive sentences from either grammar.
03:59
And this is really the contribution for this part.
04:04
Now in part b, we're asked to find a context -free grammar generating the set l of g1, l -g2...