because we can't have a c in the first place when S is substituted the grammar was S -> ABC A -> a | e (think of e as epsilon please) B -> b C -> c now, S is substituted by A A is then substituted by a, which is a terminal So, we can have an `a` at the first position when S is substituted with terminals Hence we put `a` in the set of FIRST(S) i.e. FIRST(S) = {a} Now, A can also be substituted by e(epsilon) In this case, when we move ahead with S -> ABC, after A comes B, and B->b (from the grammar) Since epsilon means null and is not written in the final string of terminals, in this specific case, when S is substituted, it starts with a `b` That means, S can also be substituted by a terminal string which starts with `b`. So we can push `b` in the FIRST(S) FIRST(S) = {a, b} But in no case can there be a terminal string for S which starts with C, cause B will always derive b, and since B comes before C in S, i.e. S -> ABC, S will always have at least a b before c. Hence, there will be no terminal string for S which starts with c, so we don't put c in the FIRST(S)
this has helped me more than my 2 hours lecture... thank you so much
so beautiful , so elegant just looking like a wow! amazing series .......please complete it before jan my end sems a whole hearted request!
🥺❣
Already completed
i really loved the way you connect things this is what missing in many youtube videos , thankyou so much
so beautifully explain
Thanks for the nice explanation💜
dude thank you soooo much ur a lifesaver
are u gonna complete the aptitude and reasoning playlist??
what's the FIRST(A):
Is it {a,ε} or {a} ?
Sir here we no need find the FIRST (A)
FIRST (B)
or
We have to do that...?
why in the first(S) w didn't put c ??
because we can't have a c in the first place when S is substituted
the grammar was
S -> ABC
A -> a | e (think of e as epsilon please)
B -> b
C -> c
now, S is substituted by A
A is then substituted by a, which is a terminal
So, we can have an `a` at the first position when S is substituted with terminals
Hence we put `a` in the set of FIRST(S)
i.e. FIRST(S) = {a}
Now, A can also be substituted by e(epsilon)
In this case, when we move ahead with S -> ABC, after A comes B, and B->b (from the grammar)
Since epsilon means null and is not written in the final string of terminals, in this specific case, when S is substituted, it starts with a `b`
That means, S can also be substituted by a terminal string which starts with `b`. So we can push `b` in the FIRST(S)
FIRST(S) = {a, b}
But in no case can there be a terminal string for S which starts with C, cause B will always derive b, and since B comes before C in S, i.e. S -> ABC, S will always have at least a b before c.
Hence, there will be no terminal string for S which starts with c, so we don't put c in the FIRST(S)
is'nt it? ar'nt we? is'nt so? lol
You forgot did,t we😁