I believe that the following NPDA accepts the language$$\{w : w \in \{a,b\}^*,n_a(w)= n_b(w)+1 \}\,,$$where $n_a(w)$ represents number of symbol $a$'s in string $w$.Is there a two-state NPDA that accepts the same language?
NPDA for $\{w : w \in \{a,b\}^*,n_a(w)\geq n_b(w)+1 \}$
formal languages;context free