Basic Algorithms for Periodic-Linear Inequalities and Integer Polyhedra Alain Keterlin / Camus IMPACT 2018: January, 23, 2018
Motivation Periodic-Linear Inequalities The Omicron Test Decomposition
Motivation / Polyhedra and Integers 1 24 Omega’s nightmare LS( N ) 3 ≤ 11 x + 13 y ≤ 21 2 ≤ 3 y − x ≤ 5 − 8 ≤ 7 x − 9 y ≤ 6 1 − N ≤ 2 y − x ≤ 1
Motivation / Polyhedra and Integers 1 24 Omega’s nightmare LS( N ) 3 ≤ 11 x + 13 y ≤ 21 2 ≤ 3 y − x ≤ 5 − 8 ≤ 7 x − 9 y ≤ 6 1 − N ≤ 2 y − x ≤ 1 ◮ holes ◮ empty (no integer points) ◮ “fuzzy” vertices ◮ non-empty rational ◮ periodic y -span projections
Motivation / Incomplete Variable Elimination 2 24 Omega’s nightmare − 11 x + 3 ≤ 13 y ≤ − 11 x + 21 7 x − 6 ≤ 9 y ≤ 7 x + 8 O Fourier-Motzkin variable elimination (of y ) 9 · ( − 11 x + 3 ) ≤ 13 · ( 7 x + 8 ) ⇒ − 77 ≤ 190 x ≤ 267 13 · ( 7 x − 6 ) 9 · ( − 11 x + 21 ) ≤
Motivation / Incomplete Variable Elimination 2 24 Omega’s nightmare − 11 x + 3 ≤ 13 y ≤ − 11 x + 21 7 x − 6 ≤ 9 y ≤ 7 x + 8 O Fourier-Motzkin variable elimination (of y ) 9 · ( − 11 x + 3 ) ≤ 13 · ( 7 x + 8 ) ⇒ − 77 ≤ 190 x ≤ 267 13 · ( 7 x − 6 ) 9 · ( − 11 x + 21 ) ≤ What went wrong? Loose bounds... ◮ A tight bound would be: 9 y ≤ 7 x + 8 − ( 7 x + 8 ) mod 9 ◮ Combinations accumulate and amplify the “slack” � ���������������������������������������������������������� �� ���������������������������������������������������������� � − 77 + [ 9 ( 12 − ( 2 − 11 x ) mod 13 ) + 13 (( 7 x + 8 ) mod 9 ) ] ≤ 190 x up to 2 · 9 · 13 − 9 − 13 = 212
Motivation / Imprecise Bound Comparisons 3 24 LS( N ) ? x + 2 ≤ 3 y ≤ x + 5 x + 1 − N ≤ 2 y ≤ x + 1 for 1 <= x <= 3N+7 for max ( ⌈ x + 2 3 ⌉ , ⌈ x + 1 − N ⌉ ) <= y <= min ( ⌊ x + 5 3 ⌋ , ⌊ x + 1 2 ⌋ ) 2 exec S(x,y)
Motivation / Imprecise Bound Comparisons 3 24 LS( N ) ? x + 2 ≤ 3 y ≤ x + 5 x + 1 − N ≤ 2 y ≤ x + 1 Which (upper) bound is effective where? 3 y = x + 5 4 1 + x = y 2 1 3 5 7 9 11 13
Motivation / Imprecise Bound Comparisons 3 24 LS( N ) ? x + 2 ≤ 3 y ≤ x + 5 x + 1 − N ≤ 2 y ≤ x + 1 Which (upper) bound is effective where? 4 1 + x = y 2 1 3 5 7 9 11 13
Motivation / Imprecise Bound Comparisons 3 24 LS( N ) ? x + 2 ≤ 3 y ≤ x + 5 x + 1 − N ≤ 2 y ≤ x + 1 Which (upper) bound is effective where? 3 y = x + 5 4 1 3 5 7 9 11 13
Motivation / Imprecise Bound Comparisons 3 24 LS( N ) ? x + 2 ≤ 3 y ≤ x + 5 x + 1 − N ≤ 2 y ≤ x + 1 Which (upper) bound is effective where? 3 y = x + 5 4 1 + x = y 2 1 3 5 7 9 11 13 < < < < > > > > = = = = = =
Motivation / Imprecise Bound Comparisons 3 24 LS( N ) ? x + 2 ≤ 3 y ≤ x + 5 x + 1 − N ≤ 2 y ≤ x + 1 Which (upper) bound is effective where? 3 y = x + 5 4 1 + x = y 2 1 3 5 7 9 11 13 3 · ( x + 1 − ( x + 1 ) mod 2 ) ≤≥ 2 · ( x + 5 − ( x + 5 ) mod 3 )
Motivation / What Problem are we Trying to Solve? 4 24 1. Tightening bounds ◮ find a workable modulo representation ◮ define precise combinations 2. The Omicron Test ◮ Fourier-Motzkin-like decision procedure ◮ correct and complete 3. Polyhedron Decomposition ◮ via affine unswitching ◮ applications: transformation, projection, optimization Strategy ◮ Be Radically Integral ◮ no ⌊ ⌋ or ⌈ ⌉ , no inexact division ◮ no loose bound! ◮ Focus on Representation, not on Algorithms ◮ find a set of elementary operations ◮ algorithms should simply repeat while possible
Motivation Periodic-Linear Inequalities The Omicron Test Decomposition
Periodic-Linear Inequalities / Periodic Numbers 5 24 A periodic number is a collection of numbers indexed by the congruence class of an expression: if x ≡ 0 mod π v 0 v 1 if x ≡ 1 mod π � � π v 0 , v 1 , . . . , v π − 1 x = . . . if x ≡ ( π − 1 ) mod π v π − 1 Essentially a notation, with useful operations: � v 0 , v 1 , . . . � π x + 1 = � v 1 , . . . , v 0 � π Rotation x i � � π / gcd ( π , c ) � v 0 , . . . � π Division . . . , v ( ci mod π ) , . . . cx = x i � � β � v 0 , . . . � α . . . , � v 0 , . . . � α Distribution w i , . . . = β � w 0 ,..., w β − 1 � x x � α i � � v 0 , . . . , v α − 1 � α . . . , � v 0 , . . . , v α − 1 � α Separation i + y , . . . x + y = x
Periodic-Linear Inequalities / Modulos 6 24 Modulos: for any expression X X mod π = � 0 , 1 , . . . , π − 1 � π X The maximal multiple of π less than or equal to X X − X mod π = X − � 0 , 1 , . . . , π − 1 � π X Tightened linear bounds have: ◮ a sharp linear part 8 + x 7 ◮ a periodic correction = y 9 9 y ≤ 7 x + 8 − ( 7 x + 8 ) mod 9 ≤ 7 x + 8 − � 0 , . . . , 8 � 9 7 x + 8 ≤ 7 x + 8 − � 8 , 6 , 4 , 2 , 0 , 7 , 5 , 3 , 1 � 9 x Works for any number of variables: � 3 �� � 1 � � 1 � � 1 � v 0 , v 1 , v 2 � 3 � v 2 , v 1 , v 0 � 3 � v 1 , v 0 , v 2 � 3 � v 0 , v 2 , v 1 � 3 y , y , 2 x + 6 y + 5 z − 1 = x x x y z
Periodic-Linear Inequalities / Normal Forms 7 24 Periodic-linear expressions (PLEs) in normal form over [ x 1 , . . . , x n ] : � n a i x i � � � π n � � π n − 1 � · · · �· · · � π 1 · · · , x 1 · · · x n − 1 , · · · + � � x n i = 1 or in simplified normal form � π n � a n − 1 x n − 1 + �· · ·� π n − 1 a n x n + · · · , x n − 1 , · · · x n If X and Y are PLEs, n an integer, then: ( X mod π ) , X [ Y / x k ] are all PLEs nX , ( X + Y ) , Periodic-linear inequalities are PLEs compared to zero: a n x n + � X 0 , . . . � π n x n ≥ 0 with X 0 , . . . PLEs over [ x 1 , . . . , x n − 1 ]
Periodic-Linear Inequalities / Linearity and Periodicity 8 24 LS( N ) over [ N , x , y ] with tightened inequalities: x + � 3 , 2 , 4 � x ≤ 3 y ≤ x + � 3 , 5 , 4 � x � � x − N + � 2 , 1 � N , � 1 , 2 � N x ≤ 2 y ≤ x + � 0 , 1 � x and over [ N , x ] afer combination �� 2 , 1 � N , � 0 , 1 � N � x − N ≤ 0 0 ≤ � 3 , 0 , 3 � x � 6 � � 0 , 3 � N , � 7 , 4 � N , � 2 , 5 � N , � 6 , 1 , 8 , 3 , 4 , 5 � x ≤ x x ≤ 3 N + � 3 , 0 � N , � 4 , 7 � N , � 5 , 2 � N x Categories: � 1 � ◮ linear : 3 y ≤ x + � 3 , 5 , 4 � x y � � ◮ periodic : � 2 , 1 � N , � 0 , 1 � N x − N ≤ 0 x � � ◮ mixed : 6 , 1 , 8 , 3 , 4 , 5 x ≤ x
Periodic-Linear Inequalities / Tightening 9 24 Given a (potentially loose) periodic-linear inequality over [ . . . , x n ] : a n x n ≤ � X 0 , . . . � π n � X 0 , . . . � π n or x n ≤ a n x n x n the following inequality is an equivalent tight bound i � � π n � � a n π n a n x n ≤ . . . , X i − 0 , 1 , . . . , a n π n − 1 X i − ia n , . . . x n → the rhs is a multiple of a n for all phases of x n modulo π n (and all phases of the other variables)
Periodic-Linear Inequalities / Periodicity and Disjunction 10 24 Mixed tight bounds are “fuzzy” x + � 3 , 2 , 4 � x ≤ 3 y 2 y ≤ x + � 0 , 1 � x ⇒ � 6 , 1 , 8 , 3 , 4 , 5 � x ≤ x 1 3 4 5 6 8 Disjoin turns a mixed bound into a disjunction of linear bounds: it computes a major bound plus outliers � 6 , 1 , 8 , 3 , 4 , 5 � x ≤ x ⇒ ( x = 1 ) ∨ ( 3 ≤ x ) � 6 � � 0 , 3 � N , � 7 , 4 � N , � 2 , 5 � N , x ≤ 3 N + ⇒ ( x ≤ 3 N + 5 ) ∨ ( x = 3 N + 7 ) � 3 , 0 � N , � 4 , 7 � N , � 5 , 2 � N x Omega’s nightmare (lef corner) − 11 x + � . . . � 13 9 y ≤ 7 x + � . . . � 9 x ≤ 13 y x � 117 , 73 , 29 , − 15 , . . . , − 29 , 44 � 117 ≤ 190 x x � 117 , 1 , 2 , 3 , . . . , 115 , 116 � 117 ⇒ ≤ x x O 1 117 1 ≤ x ⇒
Motivation Periodic-Linear Inequalities The Omicron Test Decomposition
The Omicron Test / Correct and Complete Decision 11 24 Fourier-Motzkin elimination on Q relies on an equivalence: f l ( x 1 , . . . , x n − 1 ) ≤ ax n bx n ≤ f u ( x 1 , . . . , x n − 1 ) Z , Q � Q � b · f l ( x 1 , . . . , x n − 1 ) ≤ a · f u ( x 1 , . . . , x n − 1 ) Restoring completeness on Z by tightening ( 4 ≤ 3 x ) ( 3 x ≤ 5 ) loose bounds L ≤ ax bx ≤ U L ′ ≤ ax bx ≤ U ′ ( 3 x ≤ 3 ) tight bounds ( 6 ≤ 3 x ) bL ′ ≤ aU ′ ( 6 ≤ 3 ) combination → keep bounds tight at all times
Recommend
More recommend