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
8
votes
1 answer

XORing consecutive integers has an interesting property. Does anyone know why?

I hesitated to post on StackOverflow but I think the problem has little to do with programming and more to do with mathematics. So, here it is: I wanted to compute the function $ f(n) = 0 \oplus 1 \oplus 2 \oplus \dotsb \oplus n$ in O(1) instead of…
Cranium
  • 183
4
votes
2 answers

Find the minimum integer satisfying an inequality

Let $\alpha \in (0,1)$ and $\beta \in (0,1)$. I want to compute the smallest integer $n > 0$ such that: $$ 1 - \alpha^n - [1 - \alpha]^n \geq \beta. $$ For example, with $\alpha = 0.75$ and $\beta = 0.99$, we find $n = 17$. I know that a dichotomy…
4
votes
2 answers

How to model a consecutive scheduling period in integer programming?

I have a binary variable $y_{t}$ that is equal to $1$ iff the job is scheduled at slot $t$. I need to write constraints that guarantee that if the job is scheduled somewhere, then it must be scheduled for a period of $A$ consecutive slots. I tried…
zdm87
  • 99
3
votes
1 answer

Does there exist other integer models that contain an exponential number of branches thats not knapsack for the branch-and-bound method?

During a class assignment, I was presented with the following question: Provide an integer program that has an exponential number of branches...(expunged excess) There was more to the question, but I'm primarily concerned and curious about finding…
Miss Mae
  • 1,576
3
votes
3 answers

Double summation

I'm currently solving some Operations Research exercises related to Integer Programming. In one of the solutions of the exercises the author uses the following formula for the objective function: $\sum_{i=1}^{m} \sum_{j=1}^{n} C_{ij} x_{ij} $ and…
CRM
  • 153
3
votes
2 answers

For a fixed positive integer n, show that the determinant below is divisible by n

For a fixed positive integer n, if $D = \left|\begin{array}{ccc} n! & (n + 1)! & (n + 2)! \\ (n + 1)! & (n + 2)! & (n + 3)! \\ (n + 2)! & (n + 3)! & (n + 4)! \end{array} \right|$ show that $\left(\dfrac{D}{(n!)^{3}} - 4 \right)$ is…
user7789
3
votes
1 answer

Determining Weights of Columns For A Prioritization Matrix

I'm trying to calculate the weight of various tasks. I have tasks that are daily, weekly, monthly, yearly. As a task gets closer to due date, I'd like it to be more important. For example, a weekly task that is due in 2 days is more important…
3
votes
1 answer

How to find a multiple of an integer that approximates a perfect square.

I'm looking for an efficient algorithm for minimizing (approximate solutions welcome) an integer function of the form: $$ f(j) = \min\left({jn - \left\lfloor \sqrt {jn} \right\rfloor}^2,{\left\lceil \sqrt {jn} \right\rceil}^2-jn\right)$$ for $1 \le…
3
votes
2 answers

Packing squares in a rectangle

I need to pack $N$ identical squares arranged in array fashion, $R$ rows of $C$ columns, the last row possibly incomplete, in a $W\times H$ rectangle (reals). The squares must be as large as possible. With $S$ the side of the squares, this leads to…
user65203
3
votes
1 answer

Integer Programming (formulating a problem)

The Record-a-Song Company has contracted with a rising star to record eight songs. The durations of the songs are 8, 3, 5, 5, 9, 6, 7, and 12 minutes, respectively. Record-a-Song uses a two-sided cassette tape for the recording. Each side has a…
3
votes
2 answers

How does one find the minimum of an equation of integers?

Going through a book of probability problems and am working on the Sock Drawer Problem: A drawer contains red socks and black socks. When two socks are drawn at random, the probability that both are red is 1/2. How small can the total number of…
Felix
  • 157
2
votes
0 answers

Find bounded integers $x, y$ minimizing $| t - x * y |$

How do I find the integers $x$ and $y$ minimizing $| t - x \cdot y |$ with $1 \leq x < N$ and $1 \leq y < M$ ? Background: A clock signal is divided by two hardware prescalers (with a limited number of bits), how do I produce an output frequency…
Julien
  • 243
2
votes
3 answers

Finding $a + b + c$ given that $\;a + \frac{1}{b+\large\frac 1c} = \frac{37}{16}$

Please help me to find the needed sum: If $a,b,c$ are positive integers such that $\;a + \dfrac{1}{b+\large \frac 1c} = \dfrac{37}{16},\;$ find the value of $\;(a+b+c)$. Thanks!
2
votes
2 answers

Can one simplify a $3$-term max function, where one term is comprised of subterms from other two?

Is the expression $\max(a + b, b + c, c + d)$ in its simplest from? Assuming $a,b,c,d$ are positive integers. What I've Tried: I've tried several approaches but they all end up as either: $\max(\max(a, c) + b, c + d)$ or $\max(a + b, \max(b, d) +…
James
  • 121
2
votes
1 answer

I need help with this integer programming problem

I do not know how to solve this integer programming problem. $$\min_{w_{i,j}} \sum_{i=1}^{N}\sum_{j=1,j \neq i}^{N} w_{i,j}$$ $$s.t. \sum_{j=1,j \neq i}^{N} w_{i,j} \geq L, \forall i \in \left[ N \right]$$ $$w_{i,j} = w_{j,i}, \forall i \in \left[ N…
1
2 3 4 5