# Strategy for determining the number of homomorphisms between two Groups

The Gallian Abstract Algebra text has a number of exercises of the form 'Determine the number of homomorphisms between two groups $G$ and $H$'. It is pointed out that, in the case of a cyclic $G$, determining the image of a generator of $G$ under a homomorphism $\phi$ suffices to specify the entire mapping, since $\phi(g^n)=\phi(g)^n$ for any $g \in G$. Hence determining the number of homomorphisms simplifies to counting generators of $H$ and applying Lagrange's Theorem. Are there any other useful properties of homomorphisms that can be used as tricks for this type of problem or just general strategies when counting maps between $\textbf{non-cyclic groups}$? Two examples I see in the text exercises are:

(1): Determine all homomorphisms from $S_3$ to $G$, where $G$ is Abelian.

(2): Determine the number of homomorphisms from $Z_p\oplus Z_p\to Z_p$, where $p$ is prime ($Z_p$ being a subgroup of the additive integers).

-
For (1), it is helpful to note that such homomorphisms must factor through the abelianization of $S_3$, which is $Z_2$; this makes the problem very easy. For (2), You can use the (easy-to-prove) fact that $Hom(A\oplus B, C)=Hom(A,C)\oplus Hom(B,C)$, so you are just reduced to the cyclic case once again. –  user641 Apr 15 '13 at 1:45
@SteveD, thanks! That's a good point. –  luke Apr 15 '13 at 3:00
In general, a group homomorphism is determined entirely by the image of a set of generators. Given this, if the codomain is finite, then this puts a relatively easy to check upper bound on the total number of possible homomorphisms. For example, in your second example question, $\mathbb{Z}_p\oplus\mathbb{Z}_p$ is generated by the elements $(0,1)$ and $(1,0)$ and so any homomorphism is entirely determined by where these elements are sent (and they must be sent to elements of order dividing $p$). I don't think you quite finished typing the entire question for question 2 because you didn't mention a codomain for the set of homomorphisms.
For your first example, note that $S_n$ can be given presentation $$\langle \sigma_i\ldots,\sigma_{n-1}|\:\:\sigma_i^2=1,$$ $$\sigma_i\sigma_j=\sigma_j\sigma_i\:\:\:\mbox{ for }j\neq i\pm 1,$$ $$\sigma_i\sigma_{i+1}\sigma_i=\sigma_{i+1}\sigma_i\sigma_{i+1}\rangle$$
Suppose $h\colon S_n\rightarrow G$ is a homomorphism. Then $h$ is determined by the image of the generators. But note, $$h(\sigma_i\sigma_{i+1}\sigma_i)=h(\sigma_i)h(\sigma_{i+1})h(\sigma_i)$$ $$=h(\sigma_i)h(\sigma_{i})h(\sigma_{i+1})=h(\sigma_i\sigma_{i})h(\sigma_{i+1})=h(1)h(\sigma_{i+1})=h(\sigma_{i+1})$$ and similarly $h(\sigma_{i+1}\sigma_{i}\sigma_{i+1})=h(\sigma_i)$. But $\sigma_i\sigma_{i+1}\sigma_i=\sigma_{i+1}\sigma_i\sigma_{i+1}$ and so we have $h(\sigma_i)=h(\sigma_{i+1})$ for all $i$. By induction the image of all generators is equal and so $h$ is determined by the image of any single generator. Given that $h(\sigma_i)$ has to be an element of order dividing 2, this significantly reduces the possible homomorphisms.
Thank you for your answer, @Daniel. When you say that ${\mathbb Z_p}\oplus{\mathbb Z_p}$ is generated by the pair of elements $(0,1)$ and $(1,0)$, how does this apply to the (revised) question 2? If the codomain is ${\mathbb Z_p}$, would the answer then be that each of $(0,1)$ and $(1,0)$ can be sent to $p-1$ possible elements of order $2$, and thus the number of homomorphisms is $(p-1)^2$, or am I counting incorrectly? –  luke Apr 15 '13 at 2:57
Almost, the generators can also be sent to the identity ($1^p=1$ so really I should have said the image of the generators must be an element of order dividing $p$. I've edited this.). So there would be $p^2$ possible homomorphisms. –  Daniel Rust Apr 15 '13 at 4:00