- •Preface
- •Contents
- •1 An Introduction to Logic
- •The Purpose of Logic: Philosophical: Computational
- •Logical Inference and Consistency
- •The Propositional Calculus
- •Connectives and Truth Tables
- •Equivalent Statements
- •Disjunctive and Conjunctive Normal Forms
- •Complete Sets of Connectives
- •The Calculus of Indications
- •Venn Diagrams
- •The Predicate Calculus
- •Prenex Normal Form
- •Decidable Fragments of Mathematics
- •The Theory of Dense Linear Order
- •Arithmetic Without Multiplication
- •References and Further Work
- •Exercises
- •2 Integer Programming
- •Linear Programming
- •The Dual of an LP Model
- •A Geometrical Representation of a Linear Programme
- •Integer Programming
- •The Branch-and-Bound Algorithm
- •The Convex Hull of an IP
- •Yes/No Decisions
- •The Facility Location Problem
- •Logical Decisions
- •Set-Covering, Packing and Partitioning Problems
- •Non-linear Problems
- •The Knapsack Problem
- •The Travelling Salesman Problem
- •Other Problems
- •Computational Complexity
- •Problem Classes and Instances
- •Computer Architectures and Data Structures
- •Polynomial and Exponential Algorithms
- •Non-deterministic Algorithms and Polynomial Reducibility
- •Feasibility Versus Optimisation Problems
- •Other Complexity Concepts
- •References and Further Work
- •Exercises
- •3 Modelling in Logic for Integer Programming
- •Logic Connectives and IP Constraints
- •Disjunctive Programming
- •A Geometrical Representation
- •Mixed IP Representability
- •Alternative Representations and Tightness of Constraints
- •Disjunctive Versus Conjunctive Normal Form
- •The Dual of a Disjunctive Programme
- •Splitting Variables
- •Modelling Languages Based On Logic
- •Algebraic Languages
- •References and Further Work
- •Exercises
- •Resolution and Absorption
- •Representation as an Integer Programme
- •The Relationship Between Resolution and Cutting Planes
- •Simplest Equivalent Logical Statement
- •Constraint Logic Programming
- •Modelling in CLP
- •Solving CLP Models
- •Hybrid CLP and IP systems
- •Applications
- •Electrical Circuit Design Using Switches
- •Logical Net Design Using Gates
- •The Logical Analysis of Data (LAD)
- •Chemical-processing networks
- •Other Applications
- •References and Further Work
- •Exercises
- •References
- •Index
Chapter 2
Integer Programming
In this chapter we begin with a brief explanation of linear programming (LP) since integer programming (IP) is usually regarded as an extension of LP. Also most practical methods of solving IP models rely on solving an LP model first. However, our discussion of LP will be brief since this is not the main theme of this book. Although LP models are often solved in the course of solving IP models we will, in the main, regard a method of solving LP models in this context as a ‘black box’. However, we will give a (computationally inefficient) method of solving LP models which illustrates the use of the predicate calculus as discussed in Sect. 1.5 as well as demonstrating important properties of LP models which are relevant to IP. In Sect. 2.4 we discuss the comparative computational complexity of IP compared with LP. A list of references to the further study of LP is given in Sect. 2.5.
2.1 Linear Programming
A linear programme (LP) is a problem of maximising or minimising a linear expression subject to a number of linear constraints which take the form of linear expressions being less than or equal to ‘ ’, greater than or equal to ‘ ’ or equal to ‘=’ given numbers. For example the following is an LP model.
Example 2.1 A linear programme
Maximise |
|
2x1 + 3x2 − x3 |
(2.1) |
subject to |
|
x1 + x2 3 |
(2.2) |
−x1 + 2x3 −2 |
(2.3) |
−2x1 + x2 − x3 = 0 |
(2.4) |
H.P. Williams, Logic and Integer Programming, International Series in Operations |
25 |
Research & Management Science 130, DOI 10.1007/978-0-387-92280-5 2, |
|
C Springer Science+Business Media, LLC 2009 |
|
26 |
2 Integer Programming |
x1, x2, x3 0 |
(2.5) |
x1, x2, x3 R |
|
It is usual, but not necessary, for the variables to be restricted to be non-negative by the last set of inequalities. Sometimes LPs are expressed in standard form as maximisations subject to all ‘ ’ constraints (apart from the non-negativity constraints) or alternatively as minimisations subject to all ‘ ’ constraints. The expression to be maximised or minimised is known as the objective function. Clearly it is possible to convert a maximisation to a minimisation (and vice versa) by negating the objective function. ‘ ’ constraints can be converted to ‘ ’ constraints by negating throughout (and vice versa). ‘=’ constraints can be converted to a pair of a ‘ ’ and a ‘ ’ constraint simultaneously. We convert Example 2.1 to a standard form by the following example.
Example 2.2 Convert Example 2.1 to a standard form
This becomes
Maximise
2x1 + 3x2 − x3 |
(2.6) |
subject to |
|
x1 + x2 3 |
(2.7) |
x1 − 2x3 2 |
(2.8) |
−2x1 + x2 − x3 0 |
(2.9) |
2x1 − x2 + x3 0 |
(2.10) |
x1, x2, x3 0 |
(2.11) |
x1, x2, x3 R |
|
After converting the ‘=’ to a ‘ ’ and a ‘ ’, the ‘ ’ has been negated throughout to make it a ‘ ’.
While a standard form is useful, for explanatory purposes, in practice models are usually kept in a more general form such as in Example 2.1.
In order to make an LP model more precise we express Example 2.1 using the predicate calculus.
Example 2.3 Express Example 2.1 using the predicate calculus and solve it by the elimination of existential quantifiers
This becomes
Find the maximum value of z such that
2.1 Linear Programming |
|
|
27 |
zx1 x2 x3 (z − 2x1 − 3x2 |
+ x3 |
= 0 |
(2.12) |
· x1 |
+ x2 |
3 |
|
·x1 − 2x3 |
2 |
|
|
· − 2x1 + x2 − x3 = 0 |
|
||
· − x1 |
0 |
|
|
· − x2 |
0 |
|
|
· − x3 |
0) |
|
x1, x2, x3 R
By means of the first equation z has been set equal to the objective function (2.6). We have deliberately quantified the variable z as we wish to test if the model has a feasible solution before seeking the maximum z, if it exists, i.e. we are first of all
finding if the statement is true.
Eliminating x1 using the first equation, by the method described in Example 1.8, we obtain
zx2 x3(z − x2 + x3 |
6 |
(2.13) |
·z − 3x2 − 3x3 4 |
|
·− z + 4x2 − 2x3 = 0
·− z + 3x2 − x3 0
·− x2 0
·− x3 0)
Eliminating x2 using the remaining equation
zx3(3z + 2x3 |
24 |
(2.14) |
·z − 18x3 |
16 |
|
·− z + 2x3 0
·− z − 2x3 0
·− x3 0)
Eliminating x3 between the inequalities (and carrying out some simplification, including removing obvious redundancies) we obtain
z(z 8 |
(2.15) |
· − z 0) |
|
28 |
2 Integer Programming |
Eliminating z we obtain |
|
0 8 |
(2.16) |
which is clearly true, demonstrating that the original statement (2.12) is true (i.e. the LP is feasible). The maximum value of z satisfying (2.15) is 8. Setting z = 8 the first inequality in (2.15) is satisfied as an equation. Therefore so must be the first and last inequalities in (2.14), from which it is derived, making x3 = 0. These inequalities, in turn, are derived from the equation and first inequality in (2.13) making x2 = 2. These are derived from the two equations in (2.12) making x1 = 1.
Hence we have the optimal solution to the LP in Example 2.1
x1 = 1, x2 = 2, x3 = 0, Objective = 8 |
(2.17) |
The above method of solving LPs by successively eliminating existential quantifiers is not the most efficient algorithm. Other algorithms, in particular the Simplex algorithm, are mentioned in Sect. 2.5 and references given. It is, however, worth remarking that the above method shows LP to be a decidable theory, which was the purpose for which the decision procedure was designed. The simplex algorithm, as originally stated, does not do this as it cannot be guaranteed to terminate. It can, however, be modified to guarantee convergence. References are given in Sect. 2.5. The method described here is usually referred to as Fourier–Motzkin elimination. Although not computationally efficient it does prove to be a particularly clear method of demonstrating important properties of LPs. Further algorithmic discussion is beyond the scope of this book but is fully discussed in the many texts on LP. We do, however, discuss those aspects of LP which are relevant to our main purpose of modelling and solving integer programming (IP) models.
2.1.1 The Dual of an LP Model
In Example 2.3 we obtained the optimal objective value by successively adding or subtracting the equality constraints, in suitable multiples, from the other constraints to eliminate variables and adding the ‘ ’ inequality constraints in suitable non-negative multiples. The net effect is to express the objective function as a linear combination of the constraints in such a way as to eliminate the variables. It can be verified that this results in multipliers of 1, 83 , 0, 13 , 0, 0, 23 , respectively, on the constraints which, when added together in these multiples, produces the constraint z 8. The effect of the multipliers is to eliminate all the variables (except z) and produce an upper bound on the possible objective values. We can formalise this in terms of the original model in Example 2.1, as seeking multipliers y1, y2, y3, v1, v2, v3 on all the constraints (2.2)–(2.5) so as to
2.1 Linear Programming |
29 |
Minimise |
|
3y1 − 2y2 |
(2.18) |
subject to |
|
y1 − y2 − 2y3 − v1 = 2 |
(2.19) |
y1 + y3 − v2 = 3 |
(2.20) |
2y2 − y3 − v3 = −1 |
(2.21) |
y1 0, y2 0, v1, v2, v3 0 |
(2.22) |
y1, y2, y3, v1, v2, v3 R
Notice that y2 is constrained to be non-positive and y3 is not constrained in sign. This is because the second constraint is of the form ‘ ’ (and therefore effectively subtracted from the other constraints if not converted to the ‘ ’ form as is done in Examples 2.2 and 2.3) and the third constraint is an equation which may be added or subtracted from the other constraints. By minimising expression (2.18) we are seeking the smallest right-hand side b for expressions of the form z b which are implied by the original constraints. This smallest value of b is obviously the maximum z which can be obtained.
The variables vi (the multipliers on the non-negativity constraints (2.5) stated in the form of ‘ ’ constraints) are known as surplus variables. We can ignore them if we rewrite (2.18)–(2.22) as follows:
Minimise
3y1 − 2y2 |
(2.23) |
subject to |
|
y1 − y2 − 2y3 2 |
(2.24) |
y1 + y3 3 |
(2.25) |
2y2 − y3 −1 |
(2.26) |
y1 0, y2 0 |
(2.27) |
y1, y2, y3 R
The model given by (2.23)–(2.27) is, of course, itself an LP model. It is known as the dual model. In contrast the original model, given in Example 2.1, is known as the primal model. If the primal model were in standard form as a maximisation subject to all the constraints being ‘ ’ (apart from the non-negativity constraints on