In directed a graph with n nodes, we know that the distance between a specific vertex $s$ and a specific vertex $t$ is $k$. What's the maximum number of edges this graph can have?
My attempt: reasoning on the path: s -> 2 -> .. -> k -> t
Since we couldn't skip from s to 3 or 4 or .. or t. the edges $\mid \{ (s,3), .., (s,k), (s,t)\}\mid = k-1 $, do not exist. And the same starting from 2 for a path of length $(k-1)$ and so on. In total at least $\sum_{i=2}^k (i -1) = \frac{k\cdot (k-1)}{2}$ edges are missing.
Edit: Thanks to @Steven's comment we can also exclude $n - (k +1)$ edges if $k > 2$. One for each vertex not on the path.