Solving Polynomial Equations for Minimal Problems in

Download Report

Transcript Solving Polynomial Equations for Minimal Problems in

Methods for Solving Systems of Polynomial
Equations
Zuzana Kúkelová
Center for Machine Perception
Department of Cybernetics, Faculty of Electrical Engineering
Czech Technical University in Prague
Motivation
2/13
 Many problems in computer vision can be formulated using systems
of polynomial equations
 5 point relative pose problem, 6 point focal length problem
 Problem of correcting radial distortion from point correspondences
 systems are not trivial => special algorithms have to be designed to
achieve numerical robustness and computational efficiency
Zuzana Kúkelová [email protected]
Polynomial equation in one unknown
- Companion matrix
 Finding the roots of the polynomial in one unknown, is equivalent to
determining the eigenvalues of so-called companion matrix
 The companion matrix of the monic polynomial in one unknown x
p  x   x n  cn 1 x n 1  ...  c1 x  c0
is a n  n matrix defined as
0
1

C  p   0

 ...
0

0
0
1
...
0
...
...
...
...
...
0
0
0
...
1
c0 
c1 
c2 

... 
cn 
 The characteristic polynomial of C(p) is equal to p
 The eigenvalues of some matrix A are precisely the roots of its
characteristic polynomial p A  x 
Zuzana Kúkelová [email protected]
3/13
System of linear polynomial equations
- Gauss elimination
 System of n linear equations in n unknowns can be written as
a11 x1  a12 x2  ...  a1n xn  b1
a21 x1  a22 x2  ...  a2 n xn  b2
...
an1 x1  an 2 x2  ...  ann xn  bn
 We can represent this system in a matrix form
 a11
a
 21
 ...

 an1
Zuzana Kúkelová [email protected]
a12
a22
...
an 2
... a1n  x1   b1 
... a2 n  x2   b2 
    
... ...  ...   ... 
   
... ann  xn   bn 
4/13
System of linear polynomial equations
- Gauss elimination
 We can rewrite this
A.x  0
x 
b1   1   0 
x2


 0
b2 
 ...    
...     ... 
  xn   
bn     0 
1
 Perform Gauss-elimination on the matrix A => reduces the matrix A
to a triangular form  1     c1  x1 
 0 1    c  x   0 
2  2 
0

 ... ... ... ... ... ...  ...      xn  cn

   ... 
 0 0 ... 1  cn 1  xn   0 
 0 0 ... 0 1 c   1   

n 

 a11 a12
a
 21 a22
 ... ...

 an1 an 2
... a1n
... a2 n
... ...
... ann
 Back-substitution to find the solution of the linear system
Zuzana Kúkelová [email protected]
5/13
System of m polynomial equations in n
unknowns (non-linear)
 A system of equations f1  ...  f m  0 which are given by a set of m
polynomials f1 ,..., f m 
 x1 ,..., xn  in n variables with coefficients from
 Our goal is to solve this system
 Many different methods
 Groebner basis methods
 Resultant methods
Zuzana Kúkelová [email protected]
6/13
System of m polynomial equations in n
unknowns – An ideal
 An ideal generated by polynomials f1 ,..., f m 
of polynomials g 
 x1 ,..., xn  of the form:
m
g   fi pi , pi 
i 1




7/13
 x1 ,..., xn  is the set
 x1 ,..., xn 
Contains all polynomials we can generate from F
All polynomials in the ideal are zero on solutions of F
Contains an infinite number of polynomials
F  f1 ,..., f m - generators of I
f1
p1 f1
q1 f1  q2 f 2
p1 f1  p2 f 2  p3 f 3
f3
Zuzana Kúkelová [email protected]
f2
I
Groebner basis method w.r.t. lexicographic
ordering
8/13
 An ideal can be generated by many different sets of generators
which all share the same solutions
I
I
f1
f2
q1 f1  q2 f 2
p1 f1  p2 f 2  p3 f 3
p1 f1
....
f3
g2
g1

p1 g1  p2 g 2  p3 g3  p4 g 4
....
g4
g3
 Groebner basis G   g1 ,..., gl  w.r.t. the lexicographic ordering which
generates the ideal I = special set of generators which is easy to
solve - one of the generators g i is a polynomial in one variable only
Zuzana Kúkelová [email protected]
Groebner basis method w.r.t. lexicographic
ordering
 A system of initial equations f1  ...  f m  0 - initial generators of I
 This system of equations can be written in a matrix form
MX  0
 M is the coefficient matrix
f1  x1 ,..., xn    
f 2  x1 ,..., xn    

f 3  x1 ,..., xn    

...

f m  x1 ,..., xn    
   
   

     M

   
    

 X is the vector of all monomials X  x 1 x  2 ...x  N 
 i 
 i   i   i 
 i 
 x  x1 1 .x2 2 .x3 3 ...xn n - is a monomial
Zuzana Kúkelová [email protected]

T
9/13
Groebner basis method w.r.t. lexicographic
ordering
 Compute a Groebner basis G   g1 ,..., gl  w.r.t. lexicographic
ordering
 Buchberger’s algorithm ~ Gauss elimination
g1  x1 ,..., xn    
g 2  x2 ,..., xn    0

 ...
...

gl 1  xn1 , xn   0
gl  xn    0





 ... 
 ... ...    ... 
... ... ... ... ... ... ... ...
... 0 0  ...  ... 
... ... ... 0
0
 ... 



... 


 
 Generator gl  xn  - polynomial in one variable only
 Finding the roots of this polynomial using the companion matrix
 Back-substitution to find solutions of the whole system
Zuzana Kúkelová [email protected]
10/13
An Analogy
11/13
Gauss elimination
Solving system of linear
equations
System of equations
in triangular form
One polynomial equation
in one unknown
Buchberger’s algorithm
Solving system of
polynomial equations
Zuzana Kúkelová [email protected]
Back-substitution
Solutions
Companion matrix +
Back-substitution
Groebner basis
w.r.t lexicographic ordering
- One polynomial equation
in one unknown
Solutions
System of m polynomial equations in n
unknowns – An action matrix
12/13
 For most problems - “Groebner basis method w.r.t. the lexicographic
ordering” is not feasible (double exponential computational
complexity in general)
 Therefore for some problems
 A Groebner basis G under another ordering, e.g. the graded reverse
lexicographic ordering is constructed
 The properties of the quotient ring A   x1,..., xn  / I can be used
 The “action” matrix M f of the linear operator T f : A  A of the
multiplication by a polynomial f is constructed
 The solutions to the set of equations - read off directly from the
eigenvalues and eigenvectors of this matrix
Polynomial division
Polynomial
Equations
Gröbner
Basis
Buchberger’s algorithm
Zuzana Kúkelová [email protected]
Action
Matrix
Solutions
Eigenvectors
An Analogy
13/13
Compute Companion
Matrix
Solving one Polynomial
Equation in one Unknown
Finding the Eigenvalues
of the Companion Matrix
Compute Action Matrix in Quotient Ring A
(Polynomials modulo the Groebner basis)
Solving System of
Polynomial Equations
Zuzana Kúkelová [email protected]
Finding the Eigenvalues
of the Action Matrix
Solutions
Requires a Groebner Basis
for Input Equations
Solutions