2 votes 2 votes 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 bharti asked Jan 7, 2018 bharti 880 views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply Ashwin Kulkarni commented Jan 7, 2018 reply Follow Share Regular ?? 0 votes 0 votes bharti commented Jan 7, 2018 reply Follow Share 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 votes 0 votes gauravkc commented Jan 7, 2018 reply Follow Share L1 and L2 has all possible combinations of p,q and r. Which will also have q=r. 0 votes 0 votes Ashwin Kulkarni commented Jan 7, 2018 reply Follow Share 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$ 0 votes 0 votes Please log in or register to add a comment.
Best answer 1 votes 1 votes (a*b*c*) U (a*bqcr | q=r ) = Regular . thepeeyoosh answered Jan 7, 2018 selected Jan 8, 2018 by bharti thepeeyoosh comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments bharti commented Jan 8, 2018 reply Follow Share 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 votes 0 votes Anu007 commented Jan 8, 2018 reply Follow Share :)..... 0 votes 0 votes Chandrabhan Vishwa 1 commented Jan 9, 2018 reply Follow Share understand in betterway the closure property of regular expression and cfl 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes in first expression condition only on p and q not on r which is p<=q and second expression condition only on pand q not on r which is p>q if we take union of exp1 and exp2 then then the value possible to p and q is whole natural number and third expression condition will also be lie in this union expression means regular expression for this union is a*b*c* Chandrabhan Vishwa 1 answered Jan 9, 2018 Chandrabhan Vishwa 1 comment Share Follow See all 0 reply Please log in or register to add a comment.