Find a set of generators and relations for $S_3$ Can you help me with this? By trial, I came up with the generators and relation. However, how do I prove that the generators and relations uniquely determine $S_3$?

Problem Find a set of generators and relations for $S_3$
Solution  Let $a=(1,2)$, $b=(2,3)$.
We have $ab = (1,2)(2,3) = (1,2,3)$, $ba = (2,3)(1,2) = (1,3,2)$. $aba = (1,2)(1,3,2) = (1,3)$.
Also, we have $a^2=b^2 = 1$. And we have all the $6$ elements.
Hence, $S_3 = \langle a,b \vert a^2=b^2=(ab)^3=1\rangle$.

Thanks
 A: Ok. I figured this out myself. Any element generated is of the form $n_1$ $a$'s followed by $n_2$ $b$'s followed by $n_3$ $a$'s followed by $n_4$ $b$'s and so on. Using the relation $a^2=1=b^2$, we can simplify all the elements to a sequence of alternating $a$'s and $b$'s, i.e., the elements are of the form
$$abab\cdots ab \text{ or }baba\cdots ba$$
But we have $(ab)^3 = 1$. Hence, all the elements apart from the identity are
$$\{a,ab,aba,abab,ababa,b,ba,bab,baba,babab,bababa\}$$
But we have


*

*$bababa = a^2bababa = a(ab)^3a = a^2 = 1$.

*$babab = bababa^2 = (ba)^3a = a$

*$ababa = b(ab)^3 = b$

*$(ab)^2 = b^2(ab)^2a^2 = b(ba)^3a = ba$

*$(ba)^2 = a^2(ba)^2b^2 = a(ab)^3b = ab$

*$aba = bab$


Hence, the only distinct elements are are $1, a,b,ab,ba,aba$. So $6$ elements and we can now do a one to one matching with elements of $S_3$.

As an aside, the users on this website are too rude. I am a new user and here to clarify questions on algebra. Shouting at a new user is is not the right way to welcome her!
A: Well, since the problem asked only for some set of generators and relations, not a reasonably efficient set, there's a really cheap answer: Take all $6$ elements of $S_3$ as your generators.  Let the relations be $abc^{-1}=1$ for all $a,b,c$ such that $ab=c$; in other words, take the whole multiplication table as your set of relations.  
The point is that any group has a silly set of generators and relations like this.  The problem really should have asked for a reasonably small set of generators and relations.  
