1,065 views
2 votes
2 votes

Which of the following languages is regular?

  1.  L = { bba (ba)* a^n-1 | n> 0 }
  2. L = {a^nb^n | n < 1000 }
  3. L = {a^nb^k  | n is odd or k is even }
  4. L = {wxw^R | w,x ∈(0+1)* }
  1. 1, 3 and 4
  2. 2, 3, 4
  3. 2, 3
  4. 1, 2, 3, 4

1 Answer

1 votes
1 votes
in my opinion all are regular so answer is D

reason for option 1: i dont think you need answer for that as the language can easily be written as  bba(ba)* a*

2: since you have limited the size of " n " which means that the number of comparison are finite , thus finite number of states, hence its regualr

3: the regualar expression can be written as           "  a(aa) * (bb)*  "

4: this option might be tricky as it may seem that the language is  palindrome but its not . for you just simplest term could be say w =E then wR = E thus creating  X which is ( a+ b) *   . now as you know that all the other string  will be subset of the above languge so the regualr expression of this option will be   "    (a+b)* "

Related questions

5 votes
5 votes
1 answer
2
Parshu gate asked Nov 16, 2017
695 views
Let L={ai bj ck ┤|if j is odd then i=k} where i,j,k>0. Which of the following option is true about L? L is CSL but not CFL L is CFL but not DCFL L is regular L is D...
3 votes
3 votes
2 answers
3