Then the solution is easy. We define variables xij and xij for each arc ij and consider the following polyhedron where the constraints say that if the path enters one node then it goes out that node except the source node where there is exactly one arc leaving and the source where there is exactly one arc going into the sink. | ![]() |