I am reading nested quantifiers. I am confused in between two cases,
1. Existential Quantifier before Universal Quantifier
2. Universal Quantifier before Existential Quantifier
I would be very thankful if someone highlights the difference between them and also give an example.
Thanks in advance.
There is a nice way to think about quantifiers in terms of games, and then the order of the quantifiers corresponds to the order in which the players move in the game. If $f(p, q)$ is some statement, then
$$\forall p \exists q : f(p, q)$$
says that there are two players, $P$ and $Q$, playing a game. Player $P$ moves first and makes some move $p$. Player $Q$'s goal is to find a corresponding move $q$ which "beats" $p$ in the sense that $f(p, q)$ is true. The statement above is true if $Q$ has a winning strategy; otherwise, it's false. However,
$$\exists q \forall p : f(p, q)$$
says that player $Q$ moves first. So instead of finding a move $q = q(p)$ for each possible move $p$ that player $P$ can make, $Q$ must now make a single move that beats all possible moves by player $P$. Again, the statement above is true if $Q$ has a winning strategy; otherwise, it's false.
But now it should be obvious that the second game is much harder for $Q$ than the first! (To further augment this game-theoretic intuition, it might help to think of $P$ as a "devil" who is trying to thwart the "hero" $Q$. Note the similarity of the $\forall$ symbol to devil horns.)