edited by
174 views
0 votes
0 votes

 

Which of the following is (are) correct about the regular expression?

$a a^{*} b b^{*} c c^{*} d d^{*}$

$\text{A}$. The language for the given expression is:

$\mathrm{L}=\left\{\mathrm{a}^{\mathrm{n}} \mathrm{b}^{\mathrm{n}} \mathrm{c}^{\mathrm{m}} \mathrm{d}^{\mathrm{m}} \mid \mathrm{n} \geq 1, \mathrm{~m} \geq 1\right\} \mathrm{U}\left\{\mathrm{a}^{\mathrm{n}} \mathrm{b}^{\mathrm{m}} \mathrm{c}^{\mathrm{m}} \mathrm{d}^{\mathrm{n}} \mid \mathrm{n} \geq 1, \mathrm{~m} \geq 1\right\}
$

$\text{B}$. The Context Free Language for the given expression is:

$\begin{array}{l}
\mathrm{S} \rightarrow \mathrm{AB} \mid \mathrm{C} \\
\mathrm{A} \rightarrow \mathrm{aAb} \mid \mathrm{ab} \\
\mathrm{B} \rightarrow \mathrm{cBd} \mid \mathrm{cd} \\
\mathrm{C} \rightarrow \mathrm{aCd} \mid \mathrm{aDd} \\
\mathrm{D} \rightarrow \mathrm{bDc} \mid \mathrm{bc}
\end{array}$

$\text{C}$. The language generated by this expression is equal number of $'a's$, followed by equal number of $'b's$, followed by equal number of $'c's$ and followed by equal number of $'d's$.

Choose the correct answer from the options given below:

  1. Only $\text{A}$ is correct
  2. Only $\text{B}$ is correct
  3. Both $\mathrm{A}$ and $\mathrm{B}$ are correct
  4. All the three $\text{A, B}$ and $\text{C}$ are correct

(Option $1 [39529]) 1$
(Option $2 [39530]) 2$
(Option $3[39531]) 3$
(Option $4 [39532]) 4$

Answer Given by Candidate: $2$

edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
2 answers
1
admin asked May 20, 2023
1,363 views
The negation of "Some students like hockey" is:Some students dislike hockeyEvery student dislike hockeyEvery student like hockeyAll students like hockey(Option $1[39301])...
0 votes
0 votes
1 answer
4
admin asked May 20, 2023
531 views
Consider the following conditional code, which returns a Boolean valuesif $((x>25) \& \&(y>100))$return 'false';else iff $(x \leq 25) \& \& \&(y \leq 100))$return 'true';...