Extremal digraphs whose walks with the same initial and terminal vertices have distinct lengths

Abstract Let D be a digraph of order n in which any two walks with the same initial vertex and the same terminal vertex have distinct lengths. We prove that D has at most ( n + 1 ) 2 / 4 arcs if n is odd and n ( n + 2 ) / 4 arcs if n is even. The digraphs attaining this maximum size are determined.