Overview of Computer Algebra http://cocoa.dima.unige.it/ J. Abbott - - PowerPoint PPT Presentation

overview of computer algebra
SMART_READER_LITE
LIVE PREVIEW

Overview of Computer Algebra http://cocoa.dima.unige.it/ J. Abbott - - PowerPoint PPT Presentation

Overview of Computer Algebra http://cocoa.dima.unige.it/ J. Abbott Universitt Kassel J. Abbott Computer Algebra Basics Manchester, July 2018 1 / 12 Intro Characteristics of Computer Algebra or Symbolic Computation exact arithmetic


slide-1
SLIDE 1

Overview of Computer Algebra

http://cocoa.dima.unige.it/

  • J. Abbott

Universität Kassel

  • J. Abbott

Computer Algebra Basics Manchester, July 2018 1 / 12

slide-2
SLIDE 2

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

slide-3
SLIDE 3

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 3 + · · · + 1 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

slide-4
SLIDE 4

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

slide-5
SLIDE 5

Polynomials: univariate

Univariate polynomials ← → polynomials in 1 indeterminate Q[x] = the ring of polynomials in x with coefficients in Q. Examples: x, 3x3 − 10x + 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

slide-6
SLIDE 6

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, 3x3y − 10xz2 + 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 = x0y0z0 is smallest element compatible with multiplication: t1 < t2 = ⇒ t′t1 < t′t2 Infinitely many term-orderings; CoCoA default is DegRevLex

  • J. Abbott

Computer Algebra Basics Manchester, July 2018 6 / 12

slide-7
SLIDE 7

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 f1(x, y, z) = 0 f2(x, y, z) = 0 · · · fk(x, y, z) = 0 Poly system is zero-dim if the zero set is finitely many points. Example: many equivalent polynomial systems: {f1, f2, f3, . . .} {f1 − 3f2 − 8f3, f2, f3, . . .} {f1(f2 + 1), f2, f3 . . .}

  • J. Abbott

Computer Algebra Basics Manchester, July 2018 7 / 12

slide-8
SLIDE 8

Polynomial systems

Mathematical concept ideal “ = ” all equivalent polynomial systems. Definition of ideal generated by f1, f2, . . . , fk ∈ R: f1, f2, . . . , fk =

  • gjfj : gj ∈ R
  • An ideal is infinite, but noetherianity ensures there are finite bases.

Example xy − 1, x2 + y2 − 1 = x + y3 − y, y4 − y2 + 1 Example: polynomial systems {x2, y} and {x, y} are not equiv but have same zero set. Ideals x2, 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

slide-9
SLIDE 9

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

slide-10
SLIDE 10

Algebraic Extensions

An algebraic number is a root of a polynomial in Q[x]. Example: 3, 4

7,

√ 2 and α such that α3 − 3α + 4 = 0. Represent √ 2 as a “new symbol” satisfying ( √ 2)2 − 2 = 0. Define algebraic extension Q( √ 2) — a field! Typical element is a + b √ 2 with a, b ∈ Q. Example of division: 1 3 − 4 √ 2 = −3 − 4 √ 2 23 result is exact, and valid for both values of √ 2; also multiple algebraic extensions e.g. √ 2 and

3

√ 3 together no need for approximation √ 2 ≈ 1.414213562373

  • J. Abbott

Computer Algebra Basics Manchester, July 2018 10 / 12

slide-11
SLIDE 11

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

slide-12
SLIDE 12

The End

The End

  • J. Abbott

Computer Algebra Basics Manchester, July 2018 12 / 12