preliminaries and basic notions
TRANSCRIPT
![Page 1: Preliminaries and basic notions](https://reader036.vdocument.in/reader036/viewer/2022071602/613d6a36736caf36b75d0e81/html5/thumbnails/1.jpg)
Combinatorial Optimization 1
Rumen Andonov
Irisa/Symbiose and University of Rennes 1
23 octobre 2009
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 1 / 46
Outline
Preliminaries and basic notions
"Quelques grands classiques"
Applications : Maximum Cardinality Clique (MCC) Problem
Formulating logical implication
Exercises
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 2 / 46
References
Integer and Combinatorial Optimization, Georges Nemhauser andLaurence Wolsey, John Wiley & Sons, 1999
Plastria F. Formulating logical implications in combinatorial optimisation.European Journal of Operational Research 2002 ;140(2) :338 ?53.
A First Course in Combinatorial Optimization, Jon Lee, CambridgeUniversity Press, 2004
Theory of Linear and Integer Programming, Alexander Schrijver, JohnWiley & Sons, 1986
Recherche opĂ©rationelle pour ingĂ©nieurs, Dominique de Werra, ThomasLiebling, J-F. HĂȘche, Presse polytechniques et universitaires romandes,2003
Leo Libertiâs pages at Ăcole Polytechniquehttp ://www.lix.polytechnique.fr/ liberti/teaching/
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 3 / 46
Preliminaries and basic notions
Preliminaries and basic notions
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 4 / 46
![Page 2: Preliminaries and basic notions](https://reader036.vdocument.in/reader036/viewer/2022071602/613d6a36736caf36b75d0e81/html5/thumbnails/2.jpg)
Preliminaries and basic notions
On the importance of the formulation
Discrete-optimization problem : max f : S â R , where S is finite ;
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 5 / 46
Preliminaries and basic notions
On the importance of the formulation
Discrete-optimization problem : max f : S â R , where S is finite ;
Combinatorial-optimization problem : S â 2E (the set of all subset of E) forsome finite E ;
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 5 / 46
Preliminaries and basic notions
On the importance of the formulation
Discrete-optimization problem : max f : S â R , where S is finite ;
Combinatorial-optimization problem : S â 2E (the set of all subset of E) forsome finite E ;
Example 1 : E := {1,2,3} (set of edges of the following graph)
3
1
2
S :=(subsets of E that are acyclic), i.e.S = { /0,{1},{2},{3},{1,3},{2,3}} ;The characteristic vectors of sets in S are :(0,0,0),(1,0,0),(0,1,0),(0,0,1),(1,0,1),(0,1,1) ;
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 5 / 46
Preliminaries and basic notions
On the importance of the formulation (suite)
The characteristic vectors of sets in S are :(0,0,0),(1,0,0),(0,1,0),(0,0,1),(1,0,1),(0,1,1) ;We embed these points in RE and depict the convex hull PS :
(0,0,1)
(0,1,1)
(0,1,0)
(0,0,0)
(1,0,1)
(1,0,0)
D =
x1 â„ 0x2 â„ 0
1 ℠x3 ℠0x1 + x2 †1
FIG.: PS (the convex hull of the set of characteristics vectors of S) is one half ofthe unit cube. It is the solution of the above set of inequalities.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 6 / 46
![Page 3: Preliminaries and basic notions](https://reader036.vdocument.in/reader036/viewer/2022071602/613d6a36736caf36b75d0e81/html5/thumbnails/3.jpg)
Preliminaries and basic notions
On the importance of the formulation (suite)
The characteristic vectors of sets in S are :(0,0,0),(1,0,0),(0,1,0),(0,0,1),(1,0,1),(0,1,1) ;We embed these points in RE and depict the convex hull PS :
(0,0,1)
(0,1,1)
(0,1,0)
(0,0,0)
(1,0,1)
(1,0,0)
D =
x1 â„ 0x2 â„ 0
1 ℠x3 ℠0x1 + x2 †1
FIG.: PS (the convex hull of the set of characteristics vectors of S) is one half ofthe unit cube. It is the solution of the above set of inequalities.
When maximizing F(x) = 5x1 +4x2 + x3 over D we get the solutionx = (1,0,1).
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 6 / 46
Preliminaries and basic notions
On the importance of the formulation (suite)We may be not so fortunate if we model carelessly.
(1/2,1,1/2)
(0,1,1)
(0,1,0)
(0,0,0)
(1,0,1)
(1,0,0)
(0,0,1)
(1,1/2,1/2)
D1 =
1 â„ x1 â„ 01 â„ x2 â„ 01 â„ x3 â„ 01 â„ x3 â„ 0
x1 + x2 âx3 †1x1 + x2 +x3 †2
FIG.: Co(D1) = Co(D) (D1 and D have the same set of integer points), butobviously D â D1.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 7 / 46
Preliminaries and basic notions
On the importance of the formulation (suite)We may be not so fortunate if we model carelessly.
(1/2,1,1/2)
(0,1,1)
(0,1,0)
(0,0,0)
(1,0,1)
(1,0,0)
(0,0,1)
(1,1/2,1/2)
D1 =
1 â„ x1 â„ 01 â„ x2 â„ 01 â„ x3 â„ 01 â„ x3 â„ 0
x1 + x2 âx3 †1x1 + x2 +x3 †2
FIG.: Co(D1) = Co(D) (D1 and D have the same set of integer points), butobviously D â D1.
What are the disadvantages in the formulation D1 ?
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 7 / 46
Preliminaries and basic notions
On the importance of the formulation (suite)We may be not so fortunate if we model carelessly.
(1/2,1,1/2)
(0,1,1)
(0,1,0)
(0,0,0)
(1,0,1)
(1,0,0)
(0,0,1)
(1,1/2,1/2)
D1 =
1 â„ x1 â„ 01 â„ x2 â„ 01 â„ x3 â„ 01 â„ x3 â„ 0
x1 + x2 âx3 †1x1 + x2 +x3 †2
FIG.: Co(D1) = Co(D) (D1 and D have the same set of integer points), butobviously D â D1.
What are the disadvantages in the formulation D1 ?When maximizing F(x) = 5x1 +4x2 + x3 over D1 we get the solutionx = (1,1/2,1/2) (i.e. we cannot rely on LP to find the solution).
RemarkIn this course we will consider linear functions only.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 7 / 46
![Page 4: Preliminaries and basic notions](https://reader036.vdocument.in/reader036/viewer/2022071602/613d6a36736caf36b75d0e81/html5/thumbnails/4.jpg)
Preliminaries and basic notions
Homework
(I) =
x1 + x2 †1 x1 ℠0x1 + x3 †1 x2 ℠0x1 + x4 †1 x3 ℠0x2 + x3 †1 x4 ℠0x2 + x4 †1
Compare how closely the three systemsof inequalities approximate the set ofinteger-valued solutions in real space.Which is the tightest formulations ?
(II)=
2x1 +2x2+ x3 + x4 †20 †x1 †10 †x2 †10 †x3 †10 †x4 †1
(III) =
x1 â„ 0x2 â„ 0x3 â„ 0x4 â„ 0
x1 + x2 +x3 †1x1 + x2 +x4 †1
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 8 / 46
"Quelques grands classiques"
"Quelques grands classiques"
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 9 / 46
"Quelques grands classiques"
The transportation and the assignment problems
Given : m sources of some commodity each with a supply of ai units, and nterminals of demand of bj units. cij : the unit cost of sending the commodityfrom source i to terminal j . How to satisfy the demands at minimum cost ?
c(i,j)
C
A
E
D
X
Y
Z
T
Demand: Supply
min z =m
âi=1
n
âj=1
cijxij (1)
n
âj=1
xij = ai , i = 1,m (2)
m
âi=1
xij = bj , j = 1,n (3)
xij â„ 0 (4)
FIG.: The transportation problem and its LP formulation
When all ai and bj are 1, this is called the assignment problem.Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 10 / 46
"Quelques grands classiques"
Bipartite Matching
Definition
A graph G = (N,E) is bipartite if â a partition of N into V and U s.t.E(G[V ]) = E(G[U]) = /0 and so that all edges have one vertex in V and one inU. A matching of G is a set of edges meeting each vertex no more than once.
v4
u2 u3 u4u1
v1 v2 v3
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 11 / 46
![Page 5: Preliminaries and basic notions](https://reader036.vdocument.in/reader036/viewer/2022071602/613d6a36736caf36b75d0e81/html5/thumbnails/5.jpg)
"Quelques grands classiques"
Bipartite Matching
Konigâs Theorem
The number of edges in a maximum-cardinality matching in a bipartite graph isequal to the minimum number of vertices needed to cover some endpoints ofevery edge in G.
v4
u2 u3 u4u1
v1 v2 v3
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 12 / 46
"Quelques grands classiques"
Bipartite Matching
Konigâs Theorem
The number of edges in a maximum-cardinality matching in a bipartite graph isequal to the minimum number of vertices needed to cover some endpoints ofevery edge in G.
Let ÎČv denote the set of edges having exactly one endpoint at a vertex v .
max âeâE
xe (5)
âeâÎČv
xe †1,âv â V (6)
âeâÎČu
xe †1,âu â U (7)
xe â„ 0,âe â E (8)
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 12 / 46
"Quelques grands classiques"
Bipartite Matching
Konigâs Theorem
The number of edges in a maximum-cardinality matching in a bipartite graph isequal to the minimum number of vertices needed to cover some endpoints ofevery edge in G.
Let ÎČv denote the set of edges having exactly one endpoint at a vertex v .
max âeâE
xe (5)
âeâÎČv
xe †1,âv â V (6)
âeâÎČu
xe †1,âu â U (7)
xe â„ 0,âe â E (8)
Exercise : Prove the Konigâs theorem. Hint : write the dual of the aboveproblem.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 12 / 46
"Quelques grands classiques"
The shortest path problem (SPP)
Given a directed graph G = (V ,U) and weights wj â„ 0 (in blue squaredbrackets below) associated with each arc uj , find a path from s to t with theminimum total weight.
[3]
a
s
b
t
u1
u2
u3
u4
u5[1]
[2]
[2]
[1]
A =
s +1 +1 0 0 0t 0 0 0 â1 â1a â1 0 +1 +1 0b 0 â1 â1 0 +1
The node-arc incidence matrixA = [ai,j ] i = 1,2, . . . , |V |and j = 1,2, . . . , |E | is defined by ai,j =
+1 if arc ej leaves node iâ1 if arc ej enters node i0 otherwise
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 13 / 46
![Page 6: Preliminaries and basic notions](https://reader036.vdocument.in/reader036/viewer/2022071602/613d6a36736caf36b75d0e81/html5/thumbnails/6.jpg)
"Quelques grands classiques"
SPP : Modeling SPP as a LP problem
A path from s to t can be thought of as a flow Ï of unit 1 leaving s and enteringt . The LP formulation is given below, where the flow conservation at a node i(except s, t) is expressed by : aiÏ = 0 (ai is the i th row of A).
min wÏ
AÏ =+1 row sâ1 row t
0 otherwise
Ï â„ 0
A =
s +1 +1 0 0 0t 0 0 0 â1 â1a â1 0 +1 +1 0b 0 â1 â1 0 +1
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 14 / 46
"Quelques grands classiques"
Max-Flow Problem (MFP)
Let N = (s, t,V ,E ,C) be a flow network with n = |V | nodes, m = |E |arcs, and arc-capacity c(i, j). Let the flow in arc i, j be denoted by Ïi,j .Flow conservation holds for any node except s, t where
âeâÎ+(s)
Ïe = âeâÎâ(t)
Ïe = Ï0 (flow value) (9)
Find a flow Ï = [Ï1,Ï2, . . .Ïm] s.t. 0 †Ïe †ce and maximizing Ï0.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 15 / 46
"Quelques grands classiques"
Max-Flow Problem (MFP)
Let N = (s, t,V ,E ,C) be a flow network with n = |V | nodes, m = |E |arcs, and arc-capacity c(i, j). Let the flow in arc i, j be denoted by Ïi,j .Flow conservation holds for any node except s, t where
âeâÎ+(s)
Ïe = âeâÎâ(t)
Ïe = Ï0 (flow value) (9)
Find a flow Ï = [Ï1,Ï2, . . .Ïm] s.t. 0 †Ïe †ce and maximizing Ï0.
Modeling MFP as a LP problem
The node-arc incidence matrixA = [ai,j ] i = 1,2, . . . , |V |and j = 1,2, . . . , |E | is defined by ai,j =
+1 if arc ej leaves node iâ1 if arc ej enters node i0 otherwise
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 15 / 46
"Quelques grands classiques"
MFP : LP formulation
The flow conservation at a node i (except s, t) is expressed by :
aiÏ = 0 (10)
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 16 / 46
![Page 7: Preliminaries and basic notions](https://reader036.vdocument.in/reader036/viewer/2022071602/613d6a36736caf36b75d0e81/html5/thumbnails/7.jpg)
"Quelques grands classiques"
MFP : LP formulation
The flow conservation at a node i (except s, t) is expressed by :
aiÏ = 0 (10)
The LP formulation of the MFP is :
let d â Rn be defined by
di =
â1 i = s+1 i = t0 otherwise
maxÏ0 (11)
AÏ+dÏ0 = 0 (12)
Ï â€ c (13)
Ï â„ 0 (14)
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 16 / 46
"Quelques grands classiques"
Maximum Cardinality Clique (MCC) Problem
Definition
Given a graph G = (V ,E), a set of vertices such such that all possible edgesbetween them are present is called a clique, i.e. a complete graph. Find thelargest clique.
Formulation
max âjâV
xj (15)
xi + xj †1 âi, j : (i, j) /â E (16)
xi â {0,1} âi â V (17)
Homework
Find a formulation with edge-variables yij ,(i, j) â E only.Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 17 / 46
Maximum Cardinality Clique (MCC) Problem
Maximum Cardinality Clique (MCC) Problem
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 18 / 46
Maximum Cardinality Clique (MCC) Problem
Maximum Cardinality Clique Problem
Being given
Two graphs, G1 = (N1,E1) and G2 = (N2,E2), where :
Nodes in N1 (and nodes in N2) represent some objects.(ex : segments of a picture, parts of a 3D body (protein structure) ...)
Edges in E1 (and edges in E2) represent relations between this objects.(ex : closeness...)
One way to estimate the similarity between G1 and G2 is to find the maximumclique in their alignment graph.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 19 / 46
![Page 8: Preliminaries and basic notions](https://reader036.vdocument.in/reader036/viewer/2022071602/613d6a36736caf36b75d0e81/html5/thumbnails/8.jpg)
Maximum Cardinality Clique (MCC) Problem
Alignment graph of G1 and G2
Construction
Itâs a graph G = (N,E) where :
Vertices are in a grid.Column i represents node i â N1,and row k represents node k â N2.
Node i.k (in column i , row k ) â N iff :node i â N1 and node k â N2 are
compatible.
Edge <i.k ,j.l>â E iff :i < j , and k < l ,and <i ,j> â E1, and <k ,l> â E2.
(Order Preserving Matching )
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 20 / 46
Maximum Cardinality Clique (MCC) Problem
Finding a clique in G
Is finding a particular one to one alignment (or matching) between G1 and G2.
Maximum alignment between G1 and G2 <=> maximum cardinality cliquein G.
NP-Hard !
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 21 / 46
Maximum Cardinality Clique (MCC) Problem
Mixed Integer Programming (MIP) model
NotationTo each node i.k â N, we associate a binary variable Yi.k ,and to each edge <i.k ,j.l> â E , a binary variable Zi.k ,j.l .GoalFinding the maximum cardinality clique, (or equivalently) finding the clique withthe maximum number of edges.
How to model this as an Integer Programming ?
Objective function :
max â<i.k ,j.l>âE
Zi.k ,j.l , .
Variables :
Yi.k â {0,1}, âi,k â N.
Zi.k ,j.l â {0,1}, â<i.k ,j.l>â E .
And the following constraints !
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 22 / 46
Maximum Cardinality Clique (MCC) Problem
Constraints
n1 = |N1|, n2 = |N2|
(1a)n2
âk=1
Yi.k †1, âi â N1.
At most one node activated per column
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 23 / 46
![Page 9: Preliminaries and basic notions](https://reader036.vdocument.in/reader036/viewer/2022071602/613d6a36736caf36b75d0e81/html5/thumbnails/9.jpg)
Maximum Cardinality Clique (MCC) Problem
Constraints
(1b)n1
âi=1
Yi.k †1, âk â N2.
At most one node activated per row.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 24 / 46
Maximum Cardinality Clique (MCC) Problem
Constraints
(2a) Yi.k â„n2
âl=k+1
Zi.k ,j.l ,
âi,k , j, | i.k â N, j â N1, j > i .
Head node activationIf edge <i.k ,j.l> is activated, node i.kmust be activated.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 25 / 46
Maximum Cardinality Clique (MCC) Problem
Constraints
(2b) Yj.l â„lâ1
âk=1
Zi.k ,j.l ,
âi, j, l, | j.l â N, i â N1, i < j .
Tail node activationIf edge <i.k ,j.l> is activated, node j.lmust be activated.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 26 / 46
Maximum Cardinality Clique (MCC) Problem
Constraints
(3) âkâN2
Yi.k + âlâN2
Yj.l â âi.k ,j.lâE
Zi.k ,j.l †1,
â(i, j) â E1, j > i .
Edge activationIf there are nodes activated in col i andcol j , then there must be an edgeactivated between col i and j .
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 27 / 46
![Page 10: Preliminaries and basic notions](https://reader036.vdocument.in/reader036/viewer/2022071602/613d6a36736caf36b75d0e81/html5/thumbnails/10.jpg)
Maximum Cardinality Clique (MCC) Problem
Final Model
(MIP) max â<i.k ,j.l>âE
Zi.k ,j.l ,
Subject to :
(1a) âkâN2
Yi.k †1, âi â N1.
(1b) âiâN1
Yi.k †1, âk â N2.
(2a) Yi.k â„n2
âl=k+1
Zi.k ,j.l , âi,k , j, | i.k â N, j â N1, i < j .
(2b) Yj.l â„lâ1
âk=1
Zi.k ,j.l , âi, j, l, | j.l â N, i â N1, i < j .
(3) âkâN2
Yi.k + âlâN2
Yj.l â âi.k ,j.lâE
Zi.k ,j.l †1, â(i, j) â E1, j > i .
Yi.k â {0,1}, âi,k â N.
Zi.k ,j.l â {0,1}, â<i.k ,j.l>â E .Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 28 / 46
Formulating logical implication
Formulating logical implication
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 29 / 46
Formulating logical implication
Is modeling an "art" ?
When formulating the maximum cardinality clique problem we had to model thefollowing relation :If there are nodes activated in col i and col j, then there must be an edgeactivated between col i and j.Which yielded the equation :
(3) âkâN2
Yi.k + âlâN2
Yj.l â â<i.k ,j.l>âE
Zi.k ,j.l †1,â(i, j) â E1, j > i. (18)
How this equation was obtained ? Is modeling an "art" ?
Yes, unfortunately modeling cannot be reduced to a standard set of procedureand sometimes can be quite discouraging. But some "tricks of the trade" doexist which are very helpful.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 30 / 46
Formulating logical implication
Basic Logical Implication Principle (LIP)
A logical implication is a property expressed as :If A holds then B holds
Theorem 1 (LIP-Logical Implication Principle)
Let xi be a 0-1 variable for all i in some finite index set I and y any variablesatisfying 0 †y †1, then the logical implicationIf xi = 0,âi â I then y = 0is exactly expressed by the inequality
y †âiâI
xi (19)
Proof. Straightforward .
Question : How to adapt the theorem to the case : 0 †y †c where c > 1 ?
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 31 / 46
![Page 11: Preliminaries and basic notions](https://reader036.vdocument.in/reader036/viewer/2022071602/613d6a36736caf36b75d0e81/html5/thumbnails/11.jpg)
Formulating logical implication
Geometric viewFrom the propositional logic (A â B) ⥠(ÂŹBâšA). By the rules of De Morgan :⥠(ÂŹ(Aâ§ÂŹB)) (We must exclude all cases in which A holds while B does nothold.For I={1,2} : If x1 = 0 and x2 = 0 then y = 0 means to exclude{(0,0,y)|0 < y †1}.
1
Y
x1
x2
1
1
FIG.: Feasible set (three vertical closed segments and the origin (in thick black)) andcutting plane y †x1 + x2 (a facet of the feasible set.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 32 / 46
Formulating logical implication
Using complementarity
Theorem 2Let xi be a 0-1 variable for all i in some finite index set I ; let I0 and I1 be two disjointsubsets of I and let y be an integer or continuous variable satisfying 0 †y †1. Thenthe logical implicationIf xi = 0,âi â I0 and xi = 1,âi â I1 then y = 0is exactly expressed by the inequality
y †âiâI0
xi + âiâI1
(1â xi) (20)
while the similar logical implicationIf xi = 0,âi â I0 and xi = 1,âi â I1 then y = 1is exactly expressed by the inequality
1â y †âiâI0
xi + âiâI1
(1â xi) (21)
Proof. Direct application of Th. 1 to the 0-1 variables xi , i â I0 and (1â xi), i â I1 and
respectively y or 1â y .Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 33 / 46
Formulating logical implication
Using complementarity II
Instead of remembering the theorem, it is easier to apply the followingcomplementarity rule directly :
When the logical implication involves some xi = 1 and/or y = 1 instead of 0,use (LIP) replacing each such xi and/or y by its corresponding complementaryvariables 1â xi and/or 1â y .
Example : If x1 = 1 and x2 = 0 and x3 = 1 then y = 0is equivalent toIf 1â x1 = 0 and x2 = 0 and 1â x3 = 0 then y = 0which is expressed by
y †(1â x1)+ x2 +(1â x3) (22)
orx1 â x2 + x3 + y †2 (23)
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 34 / 46
Formulating logical implication
Single solution exclusion
Let a point (solution) to be cut off be given by
xi = 1, i â I1 and xi = 0, i â I0 (24)
To exclude it consider the logical implication
If all but one of the equalities in (24) hold then the remaining one (k â I0, say)must be violated.
So by LIP we have
(1â xk) †âiâI0\{k}
xi + âiâI1
(1â xi) ââ âiâI0
xi + âiâI1
(1â xi) â„ 1 (25)
i.e. âat least one among xi , i â I0 and (1â xi), i â I1 must equal 1â.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 35 / 46
![Page 12: Preliminaries and basic notions](https://reader036.vdocument.in/reader036/viewer/2022071602/613d6a36736caf36b75d0e81/html5/thumbnails/12.jpg)
Formulating logical implication
Single solution exclusion
Let a point (solution) to be cut off be given by
xi = 1, i â I1 and xi = 0, i â I0 (24)
To exclude it consider the logical implication
If all but one of the equalities in (24) hold then the remaining one (k â I0, say)must be violated.
So by LIP we have
(1â xk) †âiâI0\{k}
xi + âiâI1
(1â xi) ââ âiâI0
xi + âiâI1
(1â xi) â„ 1 (25)
i.e. âat least one among xi , i â I0 and (1â xi), i â I1 must equal 1â.The âstandardâ form : â
iâI1
xi â âiâI0
xi †|I1|â1
is much less easy to interpret correctly.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 35 / 46
Formulating logical implication
Allocation to nearest facility
Practical problems for location of several facilities often require clients to beallocated fully to the nearest open facility. For each client i and candidate site swe have to express the logical implication :
If a facility is opened at s, and no facility is open at some site closer to i thenclient i must be allocated to s.
Let xs â {0,1} answers the question âIs a facility opened at s ?â and yis â {0,1}answers the question âIs client i allocated to site s ?â. Let Cis be the set of allsites closer to client i than s. Then :
If xs = 1 and for all t â Cis : xt = 0 then yis = 1. which, by LIP is directlyexpressed as
1â yis †(1â xs)+ âtâCis
xt (26)
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 36 / 46
Formulating logical implication
Linearisation of quadratic 0-1 variables
In order to linearise, we often need to set yij = xixj where yij ,xi ,xj â {0,1}which means exactly
yij = 1 If and only if xi = 1 and xj = 1.
In other words,If yij = 1 then xi = 1If yij = 1 then xj = 1If xi = 1 and xj = 1 then yij = 1We apply LIP to these three logical implications and obtain :
1â xi †1â yij (27)
1â xj †1â yij (28)
1â yij †1â xi +1â xj (29)
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 37 / 46
Formulating logical implication
Other techniques for modelling
Write a model with objective function : minmax{e1,e2, . . . ,en} wheree1,e2, . . . ,en are linear functions.
Introduce y â R s.t. y â„ e1,y â„ e2, . . . ,y â„ en. Then miny .
Write a model with objective function : maxmin{e1,e2, . . . ,en} wheree1,e2, . . . ,en are linear functions.
Introduce y â R s.t. y †e1,y †e2, . . . ,y †en. Then maxy .
Write a model with objective function : min | e | where e is a linear functions
Note that | e |= max{e,âe}. Then use minâmax model.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 38 / 46
![Page 13: Preliminaries and basic notions](https://reader036.vdocument.in/reader036/viewer/2022071602/613d6a36736caf36b75d0e81/html5/thumbnails/13.jpg)
Formulating logical implication
Big-M constraints
Let x ℠0 be such that, if x > 0 then K †x †M.
Introduce y â {0,1} and add the constraints : x †My and x â„ Kyj .
Let 0 †xi †Mi and 0 †xj †Mj represent incompatible activities. That is :If xi > 0 then xj = 0 and (vice versa) if xj > 0 then xi = 0.
Introduce yi ,yj â {0,1} and add the constraints : xi †Myi , xj †Myj andyj + yj †1.
Exclusive OR relation : Let the function f (x1,x2, . . . ,xn) be such thatΜ †f (x1,x2, . . . ,xn) †M or (otherwise) f (x1,x2, . . . ,xn) †”
Introduce y â {0,1}. Add the constraints :
f (x1,x2, . . . ,xn) †”+My and f (x1,x2, . . . ,xn) â„ ÎœâM(1â y) (30)
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 39 / 46
Formulation of practical problems (homework)
Exercises (in French)Exercice 1 : De lâĂ©lĂ©gance en Programmation LinĂ©aireUne Ă©tudiante Ă©lĂ©gante et coquette doit se rendre par avion aux Ătats-Unis afin dâeffectuer son stage dâĂ©tĂ©.Outre ses affaires professionnelles et quelques objets indispensables, elle doit choisir un certain nombre devĂȘtement dans sa garde-robe. Du fait des rĂ©glementations aĂ©riennes, il sâavĂšre quâil ne reste plus que quatrekilos disponibles pour ses vĂȘtements.Une premiĂšre sĂ©lection dans sa garde-robe conduit lâĂ©tudiante Ă retenir, en plus de la robe quâelle a dĂ©cidĂ©de porter dans lâavion, 3 jupes, 3 pantalons, 4 hauts et 3 robes. Le poids en grammes de chaque vĂȘtementest rĂ©pertoriĂ© dans le tableau suivant.
VĂȘt. Jupe Pantalon Haut Robe1 2 3 1 2 3 1 2 3 4 1 2 3
(g) 500 400 700 600 500 500 400 300 300 400 600 700 800
TAB.: Poids des diffĂ©rents vĂȘtementLâĂ©tudiante dĂ©cide que :
elle doit porter au moins une robe,si elle porte la jupe 1 alors elle emportera Ă©galement le haut 2 qui sâassortit si bien avec cette jupe,elle ne prendra pas le haut 4 si elle emporte les hauts 1 et 2.
Lâobjectif poursuivi est de maximiser le nombre de tenues diffĂ©rentes quâelle pourra porter aux Ătats-Unis.
Une robe constitue une tenue. Les autres tenues rĂ©sultent de combinaisons dâun haut et dâune jupe ou dâun
pantalon. Cependant, les rĂšgles de lâĂ©lĂ©gance nâautorisent que certaines combinaisons indiquĂ©es par une
croix dans le tableau suivant.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 40 / 46
Formulation of practical problems (homework)
Haut1 2 3 4
1 + + +Jupe 2 + +
3 +1 + +
Pantalon 2 +3 + +
TAB.: Combinaisons autorisées
1 Exprimer les quatre contraintes du problĂšme2 Expression de la fonction objectif :
1 Formuler la fonction objectif du problĂšme en utilisant une expressionquadratique (câest-Ă -dire une somme de produits de deux variables)
2 Rendre linéaire la fonction objectif. Pour chaque produit de la sommeprécédente, on utilisera une nouvelle variable binaire et deux nouvellescontraintes.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 41 / 46
Formulation of practical problems (homework)
Exercises (in French)
Exercice 2 : Le problĂšme des N damesLe but du problĂšme des N dames est de placer N dames dâun jeu dâĂ©checs surun Ă©chiquier de NxN cases sans que les dames ne puissent se menacermutuellement, conformĂ©ment aux rĂšgles du jeu dâĂ©checs (la couleur des piĂšcesĂ©tant ignorĂ©e). Par consĂ©quent, deux dames ne devraient jamais partager lamĂȘme ligne, colonne, ou diagonale. Ce problĂšme Ă Ă©tĂ© rĂ©solu pour N = 1 Ă 25.ModĂ©liser le problĂšme sous forme dâun programme linĂ©aireExercice 3 : Le sudokuLe jeu du sudoku consiste Ă complĂ©ter une grille carrĂ©e divisĂ©e en 9 rĂ©gions de9 cases, en partie remplie avec des nombres, de façon Ă ce que dans chaqueligne, chaque colonne et chaque rĂ©gion les nombres de 1 Ă 9 apparaissent uneet une seule fois.Donner un modĂšle mathĂ©matique permettant de rĂ©soudre une grille de sudoku.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 42 / 46
![Page 14: Preliminaries and basic notions](https://reader036.vdocument.in/reader036/viewer/2022071602/613d6a36736caf36b75d0e81/html5/thumbnails/14.jpg)
Formulation of practical problems (homework)
Exercises (in French)
Exercice 4 : Produire Ă partir de lots - modĂ©lisationUne grande entreprise propose Ă un sous-traitant de fabriquer trois produits P1, P2 etP3. Elle sâengage par contrat Ă acheter tout ce quâil produira dans la limite dâau plus100 unitĂ©s de P1, 100 unitĂ©s de P2 et de 200 unitĂ©s de P3 Ă un prix unitaires unique de120 euros. Ces produits sont fabriquĂ©s Ă partir de trois composants A, B et C quientrent en proportion variable dans chacun des produits, exprimĂ©e en nombre dâunitĂ©sde composant, est donnĂ©e dans le tableau 1. Le sous-traitant ne peut acheter lescomposants que par lots. Deux types de lots sont disponibles, dont le nombre decomposants et le prix dâachat unitaire sont indiquĂ©s dans le tableau 2.
A B CP1 3 5 2P2 4 2 3P3 1 2 5
TAB 1 : Nombre de composants A, B etC par produit
A B C prix dâachatunitaire (euros)
Lot 1 3 2 3 50Lot 2 2 3 3 60
TAB 2 : Composition et prix des lots
Le sous-traitant souhaite définir un plan général lui permettant de dégager une marge
maximale.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 43 / 46
Formulation of practical problems (homework)
Exercises (in French)
Modéliser ce problÚme comme un programme linéaire
En utilisant un argument simple, montrer que le sous-traitant a intĂ©rĂȘt Ă produire tout ce qui lui est demandĂ© par lâentreprise.
En tenant compte de la remarque précédente, résoudre le programmelinéaire et indiquer la valeur optimale de la marge.
En supposant que le sous-traitant ne puisse acheter que des lots de type1 ou que des lots de type 2, comment modéliser cette nouvelle contrainte.
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 44 / 46
Formulation of practical problems (homework)
Exercises (in French)
Exercice 5 : Installation de systĂšmes contre lâincendieLa compagnie COSMAR a comme activitĂ© principale le chargement et ledĂ©chargement de porte-containers dans le porte du Havre. A cause de rĂ©centsproblĂšmes, COSMAR dĂ©sire renforcer son dispositif du lutte contre lâincendieen installant des systĂšmes SLIC dans lâentrepĂŽt oĂč sont placĂ©s les containersavant ou aprĂšs toute manutention. La compagnie a identifiĂ© 7 zones Ă protĂ©gerplus spĂ©cialement. Ces zones sont marquĂ©es par une croix dans la diagrammeci-dessous.
D GFA B C E
Coté NORD
OUEST
Coté 1
2
3
5
6
4
X
XX
XXX
X
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 45 / 46
Formulation of practical problems (homework)
Exercises (in French)
COSMAR souhaite placer les systĂšmes SLIC sur les cotĂ©s nord et ouest de lâentrepĂŽt.Un systĂšme ne peut protĂ©ger que les zones situĂ©es dans la mĂȘme rangĂ©e (ligne oucolonne) : par exemple, un SLIC installĂ© en D protĂ©gerait les zones (1,D) et (6,D).Les ingĂ©nieurs de service de lâincendie du Havre ont par ailleurs demandĂ© que lessystĂšmes SLIC ne soient pas placĂ©s dans les lignes consĂ©cutives, quâau moins unSLIC soit placĂ© en ligne 1 ou en colonne A et quâau moins 50% des SLIC soient ducotĂ© nord.Questions :
1 Ăcrire un modĂšle linĂ©aire permettant de minimiser le nombre de SLIC queCOSMAR doit acheter et installer.
2 Le prix dâun SLIC Ă©tant de 8070 euros, COSMAR souhaite en acquĂ©rir au plus 3.Pour les zones qui ne seront pas protĂ©gĂ©es par un SLIC, COSMAR souscriraune assurance complĂ©mentaire sâĂ©levant Ă 2000 euros par zone pour les lignes1, 2, 3 et Ă 3000 euros pour les autres lignes. Comment modifier le modĂšleprĂ©cĂ©dent afin que COSMAR minimise le coĂ»t total ?
3 Connaissez vous un logiciel capable de résoudre ce modÚle ?
Rumen Andonov (Irisa) Combinatorial Optimization 1 23 octobre 2009 46 / 46