column basis reduction and hard knapsack problems

37
Column Basis Reduction and Hard Knapsack Problems Bala Krishnamoorthy joint work with abor Pataki University of North Carolina at Chapel Hill Feb 26, 2004

Upload: others

Post on 04-Oct-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Column Basis Reduction and Hard Knapsack Problems

Column Basis Reduction and

Hard Knapsack Problems

Bala Krishnamoorthy

joint work with

Gabor Pataki

University of North Carolina at Chapel Hill

Feb 26, 2004

Page 2: Column Basis Reduction and Hard Knapsack Problems

Integer Programming (IP)

• The integer programming problem - feasibility version

Given Am×n, dm×1, rational

Find x ∈ Zn, Ax ≤ d or prove that 6 ∃x

• The integer programming problem - optimization version

max cTx (cn×1)

subject to Ax ≤ d

x ∈ Zn

• two versions equivalent

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 1

Page 3: Column Basis Reduction and Hard Knapsack Problems

Integer Programming (IP)

• wide variety of applications

– airline crew scheduling, facility location

– machine learning and statistical classification

– side-chain structure prediction (proteins)

• IP (in arbitrary dimensions) is NP-complete

• several efficient solution methods

(branch-and-bound, cutting planes)

• small problems - intractable to solvers

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 2

Page 4: Column Basis Reduction and Hard Knapsack Problems

Example - hard problem

max 12228x1 + 36679x2 + 36682x3

+ 48908x4 + 61139x5 + 73365x6

subject to 12228x1 + 36679x2 + 36682x3

+ 48908x4 + 61139x5 + 73365x6 ≤ 89716837

xi ≥ 0, xi ∈ Z ∀i

from Wolsey: Integer Programming (1999).

CPLEX takes more than 400 million B&B nodes!

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 3

Page 5: Column Basis Reduction and Hard Knapsack Problems

Basis reduction

• Given integral matrix A, basis reduction (BR) computes a

unimodular U(⇔ detU = ±1) st. the columns of AU are

“short” and “nearly” orthogonal.

Example

A =

289 18

466 29

273 17

, U =

(1 −15

−16 241

)

, AU =

1 3

2 −1

1 2

• Computing AU ⇔ doing elementary column operations on

A: - adding an integer multiple of a column to another;

multiplying a column by −1; swapping columns.

• A “good” U can be computed in polynomial time

(Lovasz; Kannan; Schnorr, . . . ).

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 4

Page 6: Column Basis Reduction and Hard Knapsack Problems

The use of BR in integer programming

• H. W. Lenstra (1983); Kannan (1987): polytime algorithms

for IP in fixed dimensions.

• Lagarias, Odlyzko (1985): Solving low-density subset sum

problems. . . .

• Aardal, Hurkens, A.K. Lenstra (1998),

Aardal, Bixby, Hurkens, A.K. Lenstra, J.W. Smeltink

(1999),

Louvaux, Wolsey (2001):

Reformulation of hard, equality-constrained IPs.

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 5

Page 7: Column Basis Reduction and Hard Knapsack Problems

Reformulating equality-constrained feasibility IPs

From A, H, L (1998); A, B, H, L, S (1999).

We need to find

x ∈ Zn, ℓ ≤ x ≤ u, Ax = d

(all data integer, Am×n, m ≤ n), or prove that 6 ∃x.

Full-dimensional Reformulation:

Ax = b, x ∈ Zn ⇔ x = Bλ + xd : for some λ ∈ Zn−m

where xd and B satisfy Axd = d, AB = 0 .

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 6

Page 8: Column Basis Reduction and Hard Knapsack Problems

Full-dimensional Reformulation

• B and xd are integral.

• columns of [B,xd] short and nearly orthogonal.

• found by doing BR on an enlarged matrix using two large

constants N1, N2.

Technique similar to the one in Lagarias/Odlyzko (1985), and

later papers on subset sum.

• The reformulated problem of finding

λ ∈ Zn−m, ℓ ≤ Bλ + xd ≤ u

proved much easier to solve for some problems

(e.g. marketshare of Cornuejols & Dawande).

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 7

Page 9: Column Basis Reduction and Hard Knapsack Problems

Analysis for a special IP (A & L)

Aardal & Lenstra (2002): If

• [A, d] = [aT , a0] (i.e. m = 1), ℓ = 0, u = +∞ and

• aT = pTM + rT with M large compared to p, r,

then

• ∃ a0 ≥ const ∗ M2, so problem is infeasible.

• In the reformulation, the length of last column of B is lower

bounded ⇒ it is intuitively good to branch on λn−1.

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 8

Page 10: Column Basis Reduction and Hard Knapsack Problems

Main questions

1. Do we have to change the dimension of the problem

(go from Zn to Zn−m) ?

2. Tighter analysis (going beyond lower bd on last vector’s

length) ?

3. Analysis and computation for more general problem classes?

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 9

Page 11: Column Basis Reduction and Hard Knapsack Problems

Rest of the talk

1. Simplified reformulation for arbitrary IPs:

range space / null space reformulations.

2. Decomposable knapsack problem with inequality/equality

constraints. Includes

• A & L’s equality constrained knapsack problem

• some of Chvatal’s hard knapsack problems:

Chvatal-Todd, Avis; (1980)

• t + 1-level problems: decomposition into t + 1 vectors,

not just 2.

3. These problems are

• Provably hard for B&B branching on xi variables.

• Provably easy both for range space, or null space

reformulations!

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 10

Page 12: Column Basis Reduction and Hard Knapsack Problems

Range Space Reformulation

P = {x | ℓ ≤ Ax ≤ b }

P = { y | ℓ ≤ (AU)y ≤ b}

where U is unimodular

There is 1-1 correspondence between

P ∩ Zn and P ∩ Zn

given byUy = x

• Choose U so columns of AU are reduced.

• can be applied when some (or all) of the “≤” are “=”.

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 11

Page 13: Column Basis Reduction and Hard Knapsack Problems

Null Space reformulation

If

A1x = b1

is a subset of the inequalities in ℓ ≤ Ax ≤ b , then

A1x = b1, x ∈ Zn ⇔ x = B1λ + xd : for some λ ∈ Zn−m1

where xd and B1 satisfy A1xd = b1, A1B1 = 0 .

• [B1, xd] found by a Hermite Normal Form (HNF)

computation;

columns are not in general short and orthogonal.

• Substitute B1λ + xd for x, and do the range space

reformulation.

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 12

Page 14: Column Basis Reduction and Hard Knapsack Problems

2-level decomposable knapsack problems

Knapsack feasibility problem:

(KP2) lb ≤ aT x ≤ ub, 0 ≤ x ≤ u, x ∈ Zn,

where

• a = pM + r, with p, r ∈ Zn; M large compared to p, r;

• lb, ub appropriately chosen, so KP2 is LP-feasible,

but integer infeasible.

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 13

Page 15: Column Basis Reduction and Hard Knapsack Problems

A family of hard, infeasible knapsack problems

For some integer k, the feasible set of the LP relaxation is

sandwiched between

pTx = k and pTx = k + 1.

x1

x2

p x = kT

p x = k+1T

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 14

Page 16: Column Basis Reduction and Hard Knapsack Problems

A family of hard, infeasible knapsack problems

• Hardness for B&B using xjs for branching: if

– pTu even, k = pTu/2, and p1u1 = · · · = pnun, ⇒ no

nodes are pruned above level n/2.

– u = +∞, lb = ub appropriate ⇒

# of B&B nodes is ≥ const ∗ Mn−1.

• Branching on pTx proves infeasibility in one step!

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 15

Page 17: Column Basis Reduction and Hard Knapsack Problems

Basis reduction in range space

Recall general reformulation:

P = {x | ℓ ≤ Ax ≤ b } ⇔ P = {y | ℓ ≤ (AU)y ≤ b}

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 16

Page 18: Column Basis Reduction and Hard Knapsack Problems

Basis reduction in range space

We use the reformulation with

A =

(aT

I

)

=

(pTM + rT

I

)

,

U is unimodular st. AU =

((pTU)M + rTU

U

)

is reduced.

Theorem: M suff. large ⇒

pTU = (n−1

︷ ︸︸ ︷0 . . . 0 α ) for some α ∈ Z \ { 0 }.

Corollary:

U y = x ⇒ pTUy = pT x ⇒ αyn = pT x

⇒ branching on yn in reformulation proves infeasibility

in 1 step!

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 17

Page 19: Column Basis Reduction and Hard Knapsack Problems

Basis reduction in null space

(KP2) lb ≤ aT x ≤ ub, 0 ≤ x ≤ u, x ∈ Zn

Can be used if lb = ub ⇒ reformulation has n− 1 variables.

We can similarly prove

Theorem: M large ⇒ αyn−1 = pT x + const.

Corollary: ⇒ branching on yn−1 proves infeasibility

in 1 step!

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 18

Page 20: Column Basis Reduction and Hard Knapsack Problems

(t + 1)-level decomposable knapsack problems

• For a = p1M1 + p2M2 + · · · + ptMt + pt+1, with

M1 >> M2 >> · · · >> Mt and appropriate ub, lb

(KPt+1) lb ≤ aT x ≤ ub, 0 ≤ x ≤ u, x ∈ Zn

Problem is

• hard, if branching on xj variables.

• easy, if branching on pT1 x , pT

2 x , . . . , pTt x . But:

if we stop before pTt x ⇒ remaining problem is still hard!

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 19

Page 21: Column Basis Reduction and Hard Knapsack Problems

Range Space Reformulation

We use the range space reformulation with

A =

(aT

I

)

, choosing U unimodular st. AU is reduced.

Theorem: M1 >> M2 >> · · · >> Mt ⇒

pT1

pT2...

pTt

U =

0 0 . . . 0 0 0 ∗

0 0 . . . 0 0 ∗ ∗...

0 0 . . . ∗ . . . ∗ ∗

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 20

Page 22: Column Basis Reduction and Hard Knapsack Problems

Range Space Reformulation

Corollary: Branching on yn, yn−1, . . . , yn−t in

reformulation

⇔ branching on pT1 x , pT

2 x , . . . , pTt x in original problem.

Analogous result for null space reformulation.

This way the problem solves after examining 2t B&B nodes.

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 21

Page 23: Column Basis Reduction and Hard Knapsack Problems

Range Space Reformulation

Remark: When computing U , we do not know that

a decomposes!!

For fixed t, the size of M1,M2, . . . ,Mt can be chosen to be

polynomial in the size of p1, . . . , pt, pt+1.

Corollary of independent interest: The Hermite Normal

Form of

pT1

pT2...

pTt

(a transformation using integral eco’s to bring it intoreduced echelon form) can be computed in poly time only

from the aggregated pi’s, i.e. p1M1 + p2M2 + · · ·+ ptMt, if

t is fixed.Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 22

Page 24: Column Basis Reduction and Hard Knapsack Problems

Example 1: Chvatal-Todd knapsack problem

δ ≤ aTx ≤ γ; 0 ≤ x ≤ e, x ∈ Zn; with

ai = 2n + 2i−1, e = (1 1 . . . 1)T

From Chvatal “Hard knapsack problems” (1980).

• Known: B&B takes a tree of depth at least ⌊n2⌋ to prove

infeasibility.

• New:

– Branching on eTx proves infeasibility in 1 step.

– After BR (either in range space or in null space)

branching on last variable proves infeasibility in 1 step.

Reason: This is just a 2–level problem with

M = 2n, r = (1 2 . . . 2n−1) and p = e.

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 23

Page 25: Column Basis Reduction and Hard Knapsack Problems

Example 2

3-level 0–1 knapsack problem (generated by us):

• n = 100 variables, M1,M2 smaller than what theory

requires ⇒ aj ≤ 8000, lb, ub ≤ 100, 000.

• Original problem takes more than 2 billion B&B nodes for

CPLEX.

• Reformulation solves at rootnode.

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 24

Page 26: Column Basis Reduction and Hard Knapsack Problems

Computational results

Goal: Solve IPs that are hard for B&B , or branch-and-cut,

have both equality and inequality constraints, and

go beyond the classes analyzed.

We solve optimization problems as:

– as a sequence of feasibility problems via binary search.

– reformulating the objective cT by doing BR on

(cT

A

)

,

where A is the constraint matrix.

BR: by LiDIA at the Univ. of Darmstadt; NTL (V. Shoup)

IP solver: CPLEX 7.1; Machine: 450 MHz Sun.

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 25

Page 27: Column Basis Reduction and Hard Knapsack Problems

Maximization versions of integer subset sum

First four: Cornuejols, Urbaniak, Weismantel, Wolsey (1998).

Last one from Wolsey: Integer Programming (1999).

ex1 : 12346x1 +14666x2 +12366x3 +13466x4 +13446x5 +14566x6 ≤ 685111ex2 : 12212x1 +12214x2 +12216x3 +24416x4 +24418x5 ≤ 27123101ex3 : 12223x1 +12224x2 +12225x3 +12226x4 +12227x5 +12228x6 ≤ 1123100ex4 : 1124x1 +1366x2 +1566x3 +2566x4 +3566x5 +5566x6 ≤ 148801wol : 12228x1 +36679x2 +36682x3 +48908x4 +61139x5 +73365x6 ≤ 89716837

xi ≥ 0 ∀i

Number of B&B nodes after column BR: 16, 0, 2, 6, 4.

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 26

Page 28: Column Basis Reduction and Hard Knapsack Problems

Strongly correlated knapsack problems

max (aT + keT )x

aTx ≤ β

xi ∈ {0, 1} i = 1, . . . , n

where

• n = 100, ai ∈ [R/10, R] random, uniform,

• k = 10, β = ⌊(jeTa)/5⌋ in instance j.

• R = 105, 106, 107.

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 27

Page 29: Column Basis Reduction and Hard Knapsack Problems

Strongly correlated knapsack problems

R = 105 R = 106 R = 107

Inst CPU #BB CPU #BB CPU #BB

1 2.3 1231 2.7 1206 2680 1541052

2 9.7 5557 140 75415 5015 766041

3 19 15053 920 569291 97 1380724

4 47 34371 590 355796 4301 654211

5 10 7510 210 122933 1150 599342

Such problems cannot be solved by special purpose

knapsack algorithms (Pisinger)

(coefficients are too large).

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 28

Page 30: Column Basis Reduction and Hard Knapsack Problems

Conclusions

• Generalization and tighter analysis of Aardal et. al

reformulation technique.

• BR reformulation can be in range space, or null space –

they seem equally effective on analyzed problems!

• Applicable to any IP (with equality/inequality constraints).

• Analysis of a general class of hard, infeasibleknapsack

problems with decomposable coefficients.

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 29

Page 31: Column Basis Reduction and Hard Knapsack Problems

Conclusions

• Large values of big-M’s: reason for both the

provable hardness (in original space using xjs) and

provable easiness (in reformulated space)!

• Choice of big-M’s is too pessimistic as opposed to real life –

both hardness and easiness holds for smaller values.

• Further work:

– how about more than 1 dense constraint?

– how does the method work on any IP?

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 30

Page 32: Column Basis Reduction and Hard Knapsack Problems

Analysis of possibly feasible problems

(KP2) lb ≤ aT x ≤ ub, 0 ≤ x ≤ u, x ∈ Zn

For some integer k, the feasible set of the LP relaxation is

sandwiched between

pTx = k − 1 and pTx = k + 1.

x1

x2

p x = k−1T p x = kT

p x = k+1T

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 31

Page 33: Column Basis Reduction and Hard Knapsack Problems

Analysis of possibly feasible problems

• For a provably large number of B&B nodes, ∃ fractional

solutions xlb and xub with aTxlb = lb, aTxub = ub .

• Branching on pTx tightens these bounds in 1 step; also

yn of the reformulation is = pTx in original problem.

• pTx may not be a “thin” direction! Possibly 0 ≤ xi ≤ 1∀i,

and

max { pTx |x is LP-feasible } − min { pTx |x is LP-feasible }

= 1.9999,

with all data integer; still

pTx is the right direction to branch on.

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 32

Page 34: Column Basis Reduction and Hard Knapsack Problems

Example: Avis-Nemhauser problem

Feasibility of δ ≤ aTx ≤ γ, 0 ≤ x ≤ e, x ∈ Zn;

with ai = n(n + 1) + i

• γ, δ can be chosen such that problem is integer-infeasible

and

• B&B takes a tree of depth at least n−12 to prove infeasibility.

• Branching on eTx kills the problem in one step

• Decomposing a = pM + r gives M = n(n + 1),

r = (1 2 . . . n) and p = e !

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 33

Page 35: Column Basis Reduction and Hard Knapsack Problems

Strongly correlated knapsack problem

– from C,U,W,W (1998)

max∑5

i=0

∑15j=1 (100ai + j − 1)x15i+j

st.∑5

i=0

∑14j=0 aix15i+j ≤ β

x1, . . . , x90 ∈ {0, 1}

with

aT = [ 2222 1135 5555 2224 3334 1224 ], β = 16999

Number of B&B nodes after column BR: 11.

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 34

Page 36: Column Basis Reduction and Hard Knapsack Problems

Basis reduction in range space

• Find n − 1 short, independent vectors in L(A)

g2 =

r1p2 − p1r2

p2

−p1

0...

0

0

, . . . , gn =

r1pn − p1rn

pn

0

0...

0

−p1

.

• short: |gi| ≤ maxi=2,...,n{ |r1pi − rip1| + |p1| + |pi| }

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 35

Page 37: Column Basis Reduction and Hard Knapsack Problems

Number of B&B nodes in original formulation

Of independent interest!

• For the equality constrained knapsack aT x = a0, x ≥ 0

• if known to be infeasible,

# B&B nodes ≥4

(n − 1)!

a(n−1)0

(a2a3 . . . an)

• with a = pM + r, and a0 = (A & L lower bound on F (a)),

# B&B nodes ≥ C1 (M + C2)n−1

C1, C2 constants indep. of M.

Bala Krishnamoorthy - Column basis reduction and hard knapsack problems 36