This is an instance of the Directed Steiner Network Problem and as such it's solvable in time $|V(G)|^{O(|T|)}$ as proved by Feldman & Ruhl (2006), where $G$ is the given graph and $T\subset V(G)$ is the given subset of vertices (terminals).
Max Alekseyev
- 34.3k
- 5
- 74
- 152