Digraphs with a fixed number of edges and vertices, having a maximal   number of walks of length 2
  Inspired by the work of Backelin on non-commutative correspondences to Macaulay's theorem of the growth of the Hilbert series of affine algebras, we study embedding dimension dependant versions of his degree 2 to degree 3 result. In graph-theoretical terms, we study the following question: what is the maximal number of directed walks of length 2 in a digraph with (k) edges and (n) vertices? The problem can also be formulated as follows: maximize (< \lambda, \lambda^T >) when (\lambda) is a partition of (k), contained in an (n \times n) box. We show that for mild restrictions on (n), optimal digraphs are the ``stars of saturated stars''. 
Jan Snellman