 •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 BranchandBound Algorithm
 •The Convex Hull of an IP
 •Yes/No Decisions
 •The Facility Location Problem
 •Logical Decisions
 •SetCovering, Packing and Partitioning Problems
 •Nonlinear 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
 •Nondeterministic 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)
 •Chemicalprocessing networks
 •Other Applications
 •References and Further Work
 •Exercises
 •References
 •Index
Chapter 1
An Introduction to Logic
1.1 The Purpose of Logic: Philosophical: Computational
Traditionally logic has been concerned with the form of statements as opposed to their content. The aim is to produce a system in which it is possible to deduce true statements from other ‘true’ statements independently of what one is talking about, i.e. independently of the interpretation of the statements. The usual approach is to start with a set of axioms and rules of deduction and produce statements which are true if the axioms are true. Such statements are said to be analytically true, as opposed to statements which are regarded as true on the basis of experimental evidence in, e.g. sciences such as physics, biology, psychology, etc. A major philosophical aim in the late 19th and early 20th centuries was to use logic to put mathematics on a rigorous footing. It was then hoped that mathematical statements could be regarded as having an absolute truth in this sense. The pattern which it was hoped to follow was that done by Euclid for geometry which was very successful. Russell and Whitehead devoted an enormous amount of time to trying to axiomatise mathematics. They regarded mathematics as simply an extension of logic. Unfortunately their efforts were largely in vain as a result of two discoveries, mainly due to Godel¨.
First it was shown that it was impossible to prove the consistency of the axiom system without using methods which went beyond the mathematical system itself. A meta system was needed which was richer than the original system. If a system is not consistent then, in any worthwhile form of logic, one can prove any statement (and its negation) rendering the system vacuous.
Second it was shown that, however, many axioms one had there would always be ‘true’ statements which could not be proved (unless one added new axioms in which case further ‘true’ statements could be found).
The confusion between ‘truth’ and provability was responsible for the difﬁculties in formalising mathematics. The former is a less welldeﬁned concept than the latter. As a result of the failure of Russell and Whitehead’s agenda, attention turned to less ambitious aims of only putting ‘parts’ (fragments) of mathematics on a rigorous footing (e.g. restricted forms of set theory). Some of these fragments have proved useful in a computational setting (e.g. arithmetic without multiplication and the Theory of dense linear order). The purpose of this book is to use logic for
H.P. Williams, Logic and Integer Programming, International Series in Operations 
1 
Research & Management Science 130, DOI 10.1007/9780387922805 1,C Springer Science+Business Media, LLC 2009
2 
1 An Introduction to Logic 
modelling and computational purposes. The methods of logic can be used to solve less ambitious problems than the formalisation of all mathematics. The problems which we use it for, in this book, arise mainly in operational research and computer science. They are often (but not always) optimisation problems.
However, the efﬁciency of the computational methods used depends ﬁrst on how the models are built and second the methods used, some of which rely on logic. We will mainly be concerned with discrete optimisation, i.e. where some quantities are restricted to taking discrete values, as opposed to a continuum of (say) the real or rational numbers. It is not always obvious, with any one problem, to what extent one uses logic or to what extent one uses more traditional methods. There is great advantage, however, in being able to move between the two and recognise the relationships between them. In this sense discrete optimisation (usually known as integer programming) and logic are symbiotic.
1.2 Logical Inference and Consistency
As already stated logic is concerned with deducing statements from other statements. This is the process known as inference. We formalise this in Sects. 1.3 and 1.4 where we represent statements symbolically and show how to manipulate them. Sometimes this is referred to as symbolic logic.
For example 

I s it valid to make the f ollowing in f erence ? 
(1.1) 
Glasgow is in Scotland and England and Scotland are part of Britain 

Manchester is in England or Scotland 
(1.2) 
Therefore 

Manchester and Glasgow are both in Britain 
(1.3) 
Note that (1.1) is a question which depends on the structure of the sentences and rules of deduction to be used, i.e. it is not a question which needs a knowledge of geography to answer. Also it is a question about the system of statements we are working with, not a statement within the system we are dealing with (which (1.2) and (1.3) both are). It is said to be a statement within the meta system as opposed to the system. The meta system is the language for talking about the system. Attempts to encompass a meta system within the language of the system is what led to a lot of the paradoxes (e.g. Russell’s paradox) in mathematics. In order to distinguish meta statements from statements we will use the symbol ‘ ’ to represent inference. By saying A = B we are meaning that from the statement (or set of statements) A we can infer the statement B. The set of premises in (1.2) can be represented by A and the conclusion (1.3) represented by B. Consistency is concerned with whether a system can ever produce a contradiction, i.e. can we infer both a statement and its negation? Again consistency is a meta concept. It is a property of a system not