Let $G$ and $H$ be finite groups. Consider the ratio

$$r_{G, H} \equiv {|Hom(G, H)| \over{|Hom(H,G)|}}$$

My question is

When is $r_{G, H} = 1$? Can we characterize the pairs of groups $(G, H)$ for which this occurs?

One can answer the corresponding problem in $Set$. Let $S$ and $T$ be finite sets. A straightforward counting argument shows that

$$r_{S, T} = 1 \iff |T|^{|S|} = |S|^{|T|}$$

In the case of groups one can use another counting argument to obtain the bounds

$$|H|^{-|G|} \leq r_{G, H} \leq |G|^{|H|}$$

It seems that these bounds are not very useful though; as $|G|$ and $|H|$ grow the lower bound goes to 0 and the upper bound goes to $\infty$.

So far we have:

- $r_{G, H} = 1$ if $G$ and $H$ are abelian (Tom Goodwillie).
- $r_{G, H} = 1$ if $G$ and $H$ are simple and not subgroups of one another (Alex Bartel and Richard Kent).

My guess is that this is a big problem in the general case, since counting homomorphisms seems to involve heavy machinery even in special cases. So I'd appreciate necessary and sufficient conditions for special classes of groups, or references to relevant literature.

Edit: The original question was "When is $r_{G, H} < 1$?". I've changed it in light of the comments, with the hope that the new version is more interesting and tractable.