edited by
19,112 views
54 votes
54 votes

Consider the alphabet $\Sigma = \{0, 1\}$, the null/empty string $\lambda$ and the set of strings $X_0, X_1, \text{ and } X_2$ generated by the corresponding non-terminals of a regular grammar. $X_0, X_1, \text{ and } X_2$ are related as follows.

  • $X_0 = 1 X_1$
  • $X_1 = 0 X_1 + 1 X_2$
  • $X_2 = 0 X_1 + \{ \lambda \}$

Which one of the following choices precisely represents the strings in $X_0$?

  1. $10(0^*+(10)^*)1$
  2. $10(0^*+(10)^*)^*1$
  3. $1(0+10)^*1$
  4. $10(0+10)^*1 +110(0+10)^*1$
edited by

13 Answers

0 votes
0 votes

X0-->1X1

     -->11X2

     -->11^

So smallest possible string is 11.

Only possible option is C which generates this string. Also, option C generates all the possible strings of the language.

So C is the answer.

0 votes
0 votes

Simple Normal method

Just expand the equations given,

$X_{0} \rightarrow 1X_{1} \\ \rightarrow 1(0X_{1} + 1X_{2}) \\ \rightarrow 10X_{1} + 11X_{2} \\ \rightarrow 10X_{1} + 11(0X_{1} + \lambda) \\\displaystyle \displaystyle \rightarrow 10X_{1} + 110X_{1} + 11$

 

Now, just observe. 11 should be present in the Regular Expression. Only Option C contains 11.

So answer is Option C.

0 votes
0 votes

A Small string 11 will do the work, check with the options only Option C will satisfy it.

One can only watch the relations given in the form of equations, take the smallest string accepted by the grammar and match with the options.

 

0 votes
0 votes

By substituting X2 in X1. Then multiplying X1 with  to get X0. The expression becomes-

X0 = 10 X1 + 110 X2 + 11

on observing, none of option can derieve string 11 except option C. Hence option C is the answer

Answer:

Related questions

36 votes
36 votes
6 answers
9
go_editor asked Feb 13, 2015
15,671 views
The number of states in the minimal deterministic finite automaton corresponding to the regular expression $(0+1)^* (10)$ is _____.
88 votes
88 votes
5 answers
11
38 votes
38 votes
5 answers
12