Covering a directed graph with particular requirements
This problem is solvable if you have studied computer science, know standard graph problems, can spot a relationship to one of them, and then diligently study what is known about algorithms for that sort of problem.

If this immediately makes you think that it sounds related to some standard, well-known graph algorithm problem (call it Problem X), then go read about what is known about algorithms for Problem X and variants of Problem X.  You'll soon find an existing algorithm that can be adapted for this.

If you can't spot any relationship to any graph problem you already know, then you should spend more quality time studying an algorithms textbook.  Pick a good algorithms textbook and read it through cover to cover.



Alternatively: What algorithm design paradigms do you know?  For each paradigm you know of, try to find an algorithm of that type.  You should be able to find one for this.



I'm not going to say more than this.  It's your exercise, so you should have the joy of finding the answer on your own; I don't want to take away from that.  Also, practicing problem solving on your own is the best way to strengthen your problem-solving skills.  If you just read someone else's solution, you won't learn nearly as much.