If $G$ is a finite semi-group and $\forall x,y,z \in G: xy=yz \implies x=z$ then $G$ is an Abelian group If $G$ is a finite semi-group and $\forall x,y,z \in G: xy=yz \implies x=z$ then $G$ is an Abelian group.
I have no idea where to start. I'm stuck! I can't prove even the existence of the identity element :|
 A: Pick an element $y$ of your semigroup and consider the successive powers $y, y^2, y^3, \dots$. By finiteness, there is eventually a repetition, i.e. numbers $1 \le m < n$ with $y^m = y^n$. Your cancellation rule lets us cancel off $y$s to eventually get $y = y^k$ for some $k>1$.
For any $x$ in $G$, we have $yxy^k = yxy$ since $y^k = y$. Cancel off a $y$ from the right of the left-hand side and from the left of the right-hand side to get $yxy^{k-1} = xy$. Now cancel $y$s from the other side to get $xy^{k-1} = x$. Similarly, $y^{k-1}x = x$. This gives us that there is an identity element, namely $y^{k-1}$. Write $e = y^{k-1}$. Since this is a power of $y$, we automatically have that $y$ has an inverse, namely $y^{k-2}$ (if $k=2$, then $y$ is the identity, so is its own inverse).
The identity is unique: if there are elements $e,f$ such that $ex = xe = x$ and $xf = fx = x$ for all $x$, then $e = ef = f$. So we can perform the above process to find an inverse for any element of $G$; this means we have a group.
Finally, for any $x,y$ in $G$, we have $xyy^{-1} = y^{-1}yx$, so canceling $y^{-1}$, we get $xy = yx$, so $G$ is abelian.
