Questions tagged [integer-programming]

Questions on optimization constrained to integer variables.

An integer programming problem is a mathematical optimization or feasibility program in which some or all of the variables are restricted to be integers.

Integer problems may be defined as the problem of maximizing or minimizing a linear function subject to both linear and integer constraints. The constraints may be equalities or inequalities.

Integer programs are problems that can be expressed in canonical form as

$$\max\quad c^\top x$$ $$\text{s.t.}\quad Ax\le b$$ $$x\ge0$$ $$x\in\Bbb Z^n$$

where $x$ represents the vector of variables (to be determined), $c$ and $b$ are vectors of (known) coefficients, $A$ is a (known) matrix of coefficients, $(⋅)^⊤$ is the matrix transpose, and $\Bbb Z^n$ is the set of whole numbers of dimension $n$.

The expression to be maximized or minimized is called the objective function ($c^⊤x$ in this case).

The inequalities $Ax \le b$ and $x \ge 0$ are the constraints which specify a convex polytope over which the objective function is to be optimized. The inequality $x \ge 0$ is called non-negativity constraints and are often found in linear programming problems. The $x\in\Bbb Z^n$ constraint limits the to be determined vector variables $x$ to be whole integers. The other inequality $Ax \le b$ is called the main constraints.

Integer programming is NP-hard. A special case, $0-1$ integer linear programming, in which unknowns are binary, and only the restrictions must be satisfied, is one of Karp's $21$ NP-complete problems.

Reference:

1094 questions
1
vote
1 answer

Integer vector decomposition on a degenerate integer vectors basis

Let's say I have a vector of integer numbers, and I would like to get a decomposition of that vector using a set of "basis" vectors (which are also integers), these vectors are arbitrary, i.e. they could and most definitely are linearly dependent.…
rienafairefr
  • 111
  • 1
1
vote
1 answer

Modelling "If-Then" with equality constraints in an Integer Linear Program

Can anyone suggest how to model the following as part of an Integer Linear Program? $x$ is binary and y is integer such that $0 \leq y \leq U$ where $U$ is a known upper bound. $y$ is chosen elsewhere in the ILP but in addition: if $y = 0$, then $x…
1
vote
1 answer

Integer programming, elimination of products of variables and transfer it to linear integer program

I have a constraint of the form: $a_1*a_2 = b_{12}$ where $a_1$ and $a_2$ are integer variables with ranges $a_1∈[{0,1,2,...,m}]$, $a_2∈[{0,1,2,...,n}]$, and $b_{12}∈[{0,1,2,...,m*n}]$. I would want to eliminate the product $a_1*a_2$ to make this…
Quentin
  • 11
1
vote
2 answers

Integer Linear Programming: Sum of Products of Binary Variables

Given four sets of binary variables $x_{1..N}$, $y_{1..N}$, $v_{1..N}$, and $w_{1..N}$ such that $\Sigma_{i=1}^{N} x_i = \Sigma_{i=1}^{N} y_i = \Sigma_{i=1}^{N} v_i = \Sigma_{i=1}^{N} w_i = 1$, I need to linearize the following…
1
vote
1 answer

How to calculate maximal square size when fitting N squares in a given container?

Given a container which width is W and height is H, I'd like to fit N squares of maximal size S in it. Example 1 W = 240 H = 210 N = 7 S = 70 Example 2 W = 200 H = 230 N = 23 S = 40 How would you calculate S from W, H, and N in O(1)?
1
vote
0 answers

Understanding branch and bound tree

How much information can be gleaned from the above? For example the objective value changed from 67.45 to 67.28, is there a way to know which simplex step was used to achieve that? It would mean $x_3$ is the entering variable so which is the…
stackdsewew
  • 1,047
1
vote
1 answer

How to choose from a set of constraints? Generalization of either or constrains?

In an either or constraint, we have two constraints and we have to choose only one. For example if we have constraint_1 <= value_1 or constraint_2 <= value_2 We can introduce a binary variable y = 0 or 1 and write constraint_1 <= value_1 + M *…
drzbir
  • 496
  • 4
  • 19
1
vote
0 answers

How to solve the following optimality problem?

$N$ is a fixed positive integer, and $r \in (0,\frac{N}{N-1}]$ is a fixed positive real number. Consider the following problem $$\min_k \left[1 - r \left( 1 - \frac{1}{k} \right) \right] \left( \frac{N/k + 1}{\lfloor N/k \rfloor + 1} - \frac{N/k -…
1
vote
2 answers

How to interpret this integer program

I'm having problem understanding the min weight st-cut integer programming in this wiki page: https://en.wikipedia.org/wiki/Max-flow_min-cut_theorem In the min-cut dual part, it has $$d_{ij}-p_i+p_i \geq 0 \;\; \forall (i,j) \in E$$ where $d_{ij}$…
TYZ
  • 377
1
vote
2 answers

Fog of War Influence Map

I'm in the process of making an RTS game and I've ran into a problem I could use help with. I want to create a fog of war system that reveals an area around a unit that belongs to you like how it's done in Starcraft 2. To do this, I'm using a 2…
JPtheK9
  • 179
0
votes
2 answers

Determine page number for question based on count of questions and number of questions per page

I'm trying to build a simple quiz, and I want to split up the questions into pages. However, the number of questions and pages can change based on a few parameters, most important is a variable number of questions per page. For example. I have 10…
Ryan
  • 3
0
votes
1 answer

Mixed integer programming with quadratic obj and quadratic constraints?

I was trying to use cplex for matlab to solve my optimization problem. However, It seemed to me that cplex was only able to solve PURE integer programming problem with quadratic objective function and quadratic constraints. Well I can certainly use…
emmyl
  • 1
0
votes
1 answer

Formulating a bilinear optimization problem as an integer linear program

In my work, I came across the following problem: Given a similarity matrix D, where $d_{i,j} \in \Re$ represents the similarity between objects $i$ and $j$, I would like to select $k$ objects, for $k \in \{1, \dots, n\}$, in such a way that…
Arthur
0
votes
1 answer

Taking to values and turning them into precentages

I want to basicly take a range of two values so for example 20-40 and then taking a value in between for say 30 and somehow mathematicly make it say that it is 50% between the values. This should work for any range so 24-44 if we take 34 then its…
0
votes
1 answer

Reformulating problem with 'at least one of the following constraints must hold' to an integer programming problem

I have been giving the following question Consider the following problem with alternative constraints: max $2x_1-79x_2$ subject to $0\le x_1\le 20, 0\le x_2 \le 30$ and at least one of the following inequalities holds: $-2x_1+3x_2\ge0$…
H99
  • 105