How can we tell that the following examples (from my book) are logically valid,
I) $ \exists y \forall x p(x,y) \to \forall x \exists y p(x,y) $
II) $ \exists x \exists y p(x,y) \to \neg \forall x \forall y \neg p(x,y) $
III) $ \forall x \forall y p(x,y) \to \exists x \exists y p(x,y) $
but this one is not.
IV) $ \exists x \exists y p(x,y) \to \forall x \exists y p(x,y) $
How can we determine if these examples are valid or not? I tried testing them in a truth table, but that did not work. Is there any idea or hint how to proceed?
Edit: Assuming that by (IV) a counterexample is provided by taking $p(x,y)$ to be the predicate which is true for all $x$ and $y$. Then the left side of the implication is true, but the right side is false, making the implication logically invalid, but for the other options I could not proof them.