Skip to main content

Integer Programming

  • Chapter
  • First Online:
Operations Research

Part of the book series: Springer Texts in Business and Economics ((STBE))

  • 6869 Accesses

Abstract

Not too long after more and more applications of linear programming were developed it became apparent that in some of these applications, the variables would not be able to attain just any (nonnegative) value, but should be integers. As a simple applications, if a variable has been defined to denote the number of cans of beans manufactured in the planning period, then surely it would make no sense to make, say, 1,305,557.3 cans: the last 0.3 cans would have to be rounded up or down. While this may be an acceptable practice when dealing with this application (after all, it makes very little difference whether or not we make 0.3 cans more or less), in other applications this may make a huge difference. For instance, assigning airplanes to routes or trucks to deliveries may very well make the difference between gain and loss. Furthermore, simply rounding up or down a noninteger (usually referred to as a continuous solution) will not necessarily result in an optimal integer solution. We will demonstrate this fact below.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to H. A. Eiselt .

Exercises

Exercises

Problem 1 (a one-dimensional cutting stock problem)

A home building store faces the following problem. Their customers demand half inch plywood in the sizes 4 × 3 ft, 4 × 5 ft, and 4 × 6 ft. Customer demand for these three sizes is estimated to be at least 20, 50, and 40 and customers are prepared to pay $7, $9, and $10 for each of these sheets, respectively. The store must generate these sizes by cutting up standard 4 × 8 ft sheets, each of which costs them $6. These sheets are in unlimited supply. Furthermore, each cut costs the store $1.50. Formulate a model that indicates to the decision maker how to cut up the 4 × 8 ft sheets so as to maximize their profit. Clearly show the cutting patterns and define your variables properly.

Solution

Since the widths are all 4 ft, we only have to consider a single dimension. The cutting plan includes patterns with two 3 × 4 ft boards (and the resulting 2 × 4 ft piece of waste), one 3 × 4 ft board and a 5 × 4 ft board without any waste, and a single 6 × 4 ft board with the resulting 2 × 4 ft piece of waste. The number of cuts performed according to these three patterns are denoted by y 1, y 2, and y 3, respectively. The problem can then be formulated as

Problem 2 (a 2-dimensional cutting stock problem)

A planner has 30 sheets of plywood of size 10 × 10 ft. They presently need 20 sheets in the shape of disks of diameter 5 ft as well as 15 sheets of plywood in the shape of 4 × 6 ft rectangles. The cutting patterns that are considered by the decision maker are shown in Fig. 4.12.

Fig. 4.12
figure 12

Cutting patterns

It costs $2.00 to cut a disk and $1.50 to cut a rectangle. This price includes all required cuts and is independent of the pattern the shape is cut from. Alternatively, we could purchase a disk at $4.50 and a rectangle for $3.00 each.

Formulate a linear programming problem that

  • Minimizes the cost of obtaining the required shapes,

  • Does not use more 10 × 10 ft sheets than are available

  • Produces the required numbers of disks and rectangles, and

  • Ensures that the cutting results in no more than 30 % of waste.

Define all variables clearly.

Solution

Define y j , j = 1, 2, 3 as the number of times the j-th pattern is cut. In addition, define variables y 4 and y 5 as the number of disks and rectangles that are purchased.

Problem 3 (neighborhood constraints in forestry modeling)

This model concerns planning in forestry. In particular, suppose that a land owner has a number of parcels, which, for the sake of simplicity, can be thought of as a regular grid. The idea is now to plan which of the parcels should be harvested. Once it has been decided to harvest a certain parcel, it will be clearcut. One restriction is to ensure that neighboring parcels should not be harvested, so as to ensure avoiding huge clearcut areas that foster erosion and do not sustain wildlife. Suppose that the parcels are arranged and numbered as shown in Fig. 4.13.

Fig. 4.13
figure 13

Parcel arrangement and numbering

Model the neighborhood constraints that ensure that neighboring parcels are not harvested.

Solution

Define binary variables y j that assume a value of 1, if parcel j is harvested and 0 otherwise. The constraints we are interested in can then be expressed as conditional constraints of the type “if parcel j is harvested, then its neighbor k cannot be harvested,” which will then have to be expressed for all neighbors of each parcel. As an example, consider the neighboring parcels 1 and 2. Table 4.17 shows the four cases.

Table 4.17 Decision table

It is apparent that the only case that is prohibited is when both neighboring parcels are harvested at the same time. As a result, the constraint that prevents the undesirable case from happening, we formulate y 1 + y 2 ≤ 1. This type of constraint has to be formulated for all pairs of neighbors, e.g., parcels 1 and 2, 1 and 5, 2 and 3, 2 and 6, and so forth. For the above problem, there are no less than 24 such neighborhood constraints. If parcels that only share a corner are also considered neighbors (such as parcels 1 and 6 or parcels 8 and 11), that will add another 18 constraints.

Problem 4 (a warehouse distribution problem)

A decision maker has presently three warehouses with capacities of 30, 10, and 50 units, respectively. Operating the three warehouses incurs fixed operating costs of $25, $50, and $45, respectively. The first warehouse could be expanded by up to 20 units for a cost of $1 per unit capacity. It is also possible to close any of the existing warehouses, in which case no operating costs are incurred at that site. Furthermore, two additional sites have been identified, where new warehouses might be opened. The costs to open the two new warehouses are $15 and $25, and their respective capacities are 20 and 30 units.

As far as demand goes, there are presently three customers with demands of 20, 60, and 40 units. These demands have to be satisfied exactly. The unit transportation costs between the existing and potential warehouses and the customers are shown in Table 4.18, where the first three supply points refer to the existing warehouses, while the last two supply points symbolize the potential new warehouses. Formulate and solve an integer programming problem that minimizes the total costs.

Table 4.18 Unit transportation costs

Solution

In order to formulate the problem, we need to define a number of variables. First of all, we define binary variables y 1, y 2, y 3, y 4, and y 5, which assume a value of one, if the warehouse is kept open (for the first three existing warehouses), or is newly opened in case of the last two warehouses. Furthermore, we define the continuous variable w, which denotes the number of capacity units, by which the first warehouse is expanded. In addition, we will define the usual continuous variables x ij as the quantity that is shipped from warehouse i to customer j.

The objective function is then the sum of facility costs (operating costs for the existing warehouses and opening costs for the planned new warehouses), expansion costs for the first warehouse, and transportation costs. The facility costs are, of course, only incurred if the facilities are actually opened, so that we have 25y 1 + 50y 2 + 45y 3 for the existing warehouses and 15y 4 + 25y 5 for the new warehouses. The expansion costs for the first warehouse are 1w. Finally, the transportation costs are 3x 11 + 7x 12 + 4x 13 + 2x 21 + … + 9x 53.

Consider now the constraints. First there are the capacity constraints of the warehouses. For instance, the second warehouse has a capacity of 10, provided we keep it open. The variable that determines this is y 2, so that the constraint states that the flow out of warehouse 2 cannot exceed the capacity of the warehouse, or x 21 + x 22 + x 23 ≤ 10y 2. The constraints for the other existing or planned warehouses, except for the first, are similar. The capacity of the first warehouse equals 30y 1 plus the capacity of the expansion (if any), which is w. We also have to specify that the expansion will only be undertaken if the warehouse is kept open, as it is meaningless to decide to close warehouse 1 and then expand its capacity. This is written as w ≤ 20y 1. The reason is that if the warehouse is kept open, we have y 1 = 1, so that the constraint states that we can expand its capacity of 20 units. On the other hand, if warehouse 1 is closed, y 1 = 0 and the constraint states that w ≤ 0, meaning that no expansion is possible. The demand constraints then require the inflow into the customer sites to be equal to the demand at the site. The complete formulation is then as follows:

Solving the problem results in keeping warehouses 1 and 3 open, while closing warehouse 2. In addition, warehouse 5 will be opened, while warehouse 4 is not. It was also decided to expand the capacity of warehouse 1 by 10 units. The shipments are as follows: from warehouse 1, we send 20 units to the first and 20 units to the third customer, from warehouse 3 we send 30 units to customer 2 and 20 units to customer 3, and from the newly opened warehouse 5 we ship 30 units to customer 2. The total cost of the operations is $505.

Problem 5 (choosing vehicles for a display)

An impresario wants to put up an exhibit featuring some antique cars. The vehicles potentially available are a Bugatti, Cadillac, Cobra, Corvette, Pierce Arrow, and Studebaker. The impact of the individual vehicles has been estimated in terms of the number of people who would make a special trip to see a vehicle as 58, 37, 42, 40, 55, and 33. The budget of the organizer is $15,000, and the costs to transport the automobiles to the venue (they are presently located at different sites) and the costs of their insurance (depending on the vehicles’ estimated value) are $6,000, $4,000, $3,800, $4,200, $5,500, and $3,200. The obvious idea is to choose vehicles for the exhibit, so as to maximize the impact, while staying within the budget. In addition, there are some further requirements.

  • Choose at least three vehicles for the exhibit.

  • If a Corvette is included in the exhibit, then a Cobra must also be included.

  • If a Bugatti is not included in the show, then a Cadillac must be included.

Solution

In order to formulate the problem, we first define binary variables y 1, y 2, y 3, y 4, y 5, and y 6 that assume a value of one, if the 1st, 2nd, …, 6th vehicle is included in the exhibit, and 0 otherwise. The formulation of the objective function and the budget constraint are straightforward. Consider now the additional requirements. The number of vehicles included in the exhibit is expressed as the sum of all variables, so that we can write y 1 + y 2 + y 3 + y 4 + y 5 + y 6 ≥ 3.

The next step is the conditional constraint “if Corvette, then Cobra,” or, more formally, “if y 4 = 1, then y 3 = 1 as well.” The possible solutions and their acceptability are shown in Table 4.19.

Table 4.19 Decision table for the second requirement in problem 5

The undesirable solution y 4 = 1 and y 3 = 0 can be avoided by including the constraint y 4 ≤ y 3, which violates the undesirable solution, while it is valid in the other three solutions.

Consider now the last requirement. The conditional constraint is “if not Bugatti, then Cadillac,” or, equivalently, “if y 1 = 0, then y 2 = 1.” Again, consider the decision table shown in Table 4.20.

Table 4.20 Decision table for the last requirement in problem 5

The only solution that violates the condition is the one that has neither of the two vehicles in the exhibit. In other words, at least one of the two vehicles must be in the exhibit, so we can formulate y 1 + y 2 ≥ 1.

The formulation of the entire problem is then

Table 4.21 displays solutions and objective values for a large variety of budgets. It is apparent that there is no feasible solution for any budget strictly less than 11, as we have to include at least three vehicles in the exhibit, and the three least expensive cars, the sixth, third, and second vehicle, cost 3,200 + 3,800 +  4,000 = $11,000. On the other hand, exhibiting all vehicles costs $26,700, so that any budget at or above this level will enable the organizer to exhibit all vehicles. Also notice the “granularity” of the solutions: an increase in the budget by $1,000 results in an increase in the objective value by 7 (if increasing the budget from $11,000 to $12,000), by 14 (if the budget is increased from $12,000 to $13,000), by 7 if the budget is increased from $13,000 to $14,000, and so forth.

Table 4.21 Solutions of the car exhibit problem for different budgets

Problem 6 (cutting plane method)

Consider the following all-integer linear programming problem:

Solve the linear programming relaxation of the problem and then sequentially introduce cutting planes to solve the problem for eight steps or to optimality, whichever comes first.

Solution

Note: When we reformulate the cuts, we write them as equations with the added excess variables in the rightmost column of Table 4.22. This is to indicate which excess variable was used in which cut, which is useful when formulating cuts later in the process. However, when adding the cut to the problem, we write the constraint without the excess variable as an inequality, as the solver will automatically add slack and excess variables.

Table 4.22 Cutting planes for problem 6

The successive cutting planes generated for this problem are shown in Table 4.22.

Problem 7 (solving a problem via branch-and-bound)

Consider the following all-integer optimization problem:

  1. (a)

    Produce the solution trees for branching starting with y 1 and y 2, respectively.

  2. (b)

    What would the optimal solution be, if the integrality requirement for y 2 had been dropped?

  3. (c)

    What are the additional constraints that were introduced between the root of the tree and the last integer solution found in the tree, assuming that branching starts with y 1?

  4. (d)

    What would have happened, if the left child that resulted from the first branching had an objective value of 34.8?

Solution

  1. (a)

    The solution that starts branching on y 1 is shown in Fig. 4.14.

    The solution tree that starts branching on y 2 is shown in Fig. 4.15.

    The problem has actually three alternative optimal solutions. Note that in both trees, branching 4 is necessary to complete the solution tree. The optimal solutions are: \( {\bar{y}_1} = { 3} \)and \( {\bar{y}_2} = { 2} \), \( {\bar{y}_1} = { 2} \) and \( {\bar{y}_2} = { 3} \), as well as \( {\bar{y}_1} = { 1} \) and \( {\bar{y}_2} = { 4} \), all with a value of the objective function of \( \bar{z} = { 35} \).

  2. (b)

    In this case we would have had to start branching with y 1, so that Fig. 4.14 applies. The optimal solution would be the right child of the root of the tree, i.e., solution \( {{\mathbf{\bar{y}}}^2} \), which has \( {\bar{y}_1} = { 3} \) and \( {\bar{y}_2} = { 2}.{1667} \) with an objective value of \( \bar{z} = { 36}.{1667} \).

  3. (c)

    The additional constraints are y 1 ≥ 3, y 2 ≤ 2, and y 1 ≤ 3.

  4. (d)

    In both trees, we would never have branched from the left child of the first branching.

Fig. 4.14
figure 14

Branching on y1 first

Fig. 4.15
figure 15

Branching on y2 first

Problem 8 (choosing the correct branch-and-bound tree)

Consider the following all-integer programming problem:

Four solution trees have been developed by four different individuals, each claiming that their tree is correct. The trees are shown in Fig. 4.16a–d. However, only one of the trees is correct. Which one? For each solution tree, write one sentence that explains why this is or is not the correct tree.

Fig. 4.16
figure 16

Four different solution trees

Solution

The solution tree in Fig. 4.16a is false. The right child of the root of the tree is not feasible. If the solution there had been correct, branching should have continued at that node.

The solution tree in Fig. 4.16b is false. The branching on the second level should be y 2 ≤ 4 (as is), but the branch to the right child should be y 2 ≥ 5, not y 2 ≥ 4.

The solution tree in Fig. 4.16c is false. The second branching leading to the left child has the objective value increase from z = 224/5 to z = 231/3, which cannot happen in a maximization problem.

The solution tree in Fig. 4.16d is correct.

Problem 9 (heuristics: Greedy and swap method)

Consider the following integer programming problem.

Use the Greedy algorithm and a Swap interchange to find a solution.

Solution

Ordering the variables with respect to their objective function contribution per resource unit, the order is y 5, followed by y 4, y 3, y 2, and y 1. Before we start increasing the values of the variables, we need to set the variables to their minimum values, i.e. y 3 = 1 and y 4 = 1, so that we do not have to worry about lower bounds anymore. This leaves us with 640–42 − 37 = 561 resource units.

We now start the allocation with y 5. The upper bound is 2, so we set y 5 = 2, which leaves us with 561 − 2(64) = 433 resource units. The next best variable is y 4. As its upper bound equals 2 and its value already equals 1, we can only increase y 4 by 1. This leaves 433 − 1(37) = 396 resource units. The next valuable variable is y 3. It does not have an upper bound, so that we increase its value as much as the remaining resource units allow. We have 396 units left, each unit of y 3 requires 42 units, so that the largest value of y 3 = 9. Increasing y 3 by that value leaves us 396 − 9(42) = 18 resource units left. The next most valuable variable is y 2, whose upper bound is 2. However, the remaining resource units are only good for an increase of 1. This leaves us 8 resource units, which are not sufficient for any other increase. In summary, we have the solution y = [0, 1, 10, 2, 2], for which the objective value z = 1,021 may be calculated.

In the Swap procedure we will decrease the value of a variable by one, thus freeing some resources, which we then try to use by increasing the value of some other variable. For instance, decreasing the value of y 2 by one frees 10 units for a total of 18, which is not sufficient to increase any other variable by an integer amount.

Reducing the variable y 3 by frees up 42 units, so that 42 + 8 = 50 resource units are now available. Note that it also reduces the objective value by 65. Those resource units may be used to increase the value of y 1 by 2, which increases the objective value by 42, not enough to make up for the loss of 65. Alternatively, we may increase y 4 by one, which increases the objective value by 58, also not sufficient to make up for the loss.

We may now try to reduce the value of y 4 by 1, freeing 37 resource units for a total of 45. Note that the objective value decreases by 58 in the process. The resource may now be used to increase y 3 by one unit, which increases the value of the objective function by 65. This represents a net gain of +7, so that we make this change permanent. The new solution is now y = [0, 1, 11, 1, 2] with an objective value of z = 1,028. Three resource units remain available.

The process would continue here. We terminate the procedure at this point. It so happens that the solution found here is optimal.

Problem 10 (Lagrangean relaxation)

Consider a maximization assignment problem with coefficients as shown in the matrix

$$ {\mathbf{C}} = \left[ {\begin{array}{llll} 9 & 2 & 4 \\3 & 1 & 5 \\6 & 8 & 7 \\\end{array} } \right], $$

and assume that the following complicating constraint must also be satisfied:

$$ {5}{x_{{{11}}}} + {x_{{{12}}}} + { 5}{x_{{{13}}}} + { 2}{x_{{{21}}}} + { 4}{x_{{{23}}}} + { 3}{x_{{{31}}}} + { 6}{x_{{{32}}}} + { 5}{x_{{{33}}}} \leqslant { 9} $$
  1. (a)

    Solve the assignment problem by way of enumeration, ignoring the complicating constraint. Is the solution unique? Show that it violates the complicating constraint.

  2. (b)

    Dualize the complicating constraint and solve the resulting Lagrangean relaxation as an assignment problem, using a value of \( \hat{u} = 1 \) for the dual variable.

  3. (c)

    Same as (b) above, but with \( \hat{u} = { 2} \).

  4. (d)

    Same as (b) above, but with \( \hat{u} = { 1}.{5} \).

  5. (e)

    Compare and discuss the results in (b), (c), and (d) above.

Solution

  1. (a)

    Enumerating all six feasible solutions to the assignment problem without the complicating constraint, we find the unique optimal solution \( {\bar{x}_{{11}}} = {\bar{x}_{{23}}} = {\bar{x}_{{32}}} = 1 \) and \( {\bar{x}_{{ij}}} = 0 \) otherwise. The associated maximal value of the objective function is \( \bar{z} = { 22} \). This solution will yield a left-hand side value of 15 in the complicating constraint, and since the right-hand side value of this constraint is 10, the constraint is violated.

  2. (b)

    Dualizing the complicating constraint with a value \( \hat{u} = 1 \) for the dual variable transfers the problem into a regular assignment problem with maximizing objective and the coefficient matrix

    $$ {\mathbf{C}} = \left[ {\begin{array}{llll} 4 & 1 & { - 1} \\1 & 1 & 1 \\3 & 2 & 2 \\\end{array} } \right]. $$

    The solution to this problem is the same is that shown in (a), i.e., \( {\hat{x}_{{11}}} = {\hat{x}_{{23}}} = {\hat{x}_{{32}}} = 1 \) and \( {\hat{x}_{{ij}}} = 0 \) otherwise, which results in the value of the objective function \( \hat{z} = 16. \) The complicating constraint is again violated. An alternative optimal solution is \( {\hat{x}_{{11}}} = {\hat{x}_{{22}}} = {\hat{x}_{{33}}} = 1 \) and \( {\hat{x}_{{ij}}} = 0 \) otherwise. This solution also violates the complicating constraint.

  3. (c)

    With \( \hat{u} = 2 \), we obtain

    $$ {\mathbf{C}} = \left[ {\begin{array}{llll} { - 1} & 0 & { - 6} \\{ - 1} & 1 & { - 3} \\0 & { - 4} & { - 3} \\\end{array} } \right], $$

    which has the unique optimal solution \( {\hat{x}_{{12}}} = {\hat{x}_{{23}}} = {\hat{x}_{{31}}} = 1 \) and \( {\hat{x}_{{ij}}} = 0 \) otherwise, which has an optimal value of the objective function of \( \hat{z} = 15 \). Now the left-hand side of the complicating constraint equals 8, so that this constraint is also satisfied.

  4. (d)

    With \( \hat{u} = 1.5 \), we obtain

    $$ {\mathbf{C}} = \left[ {\begin{array}{llll} {1.5} & {0.5} & { - 3.5} \\0 & 1 & { - 1} \\{1.5} & { - 1} & { - 0.5} \\\end{array} } \right], $$

    which has the unique optimal solution \( {\hat{x}_{{11}}} = {\hat{x}_{{22}}} = {\hat{x}_{{33}}} = 1 \) and \( {\hat{x}_{{ij}}} = 0 \) otherwise, which has an optimal value of the objective function of \( \hat{z} = 15.5 \). Now the left-hand side of the complicating constraint equals 10, so that this constraint is again violated.

  5. (e)

    With \( \hat{u} = 1 \), as in (b), the complicating constraint is violated, indicating that the value of \( \hat{u} \) should be increased. With \( \hat{u} = 2 \) as in (c), the complicating constraint is satisfied, demonstrating that \( \hat{u} \)is sufficiently large. Finding an intermediate value such as \( \hat{u} = 1.5 \) as in (d), the complicating constraint is again violated, showing that the value of 1.5 is too small for the Lagrangean multiplier. Enumerating all solutions of the original assignment problem without additional constraints and then checking which solutions satisfy the complicating constraint, we can see that \( \hat{u} = 2 \) actually results in the unique optimal solution to the problem with the complicating constraint added.

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Eiselt, H.A., Sandblom, CL. (2012). Integer Programming. In: Operations Research. Springer Texts in Business and Economics. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-31054-6_4

Download citation

Publish with us

Policies and ethics