param maxd integer = 5; set DEGREES := 0..maxd; var W {DEGREES} >= 0; # weight for vertices according to their degrees var g {DEGREES} >= 0; # weight for degree reductions from deg i var h {DEGREES} >= 0; # weight for degree reductions from deg \le i var Wmax; # maximum weight of W[d] minimize Obj: Wmax; # minimize the maximum weight subject to MaxWeight {d in DEGREES}: Wmax >= W[d]; subject to gNotation {d in DEGREES : 2 <= d}: g[d] <= W[d]-W[d-1]; subject to hNotation {d in DEGREES, i in DEGREES : 2 <= i <= d}: h[d] <= W[i]-W[i-1]; subject to Deg3 {p2 in 0..3, p3 in 0..3 : p2+p3=3}: 2^(-W[3] -p2*g[2] -p3*g[3]) + 2^(-W[3] -p2*W[2] -p3*W[3] -h[3]) <=1; subject to Deg4 {p2 in 0..4, p3 in 0..4, p4 in 0..4 : p2+p3+p4=4}: 2^(-W[4] - p2*g[2] - p3*g[3] - p4*g[4]) + 2^(-W[4] - p2*W[2] - p3*W[3] - p4*W[4] - h[4]) <=1; subject to Deg5 {p2 in 0..5, p3 in 0..5, p4 in 0..5, p5 in 0..5 : p2+p3+p4+p5=5}: 2^(-W[5] - p2*g[2] - p3*g[3] - p4*g[4] - p5*g[5]) + 2^(-W[5] - p2*W[2] - p3*W[3] - p4*W[4] - p5*W[5] - h[5]) <=1;