106 views
Identify the language :

L1={ a^p b^q c^r  /   p<=q}

L2 = {a^p b^q c^r  /   p>q }

L3 = {a^p b^q c^r  /  q = r } where p ,q,r >= 0

then { L1 U L2 U L3 }  is

A. regular

B.CFl but not Dcfl

C. Cfl
| 106 views
0
Regular ??
0
ya answer is regular  but how can it be regular .. L1 U L2 is P*q* still  one comparision is there that is   q=r . that says no of b should be equal to no of c . explain it
0
L1 and L2 has all possible combinations of p,q and r. Which will also have q=r.
0
L1 and L2 removes bounding between p and q. Because L1 has lesser p than q and L2 has more p, so overall any number of p and q possible. And im L1 and L2 itself there is no restriction on r, so q=r comprises into that directly.

hence language will be $a^pb^qc^r / p,q,r \geq 0$

+1 vote

(a*b*c*) U (a*bqcr  | q=r ) = Regular .

by Active (2k points)
selected by
0
first part is regular but second part after OR is cfl .. we can not ignore 1 comparison is there that is number of b should be equal to c . so a/c to me its CFL.
+1

a*b* union an bn = a*b* hope you get it.

0
you mean a*b*c* U a*b^nc^n   yeah its regular,it was really a silly one :( that i asked.  thank you .
0
:).....
0
understand  in betterway the closure property of regular expression and cfl