We are given a weighted directed graph with $$$N$$$ nodes (<= 40) and $$$M$$$ edges (<= 2000). We need to find the minimum weight sum of a subset $$$S$$$ of the edges such that the edges in $$$S$$$ can be partitioned into some disjoint cycles such that every vertex appears in exactly $$$k$$$ ($$$1 <= k$$$ and $$$k*N <= 100$$$) of these disjoint cycles.
Here's the link to the problem
Any ideas on how to solve this? Thanks in advance.