Is there a nontrivial homomorphism for each of the given groups? - Fraleigh p. 134 13.38, 13.41, 13.43

(38.) $\mathbb{Z} \rightarrow S_3$?

Let $φ(n) = \begin{cases} \mathrm{id} \in S_3 &, \text{for all$n$even,} \\ \mathrm{transposition} (1,2) &, \text{for all$n$odd integers.} \end{cases}$
Note that (1, 2) is of order 2, isomorphic to Z2.

(41.) $D_4 \rightarrow S_3$?

View D4 as a group of permutations. Same answer as (43.) underneath to $D_4$, just change $S_4$ to $D_4$.

(43.) $S_4 \rightarrow S_3$?

Viewing D4 as a group of permutations, let $φ(p) = \begin{cases} \mathrm{id} \in S_4 &, \text{for all$p$even permutations,} \\ (1,2) &, \text{for all$p$odd permutations.} \end{cases}$ Note that (1, 2) is a subgroup of S3 of order 2, isomorphic to Z2.

(1.) I see the image is $S_3$ every time. However I don't understand why the same homomorphism works in all three questions? What's the connection between them? What's the intuition?

(2.) How do you magically envisage and envision this hard piecewise-defined homomorphism?

(3.) What other homomorphisms work for all three? How many are there?

The common thread is that even+even = odd+odd = even, and even+odd = odd+even = odd; and this is the structure of $\Bbb Z_2$ (as they mention each time). So any group that has a notion of odd/even that satisfies the above will have this sort of "reduction to $\Bbb Z_2$" that has been demonstrated here.