I am looking for a Integer LP formalisation for the k-Minimum Spanning Tree problem.
My idea:
objective function: min sum(x_ij*c_ij) for all i,j
constraints:
(1) makes sure that there are exactly k vertices in the MST. (2) and (3) make sure that if node i is in the tree at least one edge that contains that node is in the tree. (4) says that if there is an edge between i and j in the tree, then also the vertices i and j have to be in the tree.
Unfortunately that does not work as expected. Does anyone know my mistake?
You need to ensure that the subgraph chosen is connected.