edited by
9,223 views
21 votes
21 votes

Let $L \subseteq \Sigma^*$ where $\Sigma = \left\{a,b \right\}$. Which of the following is true?

  1. $L = \left\{x \mid x \text{ has an equal number of } a\text{'s and }b\text{'s}\right \}$ is regular
  2. $L = \left\{a^nb^n \mid n \geq 1\right \}$ is regular
  3. $L = \left\{x \mid x \text{ has more number of }a\text{'s than }b\text{'s}\right \}$ is regular
  4. $L = \left\{a^mb^n \mid m \geq 1, n \geq 1 \right \}$ is regular
edited by

2 Answers

Best answer
21 votes
21 votes

Correct Option: D

Since $n$ and $m$ are independent finite memory suffices.

Options (a) and (b) are the same. They and option (c) require keeping track of the counts of $a’s$ which cannot be done using a finite automata but can be done using a DPDA and hence are not regular but DCFL.

edited by
2 votes
2 votes
  • in option a,b,c  there is one compatision between a and b . which is done bt pda. so it is CFL but not regular.

 

  • in option d we can write a regulag expression (aa*bb*) . so it is regular
Answer:

Related questions

4.3k
views
4 answers
14 votes
Kathleen asked Oct 9, 2014
4,285 views
Let ... $CD =I$. Express the elements of $D$ in terms of the elements of $B$.
5.7k
views
1 answers
28 votes
Kathleen asked Oct 9, 2014
5,712 views
The grammar whose productions are$\langle\text{stmt}\rangle \to\text{ if id then } \langle\text{stmt}\rangle$\langle\text{stmt}\rangle\to\text{ if id then } \langle\ ... ) the sentenceif a then if b then c:= d else c:= fhas two parse trees
5.8k
views
2 answers
17 votes
Kathleen asked Oct 9, 2014
5,839 views
Let $Q=\left( \left\{q_1,q_2 \right\}, \left\{a,b\right \}, \left\{a,b,\bot \right\}, \delta, \bot, \phi \right)$ be a pushdown automaton accepting by ... $\delta(q_2,\epsilon,\bot) = \left\{(q_2, \epsilon)\right\}$
8.8k
views
1 answers
40 votes
Kathleen asked Oct 9, 2014
8,754 views
Given below are the transition diagrams for two finite state machines $M_1$ and $M_2$ recognizing languages $L_1$ and $L_2$ respectively.Display the transition ... transitions and no new states.(Final states are enclosed in double circles).