search
Log In
0 votes
416 views

Which of the following is Regular?

in Theory of Computation
edited by
416 views
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
2 answers
1
555 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
asked May 26, 2019 in Theory of Computation Hirak 555 views
6 votes
4 answers
4
1.4k 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
asked Oct 17, 2016 in Theory of Computation ARUN KUMAR 3 1.4k views
...