I have attempted to create a PDA for the language $L=\{a^ib^{2i}a^i\ | \ i\geq0\}$. I have included my sketch solution below:
The basic idea is that I know there are 3 times as many characters following the first run of $a$'s (since $2i+i=3i$) so I add three times as many $a$'s as are in the first group to the stack and use them to keep count of my $b$'s and the second group of $a$'s. Does this PDA work? It should accept by final state.
