# For every 4 ‘c’ in the input push a ‘c’ in the stack (Push down automata)

Given the following language: L = {$$a^{2m}$$ $$c^{4n}$$ $$d^{n}$$ $$b^{m}$$ : m,n >= 0} I’m trying to design a PDA. My aproach is:

-for every 2 ‘a’ push an ‘a’

-for every 4 ‘c’ push a ‘c’

-then pop them to solve the 2nd half of the language

This is the first part to count 2 ‘a’, but the ‘c’part is not very clear:

Any hints or solutions for the problem: ‘’for every 4 ‘c’ push a ‘c’ on the stack‘’

Thanks!

You can recognise the language $$L = \{c^{4n}|n\geq 0\}$$ with a normal DFA. Use this automata as a base and just use one designated state, that pushes a C onto your stack, for which I would choose the first one. For every transition one c is consumed from the word.
$$\{(q_1, c, S, CS, q_2) , (q_2, c, S, S, q_3), (q_3, c, S,S,q_4), (q_4, c, S,S,q_1), (q_1, d, C, \varepsilon, q_d)\} \subset \Delta$$ with $$S \in \Gamma$$