Download presentation
Presentation is loading. Please wait.
Published byAntti Ketonen Modified over 6 years ago
1
September 4, 1997 Applied Symbolic Computation (CS 300) Dixon’s Algorithm for Solving Rational Linear Systems Jeremy R. Johnson
2
September 4, 1997 Introduction Objective: To derive and analyze the computing time of Dixon’s algorithm for solving integer linear systems over the rationals. Review complexity of solving linear systems and computing Determinants Hadamard Bound Dixon’s Algorithm mod p inverse P-adic lifting Rational Reconstruction Determinant Algorithm
3
Determinant Bound 𝑨= 𝒂 𝟏𝟏 ⋯ 𝒂 𝟏𝒏 ⋮ ⋱ ⋮ 𝒂 𝒏𝟏 ⋯ 𝒂 𝒏𝒏
𝑨= 𝒂 𝟏𝟏 ⋯ 𝒂 𝟏𝒏 ⋮ ⋱ ⋮ 𝒂 𝒏𝟏 ⋯ 𝒂 𝒏𝒏 Det 𝑨 ≤n! 𝒅 𝒏 ≤ 𝒏𝒅 𝒏 , where 𝒅=𝐦𝐚𝐱 | 𝒂 𝒊𝒋 | Det 𝑨 ≤ 𝒊=𝟏 𝒏 𝑨 𝒊 ≤ 𝒏 𝒏 𝟐 𝒅 𝒏 [Hadamard’s Inequality] Bound on length of integer determinant 𝐋 𝐃𝐞𝐭 𝑨 =𝑶 𝒏L(𝒏𝒅) , 𝑨∈ ℤ 𝒏×𝒏
4
Complexity of Gaussian Elimination
September 4, 1997 Complexity of Gaussian Elimination Number of operations performed in the i-th iteration 2(n-i)2 + (n-i) Perform (n-i) row operations Each row operation involves 1 division and (n-i) multiplications and subtractions Therefore the total number of operations is 𝑖=1 𝑛−1 2 𝑛−𝑖 2 = 2 3 𝑛 3 − 1 2 𝑛 2 − 1 6 𝑛=Θ( 𝑛 3 ) This bound does not take into account coefficient growth (bit complexity)
5
Complexity of Rational GE
Cost of Rational Aritmetic 𝑨= 𝒂 𝟏 𝒂 𝟐 ,𝑩= 𝒃 𝟏 𝒃 𝟐 , 𝑳 𝑨 =𝑳 𝒂 𝟏 +𝐋( 𝒂 𝟐 ), 𝑳 𝑩 =𝑳 𝒃 𝟏 +𝐋 𝒃 𝟐 𝑨+𝑩= 𝒂 𝟏 𝒃 𝟐 + 𝒂 𝟐 𝒃 𝟏 𝒂 𝟐 𝒃 𝟐 , 𝑨𝑩= 𝒂 𝟏 𝒃 𝟏 𝒂 𝟐 𝒃 𝟐 Cost 𝑳 𝑨 𝑳 𝑩 Cost of GE n3 operations Size of fractions in LU bounded by nL(nd) Bound on rational operations n2L(nd)2 Total time O(n5L(nd)2)
6
Modular Algorithm 𝝋 𝒑 𝑫𝒆𝒕 𝑨 = 𝑫𝒆𝒕(𝝋 𝒑 (𝑨)), 𝒘𝒉𝒆𝒓𝒆 𝝋 𝒑 (𝒙)=𝒙 𝒎𝒐𝒅 𝒑
𝝋 𝒑 𝑫𝒆𝒕 𝑨 = 𝑫𝒆𝒕(𝝋 𝒑 (𝑨)), 𝒘𝒉𝒆𝒓𝒆 𝝋 𝒑 (𝒙)=𝒙 𝒎𝒐𝒅 𝒑 for i from 1 to t do Compute 𝑫𝒆𝒕(𝝋 𝒑 𝒊 (𝑨)) using GE Use CRT to compute 𝑫≡𝑫𝒆𝒕 𝑨 𝒎𝒐𝒅 𝒑 𝒊 ,𝒊=𝟏,…,𝒕 Need 𝒕=𝚯 𝒏𝑳 𝒏𝒅 Time for modular determinant O(n3) Time for CRT O 𝒏𝑳 𝒏𝒅 𝟐 Total time O 𝒏𝟐𝑳 𝒏𝒅 𝟐+𝒏𝟒𝑳(𝒏𝒅)
7
Cramer’s Rule Assume A is an nxn non-singular matrix
Unique solution to Ax=b Let Ai(b) be the matrix whos ith column is replaced by b xi=Det(Ai(b))/Det(A) Time to solve when A has integer coefficients O 𝒏(𝒏𝟐𝑳 𝒏𝒅 𝟐+𝒏𝟒𝑳 𝒏𝒅 ) =O 𝒏𝟑𝑳 𝒏𝒅 𝟐+𝒏𝟓𝑳 𝒏𝒅 )
8
Dixon’s Algorithm Solve 𝑨𝒙=𝒃, 𝑨∈ ℤ 𝒏×𝒏 , 𝒃∈ ℤ 𝒏 , 𝒙 ∈ℚ 𝒏 , 𝒅= 𝑨 ∞
[mod p inverse] 𝑪= 𝑨 −𝟏 𝒎𝒐𝒅 𝒑 , 𝒑∤𝒅𝒆𝒕(𝑨) [p-adic lifting] Compute 𝒙 𝒊 =𝑪 𝒃 𝒊 𝒎𝒐𝒅 𝒑 , 𝒊=𝟏,…,𝒎 𝒃 𝟎 =𝒃, 𝒃 𝒊+𝟏 = 𝒃 𝒊 −𝑨 𝒙 𝒊 𝒑 , 𝒊=𝟏,…,𝒎 [division is exact ] 𝒙 = 𝒊=𝟎 𝒎−𝟏 𝒙 𝒊 𝒑 𝒊 [𝑨 𝒙 ≡𝒃 (𝒎𝒐𝒅 𝒑 𝒎 )] Rational Reconstruction Find 𝒙 𝒌 ≡ 𝒂 𝒌 𝒃 𝒌 𝒎𝒐𝒅 𝒑 𝒎 , 𝒂 𝒊 , 𝒃 𝒊 < 𝒏𝒅 𝒏
9
P-adic Lifting Compute 𝒙 𝒊 =𝑪 𝒃 𝒊 𝒎𝒐𝒅 𝒑 , 𝒊=𝟏,…,𝒎
𝒃 𝟎 =𝒃, 𝒃 𝒊+𝟏 = 𝒃 𝒊 −𝑨 𝒙 𝒊 𝒑 , 𝒊=𝟏,…,𝒎 [division is exact ] 𝒙 = 𝒊=𝟎 𝒎−𝟏 𝒙 𝒊 𝒑 𝒊 [𝑨 𝒙 ≡𝒃 (𝒎𝒐𝒅 𝒑 𝒎 )] 𝒃 𝒊 −𝑨 𝒙 𝒊 ≡ 𝒃 𝒊 −𝑨 𝑪𝒃 𝒊 ≡ 𝒃 𝒊 − 𝒃 𝒊 ≡𝟎(𝒎𝒐𝒅 𝒑) 𝑨 𝒙 = 𝒊=𝟎 𝒎−𝟏 𝒑 𝒊 𝑨𝒙 𝒊 = 𝒊=𝟎 𝒎−𝟏 𝒑 𝒊 ( 𝒃 𝒊 −𝒑𝒃 𝒊+𝟏 )= 𝒃 𝟎 −𝒑 𝒃 𝟏 +𝒑 𝒃 𝟏 − 𝒑 𝟐 𝒃 𝟐 +⋯+ 𝒑 𝒎−𝟏 𝒃 𝒎−𝟏 − 𝒑 𝒎 𝒃 𝒎 = 𝒃− 𝒑 𝒎 𝒃 𝒎 ≡𝒃 (𝐦𝐨𝐝 𝒑 𝒎 ) Complexity = O(mn2log(nd))
10
Rational Reconstruction
Compute 𝒂 𝒃 ≡𝒄 𝒎𝒐𝒅 𝒎 , 𝒂 , 𝒃 ≤ 𝒎 𝟐 u := (1,0,m) v := (0,1,c) while 𝒎 𝟐 ≤ 𝒗 𝟑 q := 𝒖 𝟑 𝒗 𝟑 ; r := u-qv; u := v; v := r; if 𝒗 𝟐 ≥ 𝒎 𝟐 then error() else return 𝒗 𝟑 , 𝒗 𝟐 𝒗 𝟏 𝒎+ 𝒗 𝟐 𝒄= 𝒗 𝟑 ⟶ 𝒗 𝟐 𝒄≡ 𝒗 𝟑 (𝒎𝒐𝒅 𝒎) Complexity O(log(m)2)
11
Complexity of Dixon’s Algorithm
Solve 𝑨𝒙=𝒃, 𝑨∈ ℤ 𝒏×𝒏 , 𝒃∈ ℤ 𝒏 , 𝒙 ∈ℚ 𝒏 , 𝒅= 𝑨 ∞ 𝒑 𝒎 𝟐 ≥ 𝒏𝒅 𝒏 ⟶𝒎=𝚯(𝒏𝒍𝒐𝒈 𝒏𝒅 ) [mod p inverse] 𝚯( 𝒏 𝟑 ) [p-adic lifting] 𝚯 𝒎𝒏 𝟐 𝒍𝒐𝒈 𝒏𝒅 =𝚯( 𝒏 𝟑 𝒍𝒐𝒈(𝒏𝒅) 𝟐 ) Rational Reconstruction 𝚯 𝒏𝒎 𝟐 =𝚯( 𝒏 𝟑 𝒍𝒐𝒈(𝒏𝒅) 𝟐 ) Total time 𝚯( 𝒏 𝟑 𝒍𝒐𝒈(𝒏𝒅) 𝟐 )
12
Determinants via Dixon’s Algorithm
Solve 𝑨𝒙=𝒃, 𝑨∈ ℤ 𝒏×𝒏 , 𝒃∈ ℤ 𝒏 , 𝒙 ∈ℚ 𝒏 , 𝒅= 𝑨 ∞ By Cramer’s rule, 𝒙 𝒊 =𝑫𝒆𝒕( 𝑨 𝒊 𝒃 )/𝑫𝒆𝒕 𝑨 Denominator of 𝒙 𝒊 divides Det(A) With high probability Det(A) = lcm(xi) [need to investigate] Total time 𝚯( 𝒏 𝟑 𝒍𝒐𝒈(𝒏𝒅) 𝟐 ) ?
13
Summary Solving Integer Linear Systems
Gaussian Elimination time O(n5L(nd)2) Cramer’s Rule O 𝒏𝟑𝑳 𝒏𝒅 𝟐+𝒏𝟓𝑳 𝒏𝒅 ) Dixon’s Algorithm O( 𝒏 𝟑 𝒍𝒐𝒈(𝒏𝒅) 𝟐 ) Computing Determinants of Integer Matrices Gaussian Elimination O(n5L(nd)2) Modular Algorithm O 𝒏𝟐𝑳 𝒏𝒅 𝟐+𝒏𝟒𝑳(𝒏𝒅) Dixon’s Algorithm O( 𝒏 𝟑 𝒍𝒐𝒈(𝒏𝒅) 𝟐 ) Bounds can be improved using Block methods and fast matrix multiplication
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.