Integer Programming

Formally, a integer programming problem can be defined as follows: Input:

  • A set of linear constraints, .
  • A linear objective function, . Output: A solution such that:
  1. satisfies the constraints
  2. is maximal

Example: Maximal Matchings

Given the situation below: We want to maximise the number of connections in the graph.

  1. For each edge between worker and task , let be some numerical value. We also add the constraint for all edges .
  2. Construct a constraint for each worker .
  3. Construct a constraint for each task .
  4. Add an objective to maximise the number of connections:
  5. An optimal solution to the resulting integer program corresponds to the maximal matching of workers to tasks.

Integer Programming is NP-hard

Theorem: SAT is polynomially reducible to the Integer Programming problem. Proof: Given a formula in CNF:

  1. We want to construct an integer program such that:
  2. For each propositional variable , let and be numerical variables.
  3. Convert each clause into a linear constraint:
  4. For each propositional variable, add the following constraint:

&= 1 \ x_r + x_{\neg r} &= 1 \ x_s + x_{\neg s} &= 1 \end{aligned}$$

  1. We can easily verify that: Hence .

Branch-and-Bound

Branch-and-Bound (Algorithm)

:

  1. Find a solution to the linear relaxation of .
  2. If : Return solution
  3. Otherwise choose a non-integer on which we branch.
    1. Let
    2. Let
    3. If : Return solution
    4. Else return solution
Link to original

Likely will not come up on an exam.

Or otherwise, we would be provided with a calculator. You can use https://www.zweigmedia.com/utilities/lpg/ to calculate these.

An example is shown below:

Other Variants of Linear Programming

  • Mixed Integer Linear Programming (MLP): Hybrid of an integer program and a classic linear program Some variables are required to be integers but not all
  • Zero-one integer programming A restriction of Integer Programming where all variables can either be zero or one