261 views
0 votes
0 votes
{w1 x w2|w1,x,w2∈(a+b)*,w1=w2}

it is regular ?????

2 Answers

0 votes
0 votes

Suppose,

w1= aa

w2= aa

x=ba

string becomes aabaaa

since x is of infinite length as mentioned in question

we could rewrite the string as       

w1 = a

x= abaa

w2= a

---------------------------------------------------------------------------------------------------------

w1 =w2

=> Language is "Strings starting and ending with same alphabet."

=> it is regular.

However, if x is of finite length then the language would not be regular.

0 votes
0 votes

Yes it is regular,

Because we can construct dfa of this given language by keeping starting and ending same symbol.

Regular expression of this language can be described as below

a(a+b)* a  +  b(a+b)* b

Related questions

0 votes
0 votes
0 answers
1
prashant dubey asked Apr 27, 2019
268 views
The minimum no. of states required to construct DFA which can accept length of the string is devisable by 4 where input string is 0,1Please also construct dfa
0 votes
0 votes
0 answers
2
altamash asked Dec 25, 2018
200 views
explain why it is CFL?
0 votes
0 votes
1 answer
3
altamash asked Sep 21, 2018
294 views
what is minimum number of states of NFA which accepts language{abab^n|n>=0} U{aba^n|n>=0}
–1 votes
–1 votes
0 answers
4
altamash asked Sep 21, 2018
202 views
what is minimum number of state in the NFA accepting the language;{ab 4ubc}?