// Finds a minimum cost 2-egde-connected spanning subgraph of the weighted graph on 7 // vertices, whose edges and weights can be seen from the objective function. // The problem was generated automatically in Python and it uses that out of the 2^7-2 =126 subsetsof the vertices which // are neither empty nor the whole set, we only need to consider half, since they occour in pairs // because the condition is fulfilled on a set X if and only if the same condition is fulfilled on // its complement. var int x[1..7,1..7] in 0..1; minimize 10*x[1,2]+8*x[1,3]+2*x[1,4]+2*x[1,7]+3*x[2,3]+1*x[2,4]+1*x[2,6]+7*x[3,6]+3*x[3,7]+3*x[4,5]+1*x[5,6]+2*x[5,7] subject to { forall (i,j in 1..7) x[i,j]=x[j,i]; x[1,2]+x[1,3]+x[1,4]+x[1,7]>=2; x[1,2]+x[1,3]+x[1,4]+x[3,7]+x[5,7]>=2; x[1,2]+x[1,3]+x[1,4]+x[1,7]+x[2,6]+x[3,6]+x[5,6]>=2; x[1,2]+x[1,3]+x[1,4]+x[2,6]+x[3,6]+x[3,7]+x[5,6]+x[5,7]>=2; x[1,2]+x[1,3]+x[1,4]+x[1,7]+x[4,5]+x[5,6]+x[5,7]>=2; x[1,2]+x[1,3]+x[1,4]+x[3,7]+x[4,5]+x[5,6]>=2; x[1,2]+x[1,3]+x[1,4]+x[1,7]+x[2,6]+x[3,6]+x[4,5]+x[5,7]>=2; x[1,2]+x[1,3]+x[1,4]+x[2,6]+x[3,6]+x[3,7]+x[4,5]>=2; x[1,2]+x[1,3]+x[1,7]+x[2,4]+x[4,5]>=2; x[1,2]+x[1,3]+x[2,4]+x[3,7]+x[4,5]+x[5,7]>=2; x[1,2]+x[1,3]+x[1,7]+x[2,4]+x[2,6]+x[3,6]+x[4,5]+x[5,6]>=2; x[1,2]+x[1,3]+x[2,4]+x[2,6]+x[3,6]+x[3,7]+x[4,5]+x[5,6]+x[5,7]>=2; x[1,2]+x[1,3]+x[1,7]+x[2,4]+x[5,6]+x[5,7]>=2; x[1,2]+x[1,3]+x[2,4]+x[3,7]+x[5,6]>=2; x[1,2]+x[1,3]+x[1,7]+x[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