Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Theoretical Computer Science Stack Exchange is a question and answer site for theoretical computer scientists and researchers in related fields. It only takes a minute to sign up.
Can we reverse directions instead?
This problem is equivalent to feedback arc set (in a tournament graph). It is NP-hard.
Required, but never shown