Update wasn't aware the set cover is NP-complete too. There is no need to do anything to fit the original into the exact set cover, so the wlog assumption I made isn't necessary. But I also realized the basic idea of my proof was wrong: it shows that current problem is a special case of another problem, which makes it easier, not harder. The complete and correct answer is given at https://math.stackexchange.com/q/2047262 by mjqxxxx.
Let's w.l.o.g. assume no single vertice belongs to more than 1 path (i.e. the paths correspond to distinct sets of vertices).
Then this problem is an exact cover problem (which is NP-complete) extended to find all of the exact covers instead of only any one (and then check if one of them has exact k
elements -- this check is a little trickier in general case). https://en.wikipedia.org/wiki/Exact_cover https://en.wikipedia.org/wiki/Set_cover_problem
The set X
contains all vertices of the graph, the collection S
contains the sets of vertices corresponding to the given set of paths.