The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

0 votes

I don't think it will be regular .

Had the language been uww^{R}v the expression could have been (a+b)*(aa+bb)(a+b)* as there is no restriction on w.

Is it correct? and if it isn't regular, is it a CFL?

+1 vote

Let us assume that if a string x belongs to a language L then L(x) = 1 otherwise L(x) = 0. Now, read the theorem written below

**Myhill-Nerode Theorem**: Let L ⊆ Σ* be any language. Suppose there is an infinite set S of strings such that for

(∀x != y ∈ S)(∃z ∈ Σ*) such that L(xz) != L(yz).

Then L is not a regular language.

To understand the theorem completely go to the link below. I have taken the theorem from there.

*Notes on the Myhill-Nerode Theorem*

Now, come to the problem

Here L = { ww^{R}v | v,w ∈ {a,b}^{+} }

As told in the Myhill - Nerode theorem above I am taking an infinite set S

Let S = { w | w ∈ {a,b}^{+} }

Now, we take arbitrary two strings x and y belongs to S (here x!=y)

Now, we will take an arbitrary string z ∈ Σ* such that L(xz) != L(yz)

Let z= x^{R}a then the string xz = xx^{R} a belongs to L that is L (xx^{R }a) = 1

but the string yz = yx^{R} a does not belong to L that is L (yx^{R }a) = 0

Hence, L (xx^{R}a) != L (yx^{R}a)

Thus for any two strings x and y belongs to an infinite set S there exist a string z ∈ Σ* such that L(xz) != L(yz)

So, according to myhill nerode theorem we get L is not regular.

(If you are not getting what I have done then look at the examples done in the link above)

Yes the language is context - free because concatenation of context-free and regular is context-free.

- All categories
- General Aptitude 1.4k
- Engineering Mathematics 5.9k
- Digital Logic 2.3k
- Programming & DS 4.3k
- Algorithms 3.7k
- Theory of Computation 4.6k
- Compiler Design 1.7k
- Databases 3.4k
- CO & Architecture 2.9k
- Computer Networks 3.4k
- Non GATE 1.2k
- Others 1.3k
- Admissions 506
- Exam Queries 482
- Tier 1 Placement Questions 22
- Job Queries 64
- Projects 15

40,903 questions

47,560 answers

146,298 comments

62,306 users