in Others
2,810 views
1 vote
1 vote

Given a grammar $S1 \rightarrow Sc, S \rightarrow SA  \mid A, A \rightarrow aSb \mid ab$, there is a rightmost derivation $S1 \Rightarrow Sc \Rightarrow SAC \Rightarrow SaSbc$ Thus, $SaSbc$ is a right sentential form, and its handle is

  1. $SaS$
  2. $bc$
  3. $Sbc$
  4. $aSb$
in Others
2.8k views

2 Answers

6 votes
6 votes

Handle$:$

            A Handle is a Substring that matches the body of production and whose reduction represents one step along the reverse of the right most derivation.

If we say more precisely $:$

 

 

 

$* \ Source: Ullman$

 

Now the given Right most derivation :

$ S1$ $\Rightarrow$ $Sc$ $\Rightarrow$ $SAC$ $\Rightarrow$ $SaSbc$

Here in the right-sentential form, replacing $aSb$ by $A$ produces the previous right-sentential form. 

So the handle is $A → aSb$

 

Correct Ans : Option D

edited by
1 vote
1 vote
option D aSb

1 comment

What is handle in this context?
0
0
Answer:

Related questions