Skip to main content

Questions tagged [integer-programming]

Filter by
Sorted by
Tagged with
0 votes
2 answers
233 views

A juice machine has three buttons small, medium large. Each size adds an amount of juice in a range to the cup. Eg small might add from 10-20 mL, medium from 30-35 mL, large from 40-50 mL. The exact ...
s n's user avatar
  • 11
1 vote
1 answer
5k views

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 ...
asm_nerd1's user avatar
  • 229
-1 votes
1 answer
3k views

Help is needed, I've tried to solve it by myself but I could find any reasonable solution which is solid enough. this is what I've wrote: Consider a 0-1 ILP, where each variable x1,x2...,xn can ...
Dvir's user avatar
  • 131
0 votes
0 answers
66 views

Assuming I have two 0-1 decision variables X[a,b] and Y[i,j,e,d] where : X[a,b] = 1 if a is in b 0 otherwise Y[i,j,e,d] = 1 if (i,j) is matched with (e,d) 0 otherwise. I need to ensure that if ...
user2567806's user avatar
2 votes
3 answers
593 views

We have the following recursive function for the dynamic programming problem for a knapsack problem: \begin{align} V(i,w)=&max[ V(i-1,w), v_i +V(i-1,w-w_i)], \quad 1\leq i \leq n, 0\leq w \leq W \...
Niko24's user avatar
  • 45
4 votes
1 answer
1k views

We know that 0-1 integer linear programming is NP-Hard. What about 0-1 integer linear programming with only equality constraints? If so, how to prove it? $$\mathsf{min\ c^T x }$$ $$\text{ s.t. } \...
HonestSJ's user avatar
1 vote
3 answers
476 views

Assume that $x_1,\dots,x_n$ are $n$ integer variables which takes values in a subset of given numbers, say $x_i\in\{5,6,\dots,5000\}$. Let $f_i(x_i)$ and $g_i(x_i)$ both be non-decreasing non-negative ...
dineshdileep's user avatar
2 votes
1 answer
602 views

I am lost in formulating a mathematical model for my linear integer program. My problem is; how to include inventory and backlogging. The following is given: 1100 units can be produced each month ...
Niko24's user avatar
  • 45
1 vote
2 answers
395 views

I'm trying to solve optimization problems of the form: $\min\{cx|Ax\preceq b,\;x\geq 0\}$, where $\preceq$ means lexicographic order; that is, the set of linear inequalities need only to be satisfied ...
P-Cañedo's user avatar
3 votes
1 answer
90 views

I would like to seek help on the complexity of the following problem. Given positive integers $m$, $n$, $D_1$ and $D_2$, find all sequences $a_1\lt a_2 \lt \dots \lt a_n$ are there such that: each $...
Steve Yau's user avatar
1 vote
0 answers
45 views

I am having to solve integer programming problem that has the following property: For feasible solution $x$ maps to a large set $S(x)$ or other admissible solutions and I can find the best solution ...
fran.aubry's user avatar
2 votes
0 answers
64 views

I have some issue but I can't identify a way to solve it. I wanted to ask you what kind of problem it is? We have a resource - contiguous computer memory. Also we have users which require some ...
Dmitry Kurtaev's user avatar
2 votes
1 answer
114 views

I am making a solver to choose the best assignment to a set of people for an event, given their availability (chosen in a set $T$ of time slots), jobs preferences (among $J$ possible jobs) and some of ...
Simon's user avatar
  • 123
0 votes
1 answer
177 views

I want to express the following locigal expression in an IP: $$x_{di} \wedge x_{d'j} \Rightarrow \sum_{\substack{d'' \in D\\ i < k <j}} x_{d''k} = \sum_{i<k<j} a_{k} \ \forall \ d, d' \in ...
Andreas Braun's user avatar
3 votes
2 answers
464 views

How can I model logical OR as an integer linear program? $$(y_3 + y_4 + y_5 + y_6 = 2) \lor (y_2 = 1)$$ where $y_i \in \{0, 1\}$, $1$ = True and $0$ = False.
Marcello S's user avatar
0 votes
1 answer
880 views

I am working on a problem in which I have to solve 0-1 linear programs, that is linear programs where some of the variables are binary, i.e. either 1 or 0. Lets say I have a fixed number of $n$ ...
Doc's user avatar
  • 140
0 votes
0 answers
40 views

I would like to solve a scheduling problem where, I am able to maximize the number of consecutive shifts a employee may have, therefore minimizing the likelihood of them not showing up for a single, ...
Hugh's user avatar
  • 1
1 vote
0 answers
229 views

I have a circle with radius $R$ and $N$ points on a 2D plane with known locations $(x_i,y_i), i=1,2,..N$. I want to place the circle such that it maximizes the number of covered points. Let $d_i=(x_i-...
mohamed's user avatar
  • 41
1 vote
1 answer
134 views

This is a follow up to the previous Question: Conditions for Linear Diophantine Equations to always have a solution It was established in the above's answer that obtaining or testing for the ...
J.Doe's user avatar
  • 799
3 votes
1 answer
352 views

Given a set of $n$ linear equations in $v$ integer variables, where $v > n$, we can say that this system of equations will always have an integer solution. Over $\mathbb N$, is there any such ...
J.Doe's user avatar
  • 799
2 votes
1 answer
5k views

I have an if-then-else condition with three binary variables $A$, $B$ and $C$: if A = 1 then B = 1 else B = C How do I express this as an ...
asm_nerd1's user avatar
  • 229
5 votes
2 answers
1k views

Consider the following optimization problem: Given $n\leq 10^3$ vectors $v_i\in\mathbb{R}^2$, all of which are small, i.e., $\|v_i\| \leq 1$, find a subset $S$ of them that minimizes $ \| w + \...
Kirill's user avatar
  • 195
2 votes
1 answer
175 views

A boolean-valued function defined in the set of positive integers, $\mathcal Z$. $$f(n) = \begin{cases} 0, &n_{min}\le n < n\ast\\1, &n\ast\le n\le n_{max} \end{cases} ; n \in \mathcal Z $$...
Dr Krishnakumar Gopalakrishnan's user avatar
4 votes
1 answer
321 views

There are $k$ Boolean variables $x_1, x_2, \dots, x_k$. $m$ arbitrary subsets of these variables such that sum of each set equals to $1$ (i.e., only one variable is $1$, the others are $0$). E.g., ...
Ersin 101's user avatar
1 vote
1 answer
93 views

Let $x_i,x_{ij}\in\mathbb{R}$ and $b_i\in\{0,1\}$ for all $i,j\in\{1,2,\ldots,n\}$ and $j>i$. I want to know which of all the possible boolean combinations make(s) the following expression maximal: ...
Cromack's user avatar
  • 257
2 votes
3 answers
363 views

I have multiple sets, e.g., $$\{1, 2\}, \{2, 3, 4\}, \{1, 4\}$$ Each variable $1, 2, 3, 4$ is binary. I need to represent the following condition without additional variables $$(1 \land 2) \lor (2 \...
Tom's user avatar
  • 185
1 vote
1 answer
120 views

Suppose we have $S=\{1,2,\ldots,n\}$, a binary variable $x$ and an integer $p$. I would like to model the following constraint using integer linear programming: If $x = 1$, then there must exists a ...
Zir's user avatar
  • 259
1 vote
1 answer
132 views

Let $x_1, x_2, \dots, x_n \in \mathbb R$ and $b_1, b_2, \dots, b_n \in \{0,1\}$. I want to know which of all the possible boolean combinations is maximal. For example, if $x_1 = 2$ and $x_2 = -2$, $$...
Cromack's user avatar
  • 257
2 votes
1 answer
356 views

Let $x$ be an integer such that $x \in [ - 10,10]$ and $b$ a binary variable. Apply integer programming to express $b = 1 \leftrightarrow x \ge3$ My work: \begin{equation} \begin{cases} \...
user_777's user avatar
  • 142
1 vote
2 answers
268 views

Express the condition "$x = 0$ if and only if $y = 0$" as a set of linear constraints, where $x,y$ are integers such that $ - 5 \le x \le 8$ and $0 \le y \le 1$
user_777's user avatar
  • 142
2 votes
2 answers
572 views

I have variables $x \in \{0,1,\dots,5\}$ and $y \in \{0,1\}$, where $$y = \begin{cases} 0 & \text{if } x = 5\\ 1 & \text{if } x \neq 5\end{cases}$$ My problem is to maximize $y$. How can I ...
Naveed's user avatar
  • 21
1 vote
1 answer
87 views

Oftentimes I find myself wanting to use integer programming to find a solution to a particular problem, without caring about optimizing a certain variable at all. I've found that most packages that ...
orlp's user avatar
  • 14k
1 vote
1 answer
525 views

Consider the following bipartite graph: Each node in red color represents a warehouse $w = \{ 1,2,3\} $. For this example we have three warehouses located at different locations. Each warehouse has a ...
user1812's user avatar
  • 113
3 votes
1 answer
4k views

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 ...
piwa's user avatar
  • 33
5 votes
2 answers
1k views

The minimum spanning tree problem can be solved in polynomial time via Kruskal's or Prim's algorithm. However, every integer program I have seen that corresponds to the MST problem require a ...
stensootla's user avatar
3 votes
1 answer
1k views

Can we transform a CNF to ILP without introducing new variables? My question can be seen as a follow up to Express boolean logic operations in zero-one integer linear programming (ILP) as the ...
Moati's user avatar
  • 33
3 votes
1 answer
437 views

Formulation This problem has four entities: A universe: $U = \{1, 2, ..., n\} $ of $n$ elements, indexed with $u$ A set of available colors: $C \in \{1, 2, ..., m\} $ with $m$ colors, indexed with $c$...
Matt D's user avatar
  • 383
4 votes
2 answers
317 views

I came across a problem were you have to plan an optimal assignment pattern. Let's say you have $j=1,\ldots,n$ tasks during $i=1,\ldots,m$ time periods. It's an single agent problem where we have to ...
ELEC's user avatar
  • 143
4 votes
5 answers
10k views

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 \...
Salah's user avatar
  • 91
5 votes
2 answers
999 views

Although it is relatively simple to see that integer linear programming is NP-hard, whether it lies in NP is a bit harder. Therefore, I'm wondering whether the following reasoning shows that $ILP\in ...
Discrete lizard's user avatar
  • 8,472
1 vote
1 answer
826 views

I have a constraint $X \ge Y$ in a Linear programming formulation, where both $X$ and $Y$ are binary. I want to check this constraint on a condition like: ...
asm_nerd1's user avatar
  • 229
3 votes
1 answer
3k views

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: ...
asm_nerd1's user avatar
  • 229
9 votes
3 answers
2k views

Assuming $y$ is a boolean variable in an ILP program (that is $y \in Z$, s.t. $0 <= y <= 1$) and $x_1$, $x_2$ are bounded integer variables between $0$ and $M$. I want to encode the following ...
Setzer22's user avatar
  • 327
2 votes
0 answers
165 views

Instance: a directed graph $G = (V, A)$ with weights $w_a\in\mathbb{R}$ on the edges and a root $v\in V$. Solution: A directed tree with root $v$. Objective: Minimize total weight. My formulation: ...
CSnewbieHking's user avatar
4 votes
2 answers
2k views

I have an NP-hard 0-1 integer program that I need to solve. The issue with this problem is that even finding a feasible solution (ignoring the objective function) is NP-hard. Let us look at two ...
Ribz's user avatar
  • 703
9 votes
1 answer
517 views

I am given a set $A\triangleq\{1,\ldots,k\}$, an integer $s\leqslant k$, and non-negative integers $a_{ij}$. My problem is to find $s$ disjoint subsets $S_j$ of $\{1,\ldots,k\}$ such that: $\bigcup_{j=...
drzbir's user avatar
  • 1,000
3 votes
1 answer
1k views

I have came accross this link. I have an integer linear programming (ILP) problem $$\max_{(x_1, x_2,\ldots, x_n)}\sum_{i=1}^n x_i\cdot f(x_i),$$ $$\text{subject to } \begin{cases} ..., &(1)\\ L≤...
Nick's user avatar
  • 175
4 votes
0 answers
307 views

The classical 0,1 knapsack problem with weights $w$ and unit value for all items $x$: $ max \displaystyle\sum_{i} x_i, x_i \in \{0,1\} $ subject to $ \displaystyle\sum_{i} w_ix_i \leq W $ for a ...
Maarten's user avatar
  • 41
10 votes
3 answers
4k views

My problem is to find all integer solutions to an ILP. As an example, I'm using an ILP with two variables, but I may have more than two variables. I describe the method I currently use to solve this ...
resyst's user avatar
  • 101
3 votes
1 answer
195 views

I have the following problem: Given positive integers $a, b, c, d, n$, compute the maximum possible value (which is garuanteed to be less than $10^9$) of the function $$f(x,y) = cx + dy$$ where the ...
Igor's user avatar
  • 467