check about epsilon... It can't be in FIRST(S)

1 vote

FIRST(S)

**Let the set be k={}**

FIRST(S) = see first what A is deriving

A -> BD

now see what B is deriving

**case ****1** : B->b

so A->bD

so k ={b}

**case 2** : B-> ɛ

so A->D

now see what D is deriving

**case 2.1** : D->d

so A->d

so k ={b,d}

**case 2.2** : D-> ɛ

so A-> ɛ

putting A-> ɛ in S

so S->a

so k = {b,d,a}

so** FIRST(S) = {b,d,a}**