edited by
563 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

2 votes
2 votes
1 answer
2
Sumaiya23 asked Jan 22, 2018
458 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...
2 votes
2 votes
5 answers
4