retagged by
695 views

3 Answers

2 votes
2 votes

$\text{For the string “$abbcde$”, the Sentential forms are :}$

 

 $\text{A → $\underset{1}{aBDe}$ → $\underset{2}{aBbcDe}$ → $\underset{3}{abbcDe}$ → $\underset{4}{abbcde}$  [Left Sentential Form]}$ 

 

$\text{ A → $\underset{5}{aBDe}$ → $\underset{6}{aBde}$ → $\underset{7}{aBbcde}$ → $\underset{8}{abbcde}$  [Right Sentential Form] } $

 

 

$\underline{\textbf{So Possible Viable Prefixes among the given options are} } :$

$\text{ (i) “aB” in $\textbf{(6)}$ as $\textit{D → d}$ is the Handle}$

$\text{ (ii) “aBBcde” in above Sentential Forms, no such Prefix present, so this is Invalid Viable Prefix}$

$\text{ (iii) “abb” in $\textbf{(4)}$ as $\textit{D → d}$ is the Handle}$

$\text{ (iv) “aBb” in $\textbf{(7)}$ as $\textit{B→ Bbc}$ is the Handle}$

$\text{ (v) “aBbcD” in $\textbf{(2)}$ Handle is $\textit{B→ Bbc}$, so this is also a Invalid Viable Prefix}$

$\text{ (vi) “abbc” in $\textbf{(4)}$ as $\textit{D→ d}$ is the Handle}$

 

${\color {Red} \underline{ \textbf{Good Read}}:}$

$1.$ Viable Prefix, Handle 

$2.$ UGC NET CSE | June 2013 | Part 2 | Question: 22

 

1 votes
1 votes
Answer must be C,

the reductions which we are getting while reducing the string abbcde are,

$A => aBDe => aBde => aBbcde => abbcde.$

clearly (ii) and (v) are not viable prefixes.
edited by
0 votes
0 votes
Option C is correct.

Related questions

3 votes
3 votes
1 answer
1
PEKKA asked Jan 2, 2017
574 views
f(n) = $\Theta (n^{2})$ g(n) = $\Omega (n)$ h(n)=O(log n) then [ f(n) . g(n) ] + [h(n) . f(n) ] is $\Omega (n)$$\Theta (n^{2})$O(log n)None
0 votes
0 votes
2 answers
2
PEKKA asked Dec 6, 2016
460 views
Complexity of the following snippet is for (i=1;i<n;++i) for(j=1;j<=n;j=j+i) c=c+1;
1 votes
1 votes
1 answer
3
PEKKA asked Dec 6, 2016
434 views
Complexity of the below code snippet is ..for (i=1;i<=n;++i) { j=2; while(j<=n) { j=j*j; c=c+1; } }$O(nlog n)$$O(n^{2})$$O(nloglog n)$$O(n)$