Primitive group with a transposition (source code)

= Primitive group with a transposition

If a primitive subgroup of $S_n$ contains a <transposition>, make a graph whose edges are the supports of its conjugate <transpositions>. Connected components form blocks for the group. An edge exists, so primitivity forces the graph to be connected. Its edge <transpositions> generate all of $S_n$, proving that the original group is $S_n$.