# MadeEasy Test Series: Theory Of Computation - Regular Languages

0 votes
603 views

Which of the following is Regular?

edited
0
I think both are regular.What's the answer given?
0
Yes, both are Regular. There is no doubt with S2. But S1 is a bit confusing. Can you explain
0
it will produce a* i think
0
No idea
0
try taking examples.take value of m and n and see
0
S1 is string with any number of a's as you can represent any string of a in term of (a^n)^m where m is greater or equal than n.
0
How  2nd regular

## 1 Answer

0 votes
S1. (a^n)^m can be written as (x)^m , m>=0 , which is regular.

S2. {a^nb^n / n>=1} it is CFL  U  {a^nb^m /n,m>=1} - it is regular.

So CFL U REG = REG and if it is regular then it will be CFL also.
0
yeah, got it thanks
0

Explanation of the second one is not correct I guess.

• For CFL and DCFL union with Regular language is closed.
• CFL U RL = CFL
0
@Dhillu Yes correct

## Related questions

4 votes
3 answers
1
775 views
Consider the following statements: $S_1:\{(a^n)^m|n\leq m\geq0\}$ $S_2:\{a^nb^n|n\geq 1\} \cup \{a^nb^m|n \geq1,m \geq 1\}$ Which of the following is regular? $S_1$ only $S_2$ only Both Neither of the above
0 votes
1 answer
2
146 views
Can someone explain this problem?
2 votes
0 answers
3
208 views
7 votes
4 answers
4
1.8k views
Which of the following is a non-regular language? $L = \{wxwy \mid x,y,w \in (a+b)^+\}$ $L = \{xwyw \mid x,y,w \in (a+b)^+\}$ $L = \{wxyw \mid x,y,w \in (a+b)^+\}$ All of these