A linear algorithm for integer programming in the plane
Transcription
A linear algorithm for integer programming in the plane
A linear algorithm for integer programming in the plane Friedrich Eisenbrand joint work with Sören Laue Max Planck Institute for Computer Science Saarbrücken Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.1/30 Integer Programming in the plane Given m constraints of binary encoding length s Find integral x∗ ∈ constraints Fritz Eisenbrand, MPI für Informatik 2 with largest first component satisfying all A linear algorithm for integer programming in the plane – p.2/30 Integer Programming in the plane Given m constraints of binary encoding length s Find integral x∗ ∈ constraints 2 with largest first component satisfying all P Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.2/30 Integer Programming in the plane Given m constraints of binary encoding length s Find integral x∗ ∈ constraints 2 with largest first component satisfying all P Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.2/30 Outline History Megiddo’s Prune & Search for linear programming Integer programming for a triangle A Prune & Search algorithm with optimal running time Integer programming in any fixed dimension Open problems Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.3/30 History I: Euclidean algorithm Theorem. gcd(a, b) = min{x a + y b | x, y ∈ , x a + y b > 1} minimize condition Fritz Eisenbrand, MPI für Informatik xa+yb xa+yb > 1 x, y ∈ . A linear algorithm for integer programming in the plane – p.4/30 History I: Euclidean algorithm Theorem. gcd(a, b) = min{x a + y b | x, y ∈ , x a + y b > 1} minimize condition xa+yb xa+yb > 1 x, y ∈ . Integer Programming: Combinatorics & Number Theory Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.4/30 History: II m: Number of constraints s: largest binary encoding length of coefficient Method Complexity Kannan 1980, Scharf 1981 Lenstra 1983 Feit 1984 Zamanskij and Cherkasskij 1984 Kanamaru, Nishizeki and Asano 1994 E. and Rote 2000 E. 2003 E. & Laue polynomial O(m s + s2 ) O(m log m + m s) O(m log m + m s) O(m log m + s) O(m + (log m) s) O(m + (log m) s) O(m + s) Feasibility test + Euclidean algorithm O(m + s) any fixed dimension Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.5/30 Prune & Search: Dealing with the combinatorics Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.6/30 Megiddo’s Algorithm for LP in the plane Partition constraints into “down” and “up” constraints acements lle f t lright lmedian Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.7/30 Megiddo’s Algorithm for LP in the plane Partition constraints into “down” and “up” constraints Pair “up-constraints” arbitrarily acements lle f t lright lmedian Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.7/30 Megiddo’s Algorithm for LP in the plane Partition constraints into “down” and “up” constraints Pair “up-constraints” arbitrarily Compute median of intersections acements lle f t lright lmedian Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.7/30 Megiddo’s Algorithm for LP in the plane Partition constraints into “down” and “up” constraints Pair “up-constraints” arbitrarily Compute median of intersections acements lle f t lright lmedian Fritz Eisenbrand, MPI für Informatik Decide whether optimum is left or right A linear algorithm for integer programming in the plane – p.7/30 Megiddo’s Algorithm for LP in the plane Partition constraints into “down” and “up” constraints Pair “up-constraints” arbitrarily Compute median of intersections acements lle f t lright lmedian Fritz Eisenbrand, MPI für Informatik Decide whether optimum is left or right Prune 1/4-th of constraints A linear algorithm for integer programming in the plane – p.7/30 Megiddo’s Algorithm for LP in the plane Each round at least 1/4-th of the constraints pruned Each round costs linear time Overall cost is linear Theorem (Megiddo 1983). A linear program in the plane can be solved in linear time. Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.8/30 Basis reduction: Dealing with the numbers Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.9/30 Flatness theorem Width of P along c, wc (P): max{cT x | x ∈ P} − min{cT x | x ∈ P} / then there exists Theorem (Khinchine’s flatness theorem). If PI = 0, integral c 6= 0 such that width of P along c is 6 constant f n P Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.10/30 Flatness theorem Width of P along c, wc (P): max{cT x | x ∈ P} − min{cT x | x ∈ P} / then there exists Theorem (Khinchine’s flatness theorem). If PI = 0, integral c 6= 0 such that width of P along c is 6 constant f n P Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.10/30 Lenstra’s IP algorithm Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.11/30 Lenstra’s IP algorithm Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.11/30 Lenstra’s IP algorithm Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.11/30 Lenstra’s IP algorithm Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.11/30 Lenstra’s IP algorithm Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.11/30 Lenstra’s Algorithm Compute width of P and corresponding c If width is larger than f n , then P is feasible If width is 6 f n , then For each α ∈ ∩ [min{cT x | x ∈ P}, max{cT x | x ∈ P}] Decide feasibility of P ∩ (cT x = α). Reduction to a constant number of feasibility problems of lower dimension Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.12/30 Width of a triangle W.l.o.g. 0 is a vertex c tl Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.13/30 Width of a triangle W.l.o.g. 0 is a vertex Width along c is max{cT u, cT v, 0} − min{cT u, cT v, 0} c u tl v 0 Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.13/30 Width of a triangle W.l.o.g. 0 is a vertex Width along c is max{cT u, cT v, 0} − min{cT u, cT v, 0} T T T u 6 2 max{|c u|, |c v|} = 2 k vT ck∞ c u tl v 0 Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.13/30 Width of a triangle W.l.o.g. 0 is a vertex Width along c is max{cT u, cT v, 0} − min{cT u, cT v, 0} T T T u 6 2 max{|c u|, |c v|} = 2 k vT ck∞ T T T u > max{|c u|, |c v|} = k vT ck∞ c u tl v 0 Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.13/30 Width of a triangle W.l.o.g. 0 is a vertex Width along c is max{cT u, cT v, 0} − min{cT u, cT v, 0} T T T u 6 2 max{|c u|, |c v|} = 2 k vT ck∞ T T T u > max{|c u|, |c v|} = k vT ck∞ Width of triangle ≈ length of shortT u est vector of lattice Λ = { vT x | x ∈ 2 }. Fritz Eisenbrand, MPI für Informatik c u tl v 0 A linear algorithm for integer programming in the plane – p.13/30 Width of a triangle Σ = conv{0, v1 , v2 } triangle Let A be the matrix with rows vT1 , vT2 Width of Σ is about length of shortest vector of Λ(A). Shortest Vector computation ⇔ IP feasibility Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.14/30 Combining both techniques Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.15/30 Partitioning the Polygon x(1) g replacements Upper right kind ` Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.16/30 Partitioning the Polygon x(1) g replacements Upper right kind ` Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.16/30 Partitioning the Polygon x(1) Upper right kind g replacements ` Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.16/30 Upper right kind Consider P ∩ x(1) > ` Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.17/30 Upper right kind Consider P ∩ x(1) > ` Width of triangle is about width of P ∩ x(1) > ` Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.17/30 Upper right kind Consider P ∩ x(1) > ` Width of triangle is about width of P ∩ x(1) > ` Determine position `, for which width of triangle is f 2 + ε Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.17/30 Upper right kind Consider P ∩ x(1) > ` Width of triangle is about width of P ∩ x(1) > ` Determine position `, for which width of triangle is f 2 + ε Reduce problem to a constant number of problems on the line Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.17/30 Prune & Search Principle: Improve lle f t and lright acements lle f t lright lmedian Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.18/30 Prune & Search Principle: Improve lle f t and lright Pair constraints arbitrarily acements lle f t lright lmedian Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.18/30 Prune & Search Principle: Improve lle f t and lright Pair constraints arbitrarily Compute median of intersections acements lle f t lmedian Fritz Eisenbrand, MPI für Informatik lright A linear algorithm for integer programming in the plane – p.18/30 Prune & Search Principle: Improve lle f t and lright Pair constraints arbitrarily Compute median of intersections Compute width of triangle defined by median acements lle f t lmedian Fritz Eisenbrand, MPI für Informatik lright A linear algorithm for integer programming in the plane – p.18/30 Prune & Search Principle: Improve lle f t and lright Pair constraints arbitrarily Compute median of intersections Compute width of triangle defined by median acements Update bounds lle f t lright lmedian Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.18/30 Prune & Search Principle: Improve lle f t and lright Pair constraints arbitrarily Compute median of intersections Compute width of triangle defined by median acements Update bounds lle f t lright Prune 1/4-th of constraints lmedian Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.18/30 Analysis: Part 1 Each round 1/4-th of constraints pruned Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.19/30 Analysis: Part 1 Each round 1/4-th of constraints pruned Computing median is linear Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.19/30 Analysis: Part 1 Each round 1/4-th of constraints pruned Computing median is linear Running time without width checking: O(m) Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.19/30 Analysis: Part 1 Each round 1/4-th of constraints pruned Computing median is linear Running time without width checking: O(m) Number of checked triangles: O(log m) Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.19/30 The checked triangles acements α Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.20/30 The checked triangles α acements Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.20/30 The checked triangles α acements Query: Given α ∈ , β ∈ uT Λ = {α βvT x | x ∈ 2 } Fritz Eisenbrand, MPI für Informatik compute shortest vector of lattice A linear algorithm for integer programming in the plane – p.20/30 Batching the width checks Theorem. Shortest vector of Λ = { x/y convergent of b/a. ab 0 c x|x∈ 2 −x a+y b yc } is Query: Compute shortest vector of Λ = {α a b 0 βc , where x|x∈ 2 } Preprocessing: Compute list of convergents x(1)/y(1), . . . , x(k)/y(k) of b/a Complexity: O(s) Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.21/30 Batching the width checks Λ = {α a b 0 βc x|x∈ 2 } incoming query: Search convergent x( j)/y( j) with minimal max{| − x( j) a + y( j) b|, |β y( j) c|} Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.22/30 Batching the width checks Λ = {α a b 0 βc x|x∈ 2 } incoming query: Search convergent x( j)/y( j) with minimal max{| − x( j) a + y( j) b|, |β y( j) c|} Sequence | − x( j) a + y( j) b| is decreasing Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.22/30 Batching the width checks Λ = {α a b 0 βc x|x∈ 2 } incoming query: Search convergent x( j)/y( j) with minimal max{| − x( j) a + y( j) b|, |β y( j) c|} Sequence | − x( j) a + y( j) b| is decreasing Sequence |β y( j) c| is increasing Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.22/30 Batching the width checks Λ = {α a b 0 βc x|x∈ 2 } incoming query: Search convergent x( j)/y( j) with minimal max{| − x( j) a + y( j) b|, |β y( j) c|} Sequence | − x( j) a + y( j) b| is decreasing Sequence |β y( j) c| is increasing Binary search: One query costs O(log(s)) Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.22/30 Batching the width checks Λ = {α a b 0 βc x|x∈ 2 } incoming query: Search convergent x( j)/y( j) with minimal max{| − x( j) a + y( j) b|, |β y( j) c|} Sequence | − x( j) a + y( j) b| is decreasing Sequence |β y( j) c| is increasing Binary search: One query costs O(log(s)) Preprocessing and O(log m) queries: O(s + log m · log s) Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.22/30 Batching the width checks Λ = {α a b 0 βc x|x∈ 2 } incoming query: Search convergent x( j)/y( j) with minimal max{| − x( j) a + y( j) b|, |β y( j) c|} Sequence | − x( j) a + y( j) b| is decreasing Sequence |β y( j) c| is increasing Binary search: One query costs O(log(s)) Preprocessing and O(log m) queries: O(s + log m · log s) With prune & search O(m + s) Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.22/30 Total complexity Theorem (E. & Laue ). IP in the plane can be solved in O(m + s). Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.23/30 Integer programming in any fixed dimension Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.24/30 Sliding objective Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.25/30 Sliding objective Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.25/30 Sliding objective Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.25/30 Sliding objective Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.25/30 Sliding objective Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.25/30 Fritz Eisenbrand, MPI für Informatik Sliding objective A linear algorithm for integer programming in the plane – p.25/30 Fritz Eisenbrand, MPI für Informatik Sliding objective A linear algorithm for integer programming in the plane – p.25/30 Sliding objective Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.25/30 Two-layer simplices Σ is two-layer simplex if vertices partition into two sets V and W such that v(1) = 0 and w(1) = w0 (1) for all v ∈ V, w, w0 ∈ W. Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.26/30 Example in 3D cements µ w1 µ w2 )v1 + µw1 )v1 + µw2 0 v1 w1 Fritz Eisenbrand, MPI für Informatik w2 A linear algorithm for integer programming in the plane – p.27/30 Example in 3D cements v1 0 (1 − µ)v1 + µw1 (1 − µ)v1 + µw2 µ w1 µ w2 w1 w2 Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.27/30 Example in 3D cements v1 0 (1 − µ)v1 + µw1 (1 − µ)v1 + µw2 µ w1 Width of truncation is approximately width of simplex spanned by V and µW . µ w2 w1 w2 Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.27/30 Width and shortest vector Width of ΣV,µW is “about” the length of shortest vector in Λ(Aµ,k ), where A is matrix with rows wT1 , . . . , wTk , vT1 , . . . , vTn−k Aµ,k results from A by scaling first k rows with µ Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.28/30 Parametric shortest vector The following problem has to be solved: PARAMETRIC SHORTEST VECTOR : Given matrix A ∈ n×n and parameter U ∈ , find parameter p ∈ such that U 6 SV(Λ(A p,k )) 6 2n+1/2 ·U Theorem (E. 2003). The parametric shortest vector problem can be solved in linear time in fixed dimension. Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.29/30 Complexity of IP Using Clarkson’s algorithm for LP-type problems: Theorem (E. 2003). An integer program with m constraints, each involving coefficients of size at most s can be solved in expected time O(m + (log m)s). Open problem: Can IP be solved in time O(m + s)? Fritz Eisenbrand, MPI für Informatik A linear algorithm for integer programming in the plane – p.30/30