00:01
In this question, we need to write derivations of four strings of different lengths and obtain the language generated by using the grammar g, which is given by v is a set s, a, b, and t is a, comma, b, such that p is equal to s to a.
00:41
S to b, b to small b times b and a to small a times a.
00:51
Then a to lambda and b to lambda.
00:57
Now where s is the first non -terminal.
01:08
Now since s is the first non -terminal and a goes to lambda and a goes to a to a.
01:16
Therefore we can write that a goes to small a times a over lambda.
01:24
This will generate a star.
01:31
Similarly, b that goes to small b times b over lambda will generate b star.
01:43
Further, the length of the spring ln is given by a star plus b star.
01:56
Now, the derivation of four strings of various lengths is given by, in accordance with, according to the products, and we know that we always start with the leftmost non -terminal.
02:44
And we know that the leftmost non -terminal is s.
02:49
Therefore, we will start with s.
02:51
So for string 1, a, a is of length 2...