title: Design of a “Push Down Automata” that recognizes the language: a^n b^m | n<= m <= 3n
body: <p>I'm studying for my exam automata and formal languages, I have to design a PDA that recognizes the language:</p>
  
  <pre><code>a^n b^m | n&lt;= m &lt;= 3n
  </code></pre>
  
  <p>I have a slight idea, but I'm stuck with this:</p>
  
  <p>first thought process all the "a" and each "a" push an "A"</p>
  
  <pre><code>(q0, a, Z)= (q0, AZ)
  (q0, a, A)= (q0, AA)
  (q0, b, A)= (q1, A)
  (q1, b, A)= (q2, A)
  (q2, b, A)= (q3, lambda)
  (q3, b, A)= (q1, A)
  (q3, lambda, A)= (qf, Z)
  (q3, lambda, Z)= (qf, Z)
  
  qf = final state, lambda= delete top of stack, Z= initial symbol of the stack
  </code></pre>
  
  <p>So I thought the solution, but I think is not correct, I'm doing something wrong?</p>