2,805 views
1 votes
1 votes

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$

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
Answer:

Related questions

3 votes
3 votes
1 answer
2
go_editor asked Jul 14, 2016
4,042 views
A virtual memory based memory management algorithm partially swaps out a process. This is an example ofshort term schedulinglong term schedulingmedium term schedulingmutu...
2 votes
2 votes
1 answer
3
2 votes
2 votes
3 answers
4