Constructing a PDA with an unequal number of a/b I'm looking at this pdf for problems: http://www.public.asu.edu/~ccolbou/src/355hw5solf10.pdf

I found question 3g to construct a pushdown automata for the following:

{$ {a^i b^j}$ | ${i \neq j}$}

The solution they provided is below:



The issue is, when I use JFLAP to test out, I get aabb to pass - when it should just be aabbb, aaabb, etc.

I looked around, and found another solution that also failed:



Can someone explain to me why these fail on JFLAP and if they are right or wrong? The PDA I'm looking for can accept even if there are objects on the stack. Perhaps these two rely on the fact that acceptance is only reached if there is nothing on the stack?
The intuition is push the number of $a$'s then pop while reading $b$'s. The result should be non-zero: either there are still items on the stack (which we can check), or the stack has been emptied before the end of the string.

There is a problem with instructions like "$b/\varepsilon/\varepsilon$". This instruction means "read $b$ and do not push nor pop". The middle $\varepsilon$ is misleading. It does not mean that the stack is empty. It just means the PDA does not look at it.

The solution is to start by pushing a nice bottom-of-stack symbol $Z$ at the start of the computation. When we  see a $Z$ we know the bottom has been reached.