linear programming - How to determine fixed and non-fixed variables in solutions to a integer satisfiability instance? -
i have (satisfiable) (linear) integer satisfiability problem. problem contains, among others, bunch of boolean-valued variables, phone call them x1...xn, 1 of constraints beingness sum(x1...xn) = c. wish determine of these variables fixed, , fixed values of said variables (as in: of these variables take specific value (0 or 1, these 1 time again boolean valued) in possible solutions).
i have working solution, it's slow (to set mildly):
add constraint x1 == 0 check if problem solvable remove constraint added in step 1. add constraint x1 == 1 check if problem solvable remove constraint added in step 4 assert @ to the lowest degree 1 of 2 , 5 succeeded. if both succeeded, variable not fixed. otherwise, variable fixed whichever constraint problem still satisfiable under. repeat 1...8 x2...xnthe problem it's slow. in particular, requires solving problem o(n), or rather 2*n, times. (i'm passing in previous solution warm-start solver, starting solver taking time.)
is there faster method? in particular, 1 requires calling solver less times?
something thinking of, unfortunately doesn't work as-is, turn ilp problem , solve twice, 1 time objective of maximizing sum(x1...xn), 1 objective of minimizing same, , checking variables change. unfortunately, doesn't work in general. (counter)example: boolean variables x , y, x+y=1. maximizing , minimizing can yield same thing though neither variable fixed.
what describe in question variable commonly called probing in milp (mixed integer linear programming) community , unfortunately there nil theoretically improve can do. in practice, however, can speed things quite bit.
as noted in own answer, each variable can maintain track of whether have seen variable false , true in solution, , test setting have not seen before. (note first solution when fixing x_1 set 1 of seenfalse or seentrue every variable cutting number of instances solve in half.)
you can more. when @ particular instance (i.e., when example, seenfalse_i not set , set x_i false) can turn ilsat ilp using random objective. having objective has several purposes
by using different random objective in every instance must solve you'll wide variety of solutions , able set many seen... flags. using optimal solution value ilp , lp relaxation of ilp may able perform reduced cost fixing, i.e., based on reduced cost of out-of-basis boolean variables may able prove can't take other value 1 at, potentially beingness able set more seen... flags. linear-programming integer-programming constraint-satisfaction
No comments:
Post a Comment