A homomorphism of group $G$ to be an automorphism Let $G$ be a finite group such that $G=\langle x_{1},...,x_{t}| r_{1}=r'_{1},...,r_{k}=r'_{k}\rangle$. Now we define the homomorphism $\alpha$ of $G$ given by $\alpha({x_{i}})=y_{i}$ for any $i$ such that $G=\langle y_{1},...,y_{t}\rangle$ and $\alpha(r_{j})=\alpha(r'_{j})$ for any $j$. Do this $\alpha$ is an  automorphism?
I think this is true.
For example if $G=\langle x,y|x^4=1, y^4=1, yx=x^{-1}y^{-1}\rangle$, then we define $\alpha(x)=y$ and $\alpha(y)=x$. This $\alpha$ is an automorphism.
Edit: The answer is nice . Now if we omit the assuming "homomorphism" of the problem, then do can prove this is automorphism?
 A: Yes, this is an automorphism. Firstly, I'll begin by assuming that $\alpha$ is a homomorphism and use this to prove that $\alpha$ is an automorphism. I will then prove that the map $\alpha$ is, in fact, a homomorphism.
Automorphism: So, to prove this $\alpha$ is an automorphism you just need to prove that it is surjective and also injective. It is surjective because you are mapping onto the generators of $G$, while it is injective because $G$ is finite.
Homomorphism: To prove this this map $\alpha$ is a homomorphism, begin by writing $G$ as $F(X)/N$ where $N$ is the normal closure of the relators $r_i^{-1}r_i^{\prime}$. We are defining $\alpha$ as a map "upstairs" in $F(X)$, where the following holds:


*

*$\alpha(x_i^{\epsilon_1})\alpha(x_j^{\epsilon_2})=\alpha(x_i^{\epsilon_1}x_j^{\epsilon_2}N)$ for all generators $x_i, x_j\in X$ and all $\epsilon_1, \epsilon_2\in\{1, -1\}$.

*$\alpha(r_i)=\alpha(r_i^{\prime})$ for all $i$.
We wish to prove that it falls down to a homomorphism of $G=F(X)/N$. So, note that this map $\alpha$ is a homomorphism if and only if $\alpha(x_i^{\epsilon_1}N)\alpha(x_j^{\epsilon_2}N)=\alpha(x_i^{\epsilon_1}x_j^{\epsilon_2}N)$ for all generators $x_i, x_j$ and all $\epsilon_1, \epsilon_2\in\{1, -1\}$ (this is just using the definition of $G$ as a quotient of the free group). Then, the conditions combine to imply that $\alpha(N)=N$ (you need (1) to give you that $\alpha(W)^{-1}$ and $\alpha(W^{-1})$ are equal as words, because $N$ is the normal closure of the $x_i$s). I shall prove that $\alpha(x_i^{\epsilon}N)=\alpha(x_i^{\epsilon})N$, and I will leave you to join the dots in to prove that the map is, in fact, a homomorphism.


*

*Consider an arbitrary element of $\alpha(x_i^{\epsilon})N$, $\alpha(x_i^{\epsilon})n\in\alpha(x_i^{\epsilon})N$ where $n\in N$. Then there exists some word $m\in N$ such that $\alpha(m)=n$ (because $\alpha(N)=N$), so we have the following.
$$\alpha(x_i^{\epsilon})n=\alpha(x_i^{\epsilon})\alpha(m)=\alpha(x_i^{\epsilon}m)$$
Hence, $\alpha(x_i^{\epsilon})N\leq \alpha(x_i^{\epsilon}N)$.

*Consider an arbitrary element of $\alpha(x_i^{\epsilon}N)$, $\alpha(x_i^{\epsilon}n)\in\alpha(x_i^{\epsilon}N)$ where $n\in N$. Then we have the following, where $m\in N$.
$$\alpha(x_i^{\epsilon}n)=\alpha(x_i^{\epsilon})\alpha(n)=\alpha(x_i^{\epsilon})m$$
Hence, $\alpha(x_i^{\epsilon})N\geq \alpha(x_i^{\epsilon}N)$.
We can then conclude that $\alpha(x_i^{\epsilon})N=\alpha(x_i^{\epsilon}N)$, as required. As I mentioned above, I will leave you to prove that this implies that $\alpha$ is a homomorphism.
What about infinite groups? Such a map $\alpha$ is always a homomorphism, and the assumptions imply that it will always be surjective. However, $\alpha$ is not necessarilly injective in general (see, for example, here - the key word is non-Hopfian). It will, however, be injective if the group $G$ is a finitely generated abelian group, or a finitely generated free group, or a finitely generated linear group (this includes finite groups, and the other two classes I've mentioned).
