Finding an optimal topological ordering
This problem is called the Minimum Linear Arrangement of a Directed Graph and it is indeed NP-hard.

See the reduction from the MLA to MLAD on page&nbsp;11 of this (old) technical report: S.&nbsp;Even and Y.&nbsp;Shiloah, NP-completeness of several arrangement problems, Technical Report no.&nbsp;43 of the Department of Computer Science, Israel Institute of Technology (Technion), 1975 (PDF).