00:01
Before deriving the string, we would go over the set of production p.
00:11
We have that s can be derived to a -b.
00:19
A can be derived as c -a.
00:23
B can be derived as b -a.
00:25
B can be derived as c -b.
00:28
B can be derived as b.
00:34
C can be derived as c -b.
00:38
B, c can be derived as b.
00:42
Okay, so for our first string, we have b -a -ba, b .a.
00:49
So we would, bottom parsing is when you start with a, sorry, we start with s, and then using the set of production p to derive the string.
00:59
So we have s.
01:03
S can be right as a and b.
01:10
And a b can be right as sorry, a can be right as c a capital b c a capital b can be c can be right as b so therefore we have b a capital b and b capital b can be right as capital b and a so capital b can be again be right as smaller b.
01:46
So therefore we know that b -a -b -a belongs to the language generated by the grandma.
02:03
So for the next string which is ab ab we're using top -down parsing we would have starting from s as as as is can be right as a -b.
02:22
As c small a capital b but however we know that c can only be used the production step c b or c would go to b which imply that the string string has to start with a b or a c c so therefore oh so i messed up here for a bit.
03:08
So the string has to start with either a c or a b...