Overview of Computer Algebra http://cocoa.dima.unige.it/ J. Abbott Universität Kassel J. Abbott Computer Algebra Basics Manchester, July 2018 1 / 12
Intro Characteristics of Computer Algebra or Symbolic Computation exact arithmetic (integers, rationals, algebraic numbers) polynomials (non-linear expressions with symbols) , rational functions, matrices, ideals, . . . √ algebraic extensions ( e.g. exact repr. of 2) inequalities, differential equations — CoCoA cannot do this. Contrast with so-called Numerical Computing: faster but results are only approximate. good hardware support relatively easy to parallelize uniform data size J. Abbott Computer Algebra Basics Manchester, July 2018 2 / 12
Exact Arithmetic Pros and cons of exact arithmetic: (integer, rational, alg. extn) Pro: answer is correct Con: computation can be slow Example: let S = 1 + 1 2 + 1 1 3 + · · · + 264 . Compare S to 384211 / 62422 − → floating-point is insufficient. Example: let M be a 100 × 100 matrix with random integer entries (from − 99 to + 99). Let V be a vector with random integer entries. Solve M · X = V . Takes about 2 sec. − → each entry in X has denominator with about 250 digits! J. Abbott Computer Algebra Basics Manchester, July 2018 3 / 12
Exact Arithmetic Linear Systems exact solution (also overdetermined or underdetermined) kernel basis, Hilbert basis (of non-neg kernel) det, rank, inverse, eigenvectors (and eigenfactors) No problems with ill-conditioning ; not as fast as floating-point; answer may be cumbersome. J. Abbott Computer Algebra Basics Manchester, July 2018 4 / 12
Polynomials: univariate Univariate polynomials ← → polynomials in 1 indeterminate Q [ x ] = the ring of polynomials in x with coefficients in Q . Examples: x , 3 x 3 − 10 x + 1 ∈ Q [ x ] creation, basic arithmetic GCD factorization square-free factors ( cf. radical) irreducible factors coprime factor base (or GCD-free-basis) count real roots isolate and approximate real roots CoCoA cannot do: polynomial decomposition, isolate/approximate complex roots. J. Abbott Computer Algebra Basics Manchester, July 2018 5 / 12
Polynomials: multivariate Multivariate polynomials ← → polynomials in many indeterminates Q [ x , y , z ] = the ring of polys in x , y , z with coeffs in Q . Examples: x , 3 x 3 y − 10 xz 2 + y + 1 ∈ Q [ x , y , z ] Same operations (except for “real roots”). Different ways to write one polynomial: x + y and y + x . Important extra ingredient, term-ordering: total ordering on power-products 1 = x 0 y 0 z 0 is smallest element compatible with multiplication: t 1 < t 2 = ⇒ t ′ t 1 < t ′ t 2 Infinitely many term-orderings; CoCoA default is DegRevLex J. Abbott Computer Algebra Basics Manchester, July 2018 6 / 12
Polynomial systems Polynomial system: non-empty set of polynomials which must simultaneously vanish. Usually interested in the zero set: i.e. all x , y , z values such that f 1 ( x , y , z ) = 0 f 2 ( x , y , z ) = 0 · · · f k ( x , y , z ) = 0 Poly system is zero-dim if the zero set is finitely many points. Example: many equivalent polynomial systems: { f 1 , f 2 , f 3 , . . . } { f 1 − 3 f 2 − 8 f 3 , f 2 , f 3 , . . . } { f 1 ( f 2 + 1 ) , f 2 , f 3 . . . } J. Abbott Computer Algebra Basics Manchester, July 2018 7 / 12
Polynomial systems Mathematical concept ideal “ = ” all equivalent polynomial systems. Definition of ideal generated by f 1 , f 2 , . . . , f k ∈ R : �� � � f 1 , f 2 , . . . , f k � = g j f j : g j ∈ R An ideal is infinite, but noetherianity ensures there are finite bases. Example � xy − 1 , x 2 + y 2 − 1 � � x + y 3 − y , y 4 − y 2 + 1 � = Example: polynomial systems { x 2 , y } and { x , y } are not equiv but have same zero set. Ideals � x 2 , y � and � x , y � are different! Radical ideals correspond 1 ↔ 1 to (complex) zero sets. J. Abbott Computer Algebra Basics Manchester, July 2018 8 / 12
Polynomial systems Gröbner basis: computationally useful ideal basis: depends on term-ordering explicit indication if system is unsolvable (over C ) membership testing, solving, elimination, etc. radical membership (usu. faster than computing the radical) can be big and costly Zero-dimensional ideals: useful special case relatively fast (once G-basis has been computed) can compute exact/approximate solutions J. Abbott Computer Algebra Basics Manchester, July 2018 9 / 12
Algebraic Extensions An algebraic number is a root of a polynomial in Q [ x ] . √ α such that α 3 − 3 α + 4 = 0. Example: 3 , 4 7 , 2 and √ √ 2 ) 2 − 2 = 0. Represent 2 as a “new symbol” satisfying ( √ Define algebraic extension Q ( 2 ) — a field! √ Typical element is a + b 2 with a , b ∈ Q . Example of division: √ 1 − 3 − 4 2 √ = 23 3 − 4 2 √ result is exact, and valid for both values of 2; √ √ 3 also multiple algebraic extensions e.g. 2 and 3 together √ no need for approximation 2 ≈ 1 . 414213562373 J. Abbott Computer Algebra Basics Manchester, July 2018 10 / 12
Heuristics CoCoA offers some features for “heuristic programming”: Time-out mechanism Time-out useful for Gröbner basis computation: computation might be quick, and if so, result is useful. useful for “convergent algorithms” ( e.g. eval poly over interval) VerificationLevel some algorithms get “probably right answer” quickly, but checking is expensive. Examples: IsProbPrime , determinant, solving linear system. “Twin-float” arithmetic compromise between floating-point and rational arithmetic J. Abbott Computer Algebra Basics Manchester, July 2018 11 / 12
The End The End J. Abbott Computer Algebra Basics Manchester, July 2018 12 / 12
Recommend
More recommend