reshown by
2,734 views
2 votes
2 votes

Consider the language given below .Find the complement of these language and Explain Complementary language?

1.wwr | w(a ,b)*

2.wxwr| x,w(a,b)+

3.ww ∣ w(a,b)+

4.wxw∣ x,w(a,b)+

reshown by

3 Answers

1 votes
1 votes

1. ∑* - (wwr)

wwr ={∊,aa,bb,abba,abbbba..............}

then ∑* - (wwr) = {a,b,aba,ab,ba,................}

wwr is Regular. Complement of regular is regular

2.∑* - (wxwr)

wxwr=(aaa,aba,abba..........)

then ∑* - (wxwr) = {a,b,aa,bb...................}

wxwr is DCFL . DCFL closed under complement. ∑* - (wxwr) is DCFL

3.∑* - (ww)

ww=(aa,bb,abab............)

∑* - (ww)=(a,b,abba,abaa.............)

ww is CSL. Complement of CSL can be CSL

4.∑* - (wxw)

wxw=(aaa,aba,abaab............)

∑* - (wxw)=(a,b,aa,ab......................)

wxw is CSL. Complement of CSL is also CSL,

edited by
0 votes
0 votes
I am a bit confused by the answers here.

 

My understanding is as below

1. An Npda is required, hence it is N-CFL. So complement may or may not be CFL. We can say complement is CSL

2. A Dpda is enough so its D-CFL. Complement of a D-CFL is D-CFL

3 and 4 are both CSL so complement is CSL

 

For any of these cases an FSM is not possible as the number of states is not finite. So none of these is Regular.

 

Where am i going wrong pls

Related questions

0 votes
0 votes
1 answer
1
amitarp818 asked Nov 18, 2023
228 views
Given L1 = {a*baa*} and L2 = {ab*}The regular expression corresponding to language L3 = L1/L2 (right quotient) is given by
0 votes
0 votes
2 answers
2
Pratik.patil asked Oct 30, 2023
394 views
Which of the following regular expression represent the set of all the strings not containing $100$ as a substring ?$0^*(1^*0)^*$$0^*1010^*$$0^*1^*01^*$$0^*(10+1)^*$
3 votes
3 votes
2 answers
3
1 votes
1 votes
1 answer
4