Given a binary relation $R$ on a finite set $S$, is there an efficient algorithm to transform $R$ to a transitive relation $R'$ by minimum number of addition or deletion of pairs $(x,y)$ to or from $R$ where $x,y \in S$?
This problem (for symmetric relations) is in graph theoretic terms called Cluster Editing and is a well know NP-complete problem.
For digraphs, it had been studied under the name Transitivity Editing Weller, M., Komusiewicz, C., Niedermeier, R. and Uhlmann, J., 2012. On making directed graphs transitive. Journal of Computer and System Sciences, 78(2), pp.559-574. as pointed out by idmean in a comment below, and is not surprisingly NP-complete.