recategorized by
3,860 views
1 votes
1 votes

The equivalent production rules corresponding to the production rules $S \rightarrow S \alpha_1 \mid S \alpha_2 \mid \beta_1 \mid \beta_2$ is

  1. $S \rightarrow \beta_1 \mid \beta_2, A \rightarrow \alpha_1 A \mid \alpha_2 A \mid \lambda$
  2. $S \rightarrow \beta_1 \mid \beta_2 \mid \beta_1 A \mid \beta_2 A$, $A \rightarrow \alpha_1 A \mid \alpha_2 A$
  3. $S \rightarrow \beta_1 \mid \beta_2, A \rightarrow \alpha_1 A \mid \alpha_2 A$
  4. $S \rightarrow \beta_1 \mid \beta_2 \mid \beta_1 A \mid \beta_2 A, A \rightarrow \alpha_1 A \mid \alpha_2 A \mid \lambda$
recategorized by

1 Answer

6 votes
6 votes

$S \rightarrow S \alpha_1 \mid S\alpha_2 \mid \beta_1 \mid \beta_2 ,$

After removing left recursion we got 

$S \rightarrow \beta_1 \mid \beta_2 \mid \beta_1 A \mid \beta_2 A, A \rightarrow \alpha_1 A \mid \alpha_2 A \mid \lambda$

Hence,Option(D)$S \rightarrow \beta_1 \mid \beta_2 \mid \beta_1 A \mid \beta_2 A, A \rightarrow \alpha_1 A \mid \alpha_2 A \mid \lambda$

Answer:

Related questions

1 votes
1 votes
1 answer
2
go_editor asked Jul 14, 2016
2,228 views
The $mv$ command changesthe inodethe inode-numberthe directory entryboth the directory entry and the inode
3 votes
3 votes
1 answer
4
go_editor asked Jul 14, 2016
4,091 views
A virtual memory based memory management algorithm partially swaps out a process. This is an example ofshort term schedulinglong term schedulingmedium term schedulingmutu...