algorithmlanguage-agnosticconstraint-programmingconstraint-satisfaction

Maximize number of assigned variables in constraint satisfaction


What are some known algorithms (or resources to find algorithms) to find the assignment that maximizes the number of assigned variables in a constraint satisfaction problem (in case no satisfying assignment is present)?


Solution

  • For linear equations, linear algebra can be used to find the number of degrees of freedom, and hence the number of assignable independent variables.

    Edit:

    Upon closer thought on you problem, I think the Simplex Algorithm might help you. It is an optimizing algorithm to find the best integer solution to a linear optimizing problem.

    Edit 2:

    Let the feasible region be the supplied depots.

    Example:

    Let's say you have 2 depot types, X and Y.

    X requires 5 oil and 7 steel to be supplied.

    Y requires 8 oil and 2 steel to be supplied.

    You want to maximize the number supplied depots:

    function to maximize = X + Y

    Conditions:

    X <= total number of depots of type X Y <= total number of depots of type Y 5X + 8Y < total oil supply 7X + 2Y < total steel supply

    Apply the Simplex algorithm, and voila!