Integer Programmng P.H.S. Torr Lecture 5 Integer Programmng
Outlne Mathematcal programmng paradgm Lnear Programmng Integer Programmng Integer Programmng Eample Unmodularty LP -> IP Theorem Concluson Specal Lnear Programmng wth Integer Solutons Assgnment Prolem Network Flow Prolem Revew Conclusons 2
Mathematcal Programmng Paradgm A mathematcal program s an optmzaton prolem of the form: Mamze (or Mnmze f( suject to: g( = 0 h( 0 Mathematcal Programmng paradgm where = [,...n] s a suset of R n, the functons g and h are called constrants, and f s called the ojectve functon. 3
Lnear Programmng (LP The goal of Lnear programmng s to: (MaMnmze: Suject to: C T A 0 Where C T s a coeffcent vector for f, A s a constrant matr, and s a constrant vector. The constrant set: { A } s a conve polyhedron, and f s lnear so t s conve. Therefore, LP has convety, and the local mn/ma s the gloal mn/ma 4
Integer Programmng (IP The goal of Integer programmng s to: (MaMnmze: Suject to: C T A nteger Typcally, = 0, (0, Integer Programmng 5
IP Eample (Matchng Prolem Gven a graph G, fnd mamal set of edges n G, such that no two edges are adjacent to the same verte. Mamum matchng: matchng of mamum cardnalty. Weghted matchng: matchng wth 2 e e 2 3 e 3 ma w( e 6
7 IP Eample (Matchng Prolem otherwse matchng n ncluded s f 0 e 3 2 ma 0 to s 3 2 3 2,. 3 2 e e 2 e 3
IP Eample (Matchng Prolem In matr form: ma c T A s. to 0, Where = [, ]T, A = ncdence matr of G e.g. A e e e 2 3 2 3 0 0 0 8
9 IP Eample (Matchng Prolem ma + 2 + 3 0 0 0 s.to 3 2 One soluton to ths IP prolem:, 2, 3 = 0, =, 2 = 0, 3 = 0 Other possle solutons: = 0, 2 =, 3 = 0, or = 0, 2 = 0, 3 =
Queston Can the soluton to ths IP prolem e otaned y droppng the ntegralty constrant: = 0, And solvng the LP prolem nstead? In our eample, soluton to the IP s not otanale from LP. Reason: matr A does not have certan property (total unmodularty needed to guarantee nteger solutons. 0
Queston If = 0, s relaed, such that 0, then the soluton to the assocated LP prolem s non nteger: 2 3 Reason: the A matr 2 0 0 0 Is not totally unmodular: A = - 2
Unmodularty: LP -> IP Gven a constrant set n standard form where A, are nteger A 0 Partton A = [B/N ]; = [ B, N ] B s nonsngular m m ass, N s non-asc 2
Unmodularty: LP -> IP Basc soluton s N B 0 B In partcular, when B = I and B - = I then X B = a soluton can e otaned y nspecton (as n the ntal step of Smple method. 3
Unmodularty: LP -> IP Snce B = B wth N = 0, nteger A suffcent condton for a asc soluton B to e nteger s that B e an nteger matr 4
Unmodularty A square matr B s called unmodular f D = det B = An nteger matr A s totally unmodular f every square, nonsngular sumatr of A s unmodular. Equvalently: A s totally unmodular f every sudetermnant of A s 0, +, or. 5
Unmodularty Recall that for B nonsngular: B B det B Where B +, adjont matr = [ j cofactor of element a j n det A ] T B + and det B are nteger f B s nteger 6
B Unmodularty B ( ( ( 22 2 2 2 3 33 33 23 23 3 2 22 32 32 32 3 22 3 23 33 ( ( 2 ( 33 33 23 23 3 2 3 3 3 ( ( 2 ( 32 32 22 22 Cofactor of a j : Determnant otaned y omttng the th row and the j th column of A and then multplyng y (- + j. 2 2 3 3 2 T 7
Unmodularty For B unmodular, B nteger: If A s totally unmodular, every ass matr B s unmodular and every asc soluton Is nteger. ( B, y N = ( B, 0 In partcular, the optmal soluton s nteger 8
Theorem : If A s totally unmodular then every asc soluton of A = s nteger. For LP s wth equalty constrants total unmodularty s suffcent ut not necessary. For LP wth nequalty constrants, A, total unmodularty of A s oth necessary and suffcent for all etreme ponts of s = { : A, 0 } to e nteger for every nteger vector. 9
Concluson: Any IP wth totally unmodular constrant matr can e solved as an LP. Totally unmodular matr : a j = 0, +, - Also, every determnant of A must e 0, + or - COULD ALSO HAVE USED CRAMMERS RULE. 20
Specal Lnear Programs wth Integer Solutons Network flow prolems: ma flow mn cost flow assgnment prolem shortest path transportaton prolem are LP wth the property that they possess optmal solutons n ntegers. 2
Some Totally Unmodular Lnear Programs Assgnment prolem (specal case of mn cost capactated flow prolems [ m jos m men ] j 0 f man s otherwse assgned to jo j c j = cost of assgnng man to jo j 22
Some Totally Unmodular Lnear Programs Ma c j s. to. j j m m j j j j 0,,, j m ( m ( man per jo jo per man 23
24 X X X 2 X 3 X 2 X 22 X 23 X 3 X 32 X 33 Some Totally Unmodular Lnear Programs
25 c T ma In matr notaton: A = where 0 0 0 0 A m 2m m 2... Eactly m s n each row Eactly 2 s n each column Some Totally Unmodular Lnear Programs
Network Flow Prolems Gven: a set of orgns V ; each orgn V ; supples a of commodty. a set of destnatons V 2 ; each destnaton j V 2 ; has a demand of commodty. cost per unt commodty; c j assocated wth sendng commodty through (, j. 26
27 j j 2 Γ j j Γ j j c 0 Γ V V 0 Γ V a ( ( for for ( ( for (, ( (, ( Constrant Set: (Totally unmodular Network Flow Prolems
Network Flow Prolems Specal case: for sngle source, sngle destnaton, ma flow prolem f 0 j j (, j Γ ( ( j, Γ ( f for source node for nternal nodes for destnato n node n any case: A 28
Revew No matter whch prolem t s: the general format s A It can e shown that mn cost flow ma flow mn cut If A s totally unmodular then [A/I ] s also totally unmodular The transpose of totally unmodular matr s also totally unmodular. A A' I where A = ncdence matr of the correspondng dgraph, totally unmodular. I = dentty matr, A s totally unmodular. 29
Revew No effcent algorthms est for general Integer Programmng prolems Eplot a specal structure of the prolem (total unmodularty, etc. to otan nteger solutons y solvng smpler prolems. Transform the prolem to another prolem for whch an appromate soluton s easer to fnd. Once the structure of the prolem s well understood, use heurstc, ut stay away from rute force approach. 30
Conclusons A large numer of prolems can e cast n analytcal form: Graph Theory Mathematcal Optmzaton For some prolems effcent algorthms est. For others need to resort to heurstc, suoptmal solutons. Some known successful heurstc approaches Smulated annealng LP roundng 3