How can I construct a context free grammar for the following language:
L = {a^l b^m c^n d^p | l+n==m+p; l,m,n,p >=1}
I started by attempting:
S -> abcd | aAbBcd | abcCdD | aAbcdD | AabBcCd
and then A
= something else... but I couldn't get this working.
.
I was wondering how can we remember how many c's shud be increased for the no. of b's increased?
For example:
string : abbccd