Enumeration of almost Moore digraphs of diameter two

Abstract An almost Moore (d,2)-digraph is a regular directed graph of degree d>1, diameter k=2 and order n one less than the (unattainable) Moore bound. Their enumeration is equivalent to the characterization of binary matrices A fulfilling the equation I+A+A2=J+P, where J denotes the all-one matrix and P is a permutation matrix that commutes with A. In this paper we prove, using algebraic and graphical techniques, that if d>2 the previous equation has no solutions unless P=I. This allows us to complete the classification of the almost Moore (d,2)-digraphs up to isomorphisms. Thus, we conclude that there is only one (d,2)-digraph, namely the line digraph LKd+1 of the complete digraph Kd+1, apart from the particular case d=2 for which there are two more digraphs.