edited by
587 views
2 votes
2 votes

edited by

2 Answers

1 votes
1 votes

Correct answer is L2 and L4 

EXPLANATION :

L1: 2 comparisons so not CFL

L2: 1 comparison so CFL

if you look through it properly you will see that the union (i<=j) U (j<=i) means i and j can be anything(since i can be less than or equal to j OR j can be less than or equal to i). So there is just one comparison.

L3: more than 1 comparison so not CFL |b| = |c| , |a| != |b| , |c| != |d|

L4: 1 comparison so CFL

p --> q which is equivalent to (not p or q )

where

p : |a| = |b|

q : |c| is even

if p is false , directly accept the string

if p is true, check for even no. of c which can be done by DFA

  

Related questions

479
views
1 answers
2 votes
Sumaiya23 asked Jan 22, 2018
479 views
a) Only L1 is correctb)Only L2 is correctc)Both L1 and L2 are correctd)None of L1 and L2 is correctMy question is: What is meant by prefix of string? And how is L1 regula...
757
views
1 answers
1 votes
jatin khachane 1 asked Jan 8, 2019
757 views
$L = \left \{ x^{l}y^{m}z^{n} | \ l+m+n\ is\ divisible\ by\ 5\right \}$Is it regular or CFL or CSL ?
894
views
5 answers
2 votes
air1ankit asked Dec 9, 2017
894 views
If L1 = { a^n | n ≥ 0 } and L2 = { b^n | n ≥ 0 }, Considerthen L1 . L2 wil bea) (ab)^nb) a^n b^nc) b^n a^nd)b^m a^ne) { a^m b^n | m ≥ 0, n ≥ 0 }why answer is d w...