Connectedness and diameters It is possible for a commuting graph to be non-
connected and thus not to have a finite
diameter. For a finite set X, the commuting graph of the
symmetric group \mathcal{S}(X) is connected if and only if |X| and |X|-1 are non-
prime, and the commuting graph of the
alternating group \mathcal{A}(X) is connected if and only if |X|, |X|-1, and |X|-2 are non-prime. When connected, the commuting graphs of \mathcal{S}(X) and \mathcal{A}(X) have diameter at most 5. The commuting graph of the
symmetric inverse semigroup \mathcal{I}(X) is not connected if and only if |X| is an odd prime. When |X| is not an odd prime, it has diameter 4 or 5, and is known to have diameter 4 when |X| is even and diameter 5 when |X| is a power of an odd prime. For every natural number , there is a finite group whose commuting graph is connected and has diameter equal to . But if a finite group has trivial center and its commuting graph is connected, then its diameter is at most 10. The commuting graph of a completely simple semigroup is never connected except when it is a group, and if it not a group, its
connected components are the commuting graphs including central elements of its maximal subgroups (which, by the Rees–Suschkewitsch theorem, are isomorphic).
Simple groups Non-abelian
finite simple groups are uniquely characterized by their commuting graphs, in the sense that if is a non-abelian finite simple group and is a group, and the commuting graphs of and the commuting graph of are isomorphic (as graphs), then and are isomorphic (as groups). This result was conjectured in 2006 and proved by different authors for sporadic groups, alternating groups, and groups of Lie type. ==Notes==