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

The Gateway to Computer Science Excellence

+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}**

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.4k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,741 questions

57,253 answers

198,063 comments

104,700 users