2,790 views

1 Answer

2 votes
2 votes

L1 : It is not CFL as we have compared i and j, now we can't compare j again

L2 : It is CFL. (i<=j or j<=i) means we don't have to compare i and j. It is obvious either i>=j or j>=i,  only j and k will be compared. It is not equal to aibjcj(i,j>0)

L3 : It is not CFL. After comparing a and b we don't know about n and m for the comparison of c and d.

L4 : It is CFL. First we will compare i, j if it is equal then count for even value of k, if i and j are not equal we don't care about k.

Answer is 2;

Related questions

0 votes
0 votes
1 answer
1
moe12leb asked Jan 21, 2023
277 views
S→ aS | bS | epsilonwhat is the language generated by this grammar ?
0 votes
0 votes
2 answers
2
moe12leb asked Jan 21, 2023
271 views
what is the langauge generated by this grammar ?S >aS | aSbS | ε what is the language
0 votes
0 votes
0 answers
3
moe12leb asked Nov 28, 2022
220 views
Find context-free grammars for the following languageL = { w : na(w) = 2nb(w); where w belongs {a, b}*}
0 votes
0 votes
1 answer
4
moe12leb asked Nov 28, 2022
350 views
Find context-free grammars for the following languageThe complement of the language L = belongs {a^n, b^n}