Design a PDA which recognizes the language

Data Structure AlgorithmsComputer ScienceComputers


Generate the push down automata (PDA) that recognizes the language E={aibj| i is not equal to j and I is not equal to 2j}.


Consider the two languages as given below −

L1={aibj|i,j>=0 and i>2j}L2={aibj|i,j>=0 and i<2j}

Convince yourself that L=L1UL2

In L1, the number of a's are more than double of b's so L1 as follows −



In L2, the number of a's are less than double the number of b's

So the CFG for L2 becomes as follows −




L1: {aibj:i>2j}

L2:{aibj: i<2j}

Updated on 16-Jun-2021 12:58:17