in Theory of Computation
645 views
1 vote
1 vote

We can change indices is different issue , but even if i violate $n<=m$ , language contains that string.

Why its still correct ?

@MiNiPanda

 

in Theory of Computation
645 views

4 Comments

1
1
edited by

@Shaik Masthan

0(n+m)  1(k+l) = 0P . 1Q 

 

Hey, This expression cleared lot of things.

Explained really well.

Thanx :)

 

P.S : 

So, is it simply like, 

$(a^n)^m$ | $n,m>=0$

?

 

0
0

in your question, n ≤ m and n ≥ 0 ===> consider n=1 always ===> it simply reduces to { am , m ≥ 1 }

but note that m=0 and n=0 ===> ∈ also accepted.

Finally it look like { am , m ≥ 1 } U { ∈ }  ===> { aP , P ≥ 0 }

2
2

1 Answer

2 votes
2 votes
S1  : { (a^n)^m | n<=m>=0} => { (a^n)^m | n,m>=0 & m>=n}

=> { ɛ ,a,aa,aaa,........}

so,Regular Expression for S1 will be a*

S2 : { a^nb^n | n>=1} U { a^nb^m | n>=1,m>=1}

=> {ab,aabb,aaabbb,...} U {ab,aab,abb,aabb,......} => {ab,aab,abb,aabb,......}

so,Regular Expression for S2 will be a+b+

Therefore both S1 and S2 are Regular.