Give a CFG for the language A abnabn n 1 SolutionFollowing
Give a CFG for the language A = {(ab)n(ab)n | n 1 }
Solution
Following is CFG for the language A = {(ab)n(ab)n | n 1 }
A can be simplified to
=> {(ab)2n | n 1 }
=> {(abab)n | n 1 }
S -> ababS | abab
It means one or more abab.
