Linked Questions
65 questions linked to/from Express boolean logic operations in zero-one integer linear programming (ILP)
2
votes
0
answers
2k
views
“Greater than 0” condition in integer linear program with a binary variable [duplicate]
How can one model the following condition in an integer linear program?
$$
y = \begin{cases} 1 & \text{if } x > 0\\ 0 & \text{otherwise}\end{cases}
$$
Where $y \in \{0,1\}$ and $x \in \...
41
votes
4
answers
25k
views
Why is linear programming in P but integer programming NP-hard?
Linear programming (LP) is in P and integer programming (IP) is NP-hard. But since computers can only manipulate numbers with finite precision, in practice a computer is using integers for linear ...
15
votes
3
answers
3k
views
Cast to boolean, for integer linear programming
I want to express the following constraint, in an integer linear program:
$$y = \begin{cases}
0 &\text{if } x=0\\
1 &\text{if } x\ne 0.
\end{cases}$$
I already have the integer variables $x,...
4
votes
5
answers
10k
views
"Greater than" condition in integer linear program with a binary variable
How can one model the following condition in an integer linear program?
$$A = \begin{cases} 1 & \text{if } B > C\\ 0 & \text{otherwise}\end{cases}$$
where $A \in \{0,1\}$ and $B, C \in \...
14
votes
2
answers
738
views
Does every NP problem have a poly-sized ILP formulation?
Since Integer Linear Programming is NP-complete, there is a Karp reduction from any problem in NP to it. I thought this implied that there is always a polynomial-sized ILP formulation for any problem ...
3
votes
1
answer
4k
views
Is 0-1 integer linear programming NP-hard when $c^T$ is the all-ones vector?
Karp's 21 NP-complete problems show that 0-1 integer linear programming is NP-hard. That is, an integer linear program with binary variables.
If we set the $c^T$ vector of the objective $\text {...
1
vote
1
answer
5k
views
Expressing conditional in linear program [duplicate]
I have two variables $A$ and $B$, with $A$ being binary and $B$ is a real number where $B \ge 0$. My conditions are:
if B > 0
A = 1
else
A = 0
...
2
votes
1
answer
4k
views
Use max operation in a constraint in Linear Programming
I have liner programme with set of $x_{3n}$ variables where $x_{ij}$ are {0,1}. I am solving this linear programme using LP-Solve.
Using these variables, I want to form following constraint :
$max(...
3
votes
1
answer
2k
views
Converting If-else condition to Linear Programming
I have a constraint in a linear programming formulation with two variables: $X \ge Y$
To which I want to apply the following if-else conditions:
...
5
votes
2
answers
826
views
How to reduce the low-rank matrix completion problem to integer programming?
Consider the low-rank matrix completion problem:
Given an integer $k$ and a subset of entries of some $n \times n$ matrix, fill in the rest of the entries so that the resulting matrix has rank at ...
3
votes
1
answer
4k
views
Express a "complex" IF-Statement to Linear Programming
In our current project we need to model the following if-statement in linear programming:
If T1 < b < T2 then z = s else z = 0
where T1 and T2 are two ...
0
votes
1
answer
2k
views
Express XOR with multiple inputs in zero-one integer linear programming (ILP)
In the below post, it is explained how to express xor of two variables as linear inequalities.
Express boolean logic operations in zero-one integer linear programming (ILP)
Naturally, the xor of ...
5
votes
2
answers
340
views
Find a binary matrix so that no vector from {-1,0,1}^n is in its kernel
Given integers $n,m$, I want to find a $m \times n$ binary matrix $X$ such that there does not exist any non-zero vector $y \in \{-1,0,1\}^n$ with $Xy=0$ (all operations performed over $\mathbb{Z}$). ...
4
votes
2
answers
858
views
Schedule tasks from a weighted list with time frame constraints
I'm attempting to create an automatic scheduler from a list of tasks I have available. Here are the key points:
Each task has been given a priority beforehand and the algorithm should try to maximize ...
5
votes
1
answer
920
views
Nesting algorithm for rectangular-based, fixed-orientation polygons
I'm looking for an algorithm that is closely related to the 2-dimensional nesting problem (also known as lay planning, bin packing, and the cutting stock problem).
The main differences between this ...