1 151 computer algebra basic information working
play

. 1 / 151 Computer Algebra Basic Information Working defjnition - PowerPoint PPT Presentation

. 1 / 151 Computer Algebra Basic Information Working defjnition of Computer Algebra: Algorithms, techniques and tools to assist with mathematical work (not just numerical). Syllabus lecture log for details). 2. Basic Structures and


  1. Fields Rings with extra properties: 2. multiplication is commutative, 3. every non-zero element has an inverse. Here 22 / 151 1. there is a multiplicative identity that is difgerent from 0, xy = 0 ⇒ x = 0 or y = 0 . Proof: Suppose xy = 0 but x ̸ = 0. Then x − 1 exists. Thus 0 = x − 1 0 = x − 1 ( xy ) = ( x − 1 x ) y = 1 y = y

  2. Similar thing happens any fjnite fjeld . Can also happen in infjnite fjelds. Examples of fjelds: Suggested Exercise: 4.2. 23 / 151 ‘Strange’ things still possible: Z 2 is a fjeld but 1 + 1 = 0 . 1. Q , R , C all with usual operations. 2. Z p when p is a prime. Note: Z n is not a fjeld if n = 1 or a composite number.

  3. Intermediate Structures difgerent from 0, s.t. Note: Every fjeld is an ID (but not conversely). elements (cf prime numbers) and unique decomposition of elements like integer case. In UFD’s greatest common divisors are guaranteed to exist. 24 / 151 ▶ Integral domain: ( ID ) commutative ring with identity, xy = 0 ⇒ x = 0 or y = 0 . Consequence: If ax = ay and a ̸ = 0 then x = y . ▶ Unique factorization domain: ( UFD ) notion of irreducible

  4. 1. d is a common divisor of a , b and Note: Division is of no interest in fjelds. Conversely if d is a gcd of a , b and u is an invertible element of R then ud is also a gcd of a , b . 25 / 151 Defjnition: Let a , b ∈ R , where R is a ring. We say that a divides b , written as a | b , if and only if b = ac for some c ∈ R . Defjnition: Let a , b ∈ D , where D is an integral domain. Then ▶ d is a common divisor of a , b if d | a and d | b . ▶ d is a greatest common divisor (gcd) of a , b if 2. for all common divisors c of a , b we have c | d . Note: If a ̸ = 0 or b ̸ = 0 then necessarily d ̸ = 0. Also 0 is the only gcd of 0, 0. Fact: If d 1 , d 2 are two gcd’s of a , b then there is an invertible element u of R s.t. d 1 = ud 2 .

  5. Canonical and Normal Representations A representation is: representations. notion of 0 and subtraction.) 26 / 151 ▶ Canonical if equality of objects is same as equality of ▶ Each object has exactly one representation. ▶ Normal if 0 has only one representation. (In a system with a ▶ This means that we can test objects for equality. a = b ⇐ ⇒ a − b = 0 ⇐ ⇒ R ( a − b ) ≡ R ( 0 ) .

  6. Integers and Rationals Integers Use a large base B which 1. fjts into a word (usually leave a bit for carries), 2. is usually a power of 2 or 10 and is largest power (of 2 or 10) Representation: hold digits in a linked list or an array. 27 / 151 s.t. B 2 representable in host machine arithmetic.

  7. Karatsuba’s Algorithm No improvement. But Pays ofg for integers of suffjciently many digits. Two integers of length n in base B : Leads to time 28 / 151 (adjust appropriately for n odd). Now x = aB n / 2 + b , y = cB n / 2 + d , xy = acB n + ( bc + ad ) B n / 2 + bd . bc + ad = ( a + b )( c + d ) − ac − bd . { k 1 , if n = 1; t ( n ) = 3 t ( n / 2 ) + k 2 n , if n > 1. ( k 1 , k 2 constants). Solution: t ( n ) = Θ( n log 2 3 ) , (log 2 3 ≈ 1 . 67 ) .

  8. Fractions Defjnition: a , b integers not both 0. Greatest common divisor , Gives canonical form. Representation: any structure that can hold a pair of integers. 29 / 151 gcd( a , b ) , is largest integer d dividing both a and b . Always represent a / b as p / q with q ≥ 1 and gcd( p , q ) = 1. So can convert to an integer type if and only if q = 1.

  9. Rational arithmetic Much better: Division same. Justifjed because Required canonical form is: 30 / 151 a a / b , c / d in canonical form. bd = ac / gcd( ac , bd ) b × c d = ac bd / gcd( ac , bd ) d 1 = gcd( a , d ) , d 2 = gcd( b , c ) . ( a / d 1 )( c / d 2 ) ( b / d 2 )( d / d 1 ) . gcd( a , b ) = gcd( c , d ) = 1 = ⇒ gcd( ac , bd ) = gcd( a , d ) gcd( b , c ) .

  10. For addition/subtraction put: d Suggested Exercise: 4.5 Now: bd a b Compute r.h.s. in canonical form. 31 / 151 b ± c d = p q , p ′ = a gcd( b , d ) + c gcd( b , d ) q ′ = gcd( b , d ) p = p ′ / gcd( p ′ , q ′ ) , q = q ′ / gcd( p ′ , q ′ ) .

  11. Euclid’s Algorithm for the Integers Simple properties of gcd’s: fj 32 / 151 1. gcd( a , b ) = gcd( b , a ) . 2. gcd( a , b ) = gcd( | a | , | b | ) . 3. gcd( 0 , b ) = | b | . 4. gcd( a , b ) = gcd( a − b , b ) . Simple (ineffjcient) algorithm ( a , b ≥ 0): if a = 0 then b elif a < b then gcd( b , a ) else gcd( a − b , b )

  12. Improved version (Euclid’s Algorithm) . and where . . 33 / 151 q is quotient of a , b and r remainder . Have Assume a ≥ 0, b > 0 and put a = qb + r , 0 ≤ r < b , q ∈ Z . gcd( a , b ) = gcd( b , r ) . Algorithm: Put r 0 = a , r 1 = b : r 0 = q 1 r 1 + r 2 r 1 = q 2 r 2 + r 3 r 2 = q 3 r 3 + r 4 r s − 2 = q s − 1 r s − 1 + r s r s − 1 = q s r s + r s + 1 0 ≤ r i < r i − 1 , for 1 ≤ i ≤ s + 1 . r s + 1 = 0

  13. Extended version Rewrite last step as so Process can be continued until where u , v are integers . Can compute u , v by ‘forwards’ Euclid’s algorithm. Suggested Exercise: 4.9 34 / 151 r s = r s − 2 − q s − 1 r s − 1 . Remainder r s − 1 can be written as r s − 1 = r s − 3 − q s − 2 r s − 2 r s = − q s − 1 r s − 3 + ( 1 + q s − 1 q s − 2 ) r s − 2 . r s = ur 0 + vr 1 Conclusion: If d = gcd( a , b ) then there are integers u , v s.t. d = ua + vb . Lemma: Z n is a fjeld if and only if n is a prime.

  14. but x very useful. Polynomials 35 / 151 ▶ R a commutative ring with 1. ▶ x a brand new symbol—called an indeterminate over R . ▶ Polynomials in indeterminate x with coeffjcients from R : a 0 + a 1 x + a 2 x 2 + · · · + a n x n + · · · where a i ∈ R and all all but fjnitely many are 0 ▶ Could just as well write ( a 0 , a 1 , a 2 , . . . ) ▶ a i is coeffjcient of x i . ▶ a 0 is constant term . ▶ Set of all such polynomials denoted by R [ x ] .

  15. Convenient abbreviation: b i x i instead of Sensible convention: write ifg 36 / 151 Equality: ∞ ∑ a i x i = a 0 + a 1 x + a 2 x 2 + · · · + a n x n + · · · i = 0 ∞ ∞ ∑ ∑ a i x i = i = 0 i = 0 a 0 = b 0 , a 1 = b 1 , a 2 = b 2 , . . . 2 + 5 x 3 − 3 x 5 2 + 0 x + 0 x 2 + 5 x 3 + 0 x 4 − 3 x 5 + 0 x 6 + · · ·

  16. 37 / 151 whenever both sides defjned. Turning R [ x ] into a Ring ▶ Defjne + , ∗ on polynomials in the usual way. ▶ Makes R [ x ] into commutative ring with 1. Further defjnitions: For p ∈ R [ x ] defjne: ▶ Degree , deg( p ) ; undefjned for zero polynomial. ▶ Leading coeffjcient , lc ( p ) ; undefjned for zero polynomial. ▶ Basic facts: ( ) deg( p ± q ) ≤ max deg( p ) , deg( q ) , deg( pq ) ≤ deg( p ) + deg( q ) , deg( pq ) = deg( p ) + deg( q ) , if lc ( p ) lc ( q ) ̸ = 0 ,

  17. Polynomial Functions Given Defjne corresponding function p very difgerent objects. Consider equality of polynomials v. equality of polynomial functions. Fact: Two notions of equality coincide if R an infjnite integral domain. 38 / 151 p = a 0 + a 1 x + · · · + a n x n ˆ p : R → R , ˆ p ( α ) = a 0 + a 1 α + · · · + a n α n . Note: p , ˆ

  18. but For R fjnite two notions very difgerent: 39 / 151 R = { r 1 , r 2 , . . . , r n } , Z ( x ) = ( x − r 1 )( x − r 2 ) · · · ( x − r n ) . Suppose R is not the zero ring (so 1 ̸ = 0). Now Z ( x ) ̸ = 0 , in R [ x ] , ˆ Z ( x ) = 0 .

  19. Polynomials in Several Indeterminates New indeterminate y . Polynomials in y , coeffjcients are polynomials in x . 40 / 151 R [ x ] a ring. Get ring R [ x ][ y ] . Essentially same ring as R [ y ][ x ] . (N.B. used xy = yx .) Denote by R [ x , y ] . Elements look like ∞ ∑ r ij x i y j , i , j = 0 where r ij ∈ R . Distinguish between total degree , deg( p ) , degree in x , deg x ( p ) , and degree in y , deg y ( p ) .

  20. Power products: expressions x i 1 n 41 / 151 Can do same for indeterminates x 1 , x 2 , . . . , x n . 1 · · · x i n Degree of this is i 1 + i 2 + · · · + i n . Notion of degree for polynomials in R [ x 1 , x 2 , . . . , x n ] . Coeffjcient of a power product t in a polynomial p : coefg ( t , p ) . Convention: if X = { x 1 , x 2 , . . . , x n } write R [ X ] instead of R [ x 1 , x 2 , . . . , x n ] .

  21. Factorization and Greatest Common Divisors to express p as: Answer: Yes if you are careful about what you mean by ‘unique’. Question: Is this factorization unique? R a UFD. Then Split h , k likewise. Eventually get to 42 / 151 is non-invertible) and p has no non-invertible constant factors. Try deg( pq ) = deg( p ) + deg( q ) , for all p , q ∈ R [ x ] . Given non-zero f ∈ R [ x ] put f = ap where a is constant (either 1 or p = hk where deg( h ) < deg( p ) , deg( k ) < deg( p ) . p = p e 1 2 · · · p e s s , 1 p e 2 where each p i can’t be split up, i.e. it is irreducible . Consequence: : R a UFD ⇒ R [ x 1 , x 2 , . . . , x n ] a UFD.

  22. maximum possible degree over all common divisors of f , g . Question: Given f , g as above with h a gcd. Suppose p is a common divisor of maximum degree how does p relate to h ? Thus p is a gcd except for possibly missing a constant factor. factor of highest degree then h is a gcd of f , g . Can make it unique by insisting it is monic . 43 / 151 Fact: If R is a UFD then gcd’s exist in R [ x ] . Note: if p | q in R [ x ] then deg( p ) ≤ deg( q ) . Fact: Assume f ̸ = 0 or g ̸ = 0. Any gcd h of f , g ∈ R [ x ] has • If p is a common factor, p | h so deg( p ) ≤ deg( h ) . Answer: By choice of p we have deg( h ) ≤ deg( p ) . By above fact deg( p ) ≤ deg( h ) , i.e., deg( p ) = deg( h ) . Since h is a gcd and p a common factor, p | h . Thus h = ap and so deg( a ) = 0, i.e. a ∈ R . Fact: Let k be a fjeld and f , g ∈ k [ x ] . Suppose h is a common Standard abuse of notation: gcd( f , g ) stands for a gcd of f , g .

  23. Euclid’s Algorithm for Univariate Polynomials . . . 44 / 151 Suggested Exercise: Prove that q , r are unique. q is quotient , r is remainder . Assume coeffjcients are from a fjeld and g ̸ = 0. Can put f = qg + r , r = 0 or deg( r ) < deg( g ) . Algorithm: Put r 0 = f , r 1 = g : r 0 = q 1 r 1 + r 2 r 1 = q 2 r 2 + r 3 r 2 = q 3 r 3 + r 4 r s − 2 = q s − 1 r s − 1 + r s r s − 1 = q s r s + r s + 1 where r s + 1 = 0 and deg( r i ) < deg( r i − 1 ) , 1 ≤ i ≤ s . Must eventually have r i = 0 since deg( r 0 ) > deg( r 1 ) > . . . > deg( r i ) > . . . ≥ 0 .

  24. Rational Coeffjcients Problem: Coeffjcients blow up exponentially. 45 / 151 ▶ Working with fractions ⇒ many integer gcd computations. ▶ Can slow things down. ▶ Try to use only integer arithmetic. Fact: If f , g ∈ Z [ x ] , deg( f ) > deg( g ) then can fjnd q , r ∈ Z [ x ] s.t. lc ( g ) deg( f ) − deg( g )+ 1 f = qg + r , where r = 0 or deg( r ) < deg( g ) .

  25. Well Known Example The sequence of remainders obtained by applying the modifjed algorithm is Possible way out: Take out gcd of coeffjcients at each Above board method: Sub-resultant polynomial remainder sequences. OK but compicated. 46 / 151 f = x 8 + x 6 − 3 x 4 − 3 x 3 + 8 x 2 + 2 x − 5 , g = 3 x 6 + 5 x 4 − 4 x 2 − 9 x + 21 . − 15 x 4 + 3 x 2 − 9 , 15795 x 2 + 30375 x − 59535 , 1254542875143750 x − 1654608338437500 , 12593338795500743100931141992187500 . stage—errm . . .

  26. Extended Euclidean Algorithm for Polynomials Just like integer case get polys u , v s.t. Moreover can ensure: or or 47 / 151 uf + vg = gcd( f , g ) . u = 0 deg( u ) < deg( g ) v = 0 deg( v ) < deg( f )

  27. Rational Expressions Gives us a fjeld. Caution: Again distinguish between functions and elements of 48 / 151 ▶ k a fjeld. k ( x 1 , . . . , x n ) = { p / q | p , q ∈ k [ x 1 , . . . , x n ] & q ̸ = 0 } . ▶ Equality: p / q = p ′ / q ′ ⇔ pq ′ − p ′ q = 0 , in k [ x 1 , . . . , x n ] . ▶ Defjne + , ∗ by: ( p / q ) + ( p ′ / q ′ ) = ( pq ′ + p ′ q ) / qq ′ , ( p / q )( p ′ / q ′ ) = pp ′ / qq ′ . k ( x 1 , . . . , x n ) .

  28. Representation of Polynomials and Rational Expressions Basic types: Dense Sparse Recursive Distributed 49 / 151

  29. Recursive Representation An expression of the isomorphism Example: represented as y is main indeterminate. Generally: Use c i x i n 50 / 151 R [ x 1 , . . . , x n ] ∼ = R [ x 1 , . . . , x n − 1 ][ x n ] . Regard x n as the main indeterminate. 3 xy 2 + 2 y 2 − 4 x 2 y + y − 1 ( 3 x + 2 ) y 2 + ( − 4 x 2 + 1 ) y + ( − 1 ) y 0 , ∑ each c i a polynomial represented similarly.

  30. Distributive Representation 1 x 0 c t t t Can now write Consider power products in given indeterminates e.g. n ) is least, 1 x 3 x 7 Pick a total order on power products s.t. x 2 51 / 151 5 . 2 · · · x 0 ▶ 1 (i.e. x 0 ▶ each power product has only fjnitely many others less than it. ∑ p ( x 1 , . . . , x n ) = t ≤ ¯ where c t ∈ R for each t .

  31. Example suitable ordering: Total degree then lexicographic. 1. sort according to degree, 2. within each degree use lexicographic ordering: order indeterminates, e.g. then x i 1 n 52 / 151 x 1 > L x 2 > L · · · > L x n 1 · · · x i n n > L x j 1 1 · · · x j n if and only if there is a k such that i l = j l for 1 ≤ l < k and i k > j k .

  32. Dense Representations Example: Distributed representation Problem: Can lead to a great deal of wasted space, t Record all coeffjcients up to highest degree main indeterminate or 53 / 151 Example: Recursive representation m highest power product. ∑ c i x i ← → ( c 0 , . . . , c m ) . i = 0 ∑ c t t ← → ( c 1 , c t 1 , . . . , c ¯ t ) , t ≤ ¯ where ( . . . ) denotes a list or array. Consider x 1000 + 1 or x 4 y 7 + x + 1.

  33. Sparse Representations power product. Example: In second example x e 1 n represented by 54 / 151 ▶ Drop all zero coeffjcients. ▶ With each non-zero coeffjcient record corresponding degree or x 1000 + 1 ← → (( 1 , 1000 ) , ( 1 , 0 )) , x 4 y 7 + 2 x + 1 ← → (( 1 , ( 4 , 7 )) , ( 2 , ( 1 , 0 )) , ( 1 , ( 0 , 0 ))) . 1 · · · x e n ( e 1 , . . . , e n ) .

  34. Rational Expressions Consider: Maple does not. can lead to problems. 55 / 151 ▶ Pair of polynomials ⟨ f,g ⟩ ▶ Numerator in normal form ⇒ ⟨ f,g ⟩ in normal form. ▶ Dangerous temptation: Remove gcd( f , g ) . 1 − x n 1 − x = 1 + x + · · · + x n − 1 . Take e.g. n = 2 20 . ▶ L.h.s. needs less than 10 bytes. ▶ R.h.s. needs well over a 1,000,000 bytes! ▶ Nevertheless Axiom does remove gcd( f , g ) automatically, ▶ Maple uses sum of products representation; very compact but

  35. Intermediate Expression Swell x 2 . 1 2 n Basic algebra shows: Consider: Vandermonde determinant 1 1 1 1 1 1 x 1 x 2 . . 2 1 . . . . . 1 . . . x 2 2 x 2 . 56 / 151 . n 1 1 1 x 1 x 2 x n . 1 x 2 2 x 2 x 2 . . . . � � . . . � � � � . . . � � � � . . . � � V ( x 1 , x 2 , . . . , x n ) = . � � � � � � � � x n − 1 x n − 1 x n − 1 . . . � � ∏ ( x j − x i ) . V ( x 1 , x 2 , . . . , x n ) = 1 ≤ i < j ≤ n � � . . . � � � � . . . � � � � . . . � � x n + 1 � � Z ( x 1 , x 2 , . . . , x n + 1 ) = . . . . � � n + 1 � � � � � � � � x n − 1 x n − 1 x n − 1 . . . � � n + 1

  36. Obviously: Perfectly decent sum of products representation. 57 / 151 But expanding along fjrst row: Z ( x 1 , x 2 , . . . , x n + 1 ) = 0 . n + 1 ∑ ( − 1 ) i + 1 V ( x 1 , . . . , ˆ Z ( x 1 , x 2 , . . . , x n + 1 ) = x i , . . . , x n + 1 ) i = 1 n + 1 ∑ ∏ ( − 1 ) i + 1 = ( x k − x j ) , i = 1 1 ≤ j < k ≤ n + 1 j , k ̸ = i Expansion leads to n ! terms before any cancellation.

  37. Keeping the Data Small: Modular Methods defjne its content & primitive part by: Conclusion: Can restrict attention to primitive polynomials—gcd also primitive. 58 / 151 Gcd of Polynomials in Z [ x ] Defjnition: For f ∈ Z [ x ] , f = a m x m + a m − 1 x m − 1 + · · · + a 0 cont ( f ) = gcd( a m , a m − 1 , . . . , a 0 ) , pp ( f ) = f / cont ( f ) . Lemma: (Gauss) For any f , g ∈ Z [ x ] we have cont ( fg ) = cont ( f ) cont ( g ) and pp ( fg ) = pp ( f ) pp ( g ) . Corollary: : For f , g ∈ Z [ x ] cont (gcd( f , g )) = gcd( cont ( f ) , cont ( g )) , pp (gcd( f , g )) = gcd( pp ( f ) , pp ( g )) .

  38. 59 / 151 Defjnition: Put Suggested Exercise: Let f , g ∈ Z [ x ] and h be their gcd in Z [ x ] . Prove that h is also a gcd of f , g in Q [ x ] . Useful fact: lc (gcd( f , g )) | gcd( lc ( f ) , lc ( g )) . Equivalantly: If a ̸ | lc ( f ) or a ̸ | lc ( g ) then a ̸ | lc (gcd( f , g )) . ( f mod p ) = ( a m mod p ) x m + ( a m − 1 mod p ) x m − 1 + · · · + ( a 0 mod p ) . Abbreviate ( f mod p ) to f p . Gives us a function ϕ : Z [ x ] → Z p [ x ] f �→ f p . ϕ ( 1 ) = 1, ϕ ( f + g ) = ϕ ( f ) + ϕ ( g ) , ϕ ( fg ) = ϕ ( f ) ϕ ( g ) . ▶ Example of a ring homomorphism .

  39. 60 / 151 Thus Put A = x 8 + x 6 − 3 x 4 − 3 x 3 + 8 x 2 + 2 x − 5 , B = 3 x 6 + 5 x 4 − 4 x 2 − 9 x + 21 . A = PH , B = QH , in Z [ x ] , where H = gcd( A , B ) . Consider modulo 5; A 5 = P 5 H 5 , B 5 = Q 5 H 5 , in Z 5 [ x ] . Direct computation in Z 5 [ x ] shows: gcd( A 5 , B 5 ) = 1 . So H 5 = 1, more accurately H 5 is a constant. Now [ ] 5 ̸ | lc ( A ) & 5 ̸ | lc ( B ) ⇒ 5 ̸ | lc ( H ) ⇒ deg( H ) = deg( H 5 ) ≤ deg(gcd( A 5 , B 5 )) = 0 ⇒ deg( H ) = 0 ⇒ H is a constant . gcd( A , B ) = 1 .

  40. General Strategy Input Output mod p 1 mod p 2 ... mod p s Combine using CRA 61 / 151

  41. Problems to Address be? How do we recover them? (Use symmetric representation of remainders.) 3. Which primes should we choose? Are there any that should be avoided? 62 / 151 1. How do we combine the various results in the Z p i [ x ] into a single result in Z [ x ] ? 2. Given A , B ∈ Z [ x ] how big can the coeffjcients of gcd( A , B )

  42. Detailed Example Observations: 1. A , B primitive so H primitive. Note: Full algorithm does not do this step, only done here to keep number of coeffjcients down to 4. 63 / 151 A = 3 x 4 + 4 x 3 − 6 x 2 − 3 x + 2 , B = 9 x 5 + 21 x 4 + 6 x 3 + x 2 + x − 2 , H = gcd( A , B ) . 2. deg( H ) ≤ min(deg( A ) , deg( B )) = 4. 3. Easy computation shows A ̸ | B so deg( H ) < 4. Can put H = h 3 x 3 + h 2 x 2 + h 1 x + h 0 .

  43. Aim: Work modulo p for p a prime (maybe use several p ). Compute Sensible to ensure so that which means 64 / 151 F p = gcd( A p , B p ) using Euclid’s algorithm in Z p [ x ] . Hope: F p = H p . Not guaranteed. p ̸ | lc ( A ) or p ̸ | lc ( B ) , deg( F p ) ≥ deg( H p ) = deg( H ) . Note: Even if p ̸ | lc ( A ) or p ̸ | lc ( B ) might get deg(gcd( A p , B p )) > 3 gcd( A p , B p ) ̸ = H p .

  44. Get Conclusion: Must be something wrong with 2 as a modulus. No sign of trouble—carry on with hopeful heart. 65 / 151 First modulus p = 2: A 2 = x 4 + x , B 2 = x 5 + x 4 + x 2 + x , Euclid’s algorithm in Z 2 [ x ] gives: gcd( A 2 , B 2 ) = x 4 + x . Second modulus p = 3: No good—divides lc ( A ) and lc ( B ) . Third modulus p = 5: A 5 = 3 x 4 + 4 x 3 + 4 x 2 + 2 x + 2 , B 5 = 4 x 5 + x 4 + x 3 + x 2 + x + 3 , F 5 = gcd( A 5 , B 5 ) = x 3 + 4 x 2 + 2 x + 1 .

  45. Test fails: So 5 might be a bad choice or need more work to recover coeffjcients of H completely. (At least one of them has been ‘collapsed’ by taking it modulo 5.) 66 / 151 Test: View F 5 as an element of Z [ x ] . See if F 5 | A & F 5 | B . Fourth modulus p = 7: F 7 = gcd( A 7 , B 7 ) = x 3 + 5 x + 4 , and F 7 ̸ | A .

  46. Assumption: Both 5 and 7 are good moduli. h 2 h 0 h 0 h 1 h 1 Yields: Four pairs of simultaneous congruences: 67 / 151 h 2 h 3 h 3 ≡ 1 (mod 5 ) , ≡ 1 (mod 7 ) , ≡ 4 (mod 5 ) , ≡ 0 (mod 7 ) , ≡ 2 (mod 5 ) , ≡ 5 (mod 7 ) , ≡ 1 (mod 5 ) , ≡ 4 (mod 7 ) .

  47. Example: Find all solutions to Substitute into second congruence: i.e. So: Now 68 / 151 First congruence gives: h 0 ≡ 1 (mod 5 ) , h 0 ≡ 4 (mod 7 ) . h 0 = 1 + 5 q , for q ∈ Z . 5 q ≡ 3 (mod 7 ) . 3 · 5 − 2 · 7 = 1 ⇒ 3 · 5 ≡ 1 (mod 7 ) q ≡ 3 · 3 (mod 7 ) , ≡ 2 (mod 7 ) . For simultaneous solution take q = 2 + 7 q ′ in 1 + 5 q to get for q ′ ∈ Z h 0 = 11 + 35 q ′ , h 0 ≡ 11 (mod 35 ) .

  48. Solve other pairs of congruences to get: as candidate for H 35 . Note: Never did any work modulo 35. Assumption: Coeffjcients of H all in range Conclusion: Already have H , not just H 35 . Simple calculation shows: Give up?—never! 69 / 151 F 35 = x 3 + 14 x 2 + 12 x + 11 − 17 < h ≤ 18 . F 35 ̸ | A .

  49. monic results. but monic is best. Much better: Know that where 70 / 151 Crucial observation: When fjnding gcd’s in Z p [ x ] we returned ▶ In fact any non-zero constant multiple would do just as well ▶ Assuming p is a good prime, H p = lc ( H ) gcd( A p , B p ) in Z p [ x ] . Desperate way out: Find lc ( H ) and multiply monic gcd’s by it. lc ( H ) | c c = gcd( lc ( A ) , lc ( B )) = 3 . Take, in Z 5 [ x ] and Z 7 [ x ] : 5 = 3 F 5 = 3 x 3 + 2 x 2 + x + 3 , F ∗ 7 = 3 F 7 = 3 x 3 + x + 5 . F ∗

  50. 7 : Make it primitive—OK already. Now easy to see so 71 / 151 Candidate from F ∗ 5 , F ∗ 35 = 3 x 3 + 7 x 2 + x − 2 . F ∗ F ∗ 35 | A & F ∗ 35 | B , in Z [ x ] , gcd( A , B ) = F ∗ 35 , in Z [ x ] .

  51. The Chinese Remainder Problem D a Euclidean domain—i.e. integral domain in which a version of Euclidean Algorithm works. Given: 72 / 151 1. Remainders r 1 , . . . , r n ∈ D . 2. Moduli m 1 , . . . , m n ∈ D − { 0 } which are pairwise coprime, i.e. gcd( m i , m j ) = 1 for i ̸ = j . Problem: Find r ∈ D such that r ≡ r i (mod m i ) for 1 ≤ i ≤ n .

  52. Direct Solution . if and only if . . 73 / 151 Then x is a solution to the system Let M i = m 1 m 2 · · · m i − 1 m i + 1 · · · m n for 1 ≤ i ≤ n . Find b 1 , b 2 , . . . , b n such that b i M i ≡ 1 (mod m i ) , for 1 ≤ i ≤ n (the b i exist because gcd( M i , m i ) = 1). x ≡ r 1 (mod m 1 ) x ≡ r 2 (mod m 2 ) x ≡ r n (mod m n ) x ≡ r 1 b 1 M 1 + r 2 b 2 M 2 + · · · + r n b n M n (mod M ) , where M = m 1 m 2 · · · m n .

  53. 74 / 151 Solutions of (1) have form: Thus Use Extended Euclidean Algorithm to fjnd c : Base Case n = 2 r ≡ r 1 (mod m 1 ) ( 1 ) r ≡ r 2 (mod m 2 ) ( 2 ) r 1 + σ m 1 . So have to fjnd σ such that: r 1 + σ m 1 ≡ r 2 (mod m 2 ) . cm 1 ≡ 1 (mod m 2 ) . σ = c ( r 2 − r 1 ) (mod m 2 ) . r 1 + σ m 1 ≡ r 1 + c ( r 2 − r 1 ) m 1 ≡ r 1 + r 2 − r 1 (mod m 2 ) .

  54. 75 / 151 General problem now reduces to: if and only if Again have: . . hold for x if and only if . congruences Observation: Solution r = r 1 + σ m 1 is such that the simultaneous x ≡ r 1 (mod m 1 ) x ≡ r 2 (mod m 2 ) x ≡ r (mod m 1 m 2 ) . General case: Solve fjrst two congruences to obtain r 12 as answer. x ≡ r 12 (mod m 1 m 2 ) x ≡ r 3 (mod m 3 ) x ≡ r i (mod m i ) , 1 ≤ i ≤ n , x ≡ r (mod m 1 m 2 · · · m n ) .

  55. Conclusion bounded as follows Moreover there is exactly one such r . Suggested Exercise: Prove the claim in the preceding Theorem. 76 / 151 Can work with conveniently sized moduli m 1 , . . . , m n and then construct result for single large modulus m 1 m 2 · · · m n . Theorem: For the case D = Z the solution r computed by CRA n or 0 ≤ r < m 1 m 2 · · · m n . Theorem: For the case D = k [ x ] the solution r ( x ) computed by CRA n is is either 0 or bounded in degree as follows deg( r ) < deg( m 1 ) + · · · + deg( m n ) . Moreover there is exactly one such r ( x ) .

  56. Chinese Remainder Theorem for the Integers To sum up, stated purely as a theorem we have: . . . 77 / 151 that Theorem: Assume r 1 , r 2 . . . , r n ∈ Z and m 1 , m 2 , . . . , m n ∈ Z where m i > 1, for 1 ≤ i ≤ n , and m i , m j are comprime (i.e., gcd( m i , m j ) = 1) for 1 ≤ i < j ≤ n . Then there is an integer x such x ≡ r 1 (mod m 1 ) x ≡ r 2 (mod m 2 ) x ≡ r n (mod m n ) . Moreover setting M = m 1 m 2 · · · m n we have that x + qM is also a solution for all q ∈ Z and all solutions are of this form.

  57. Integer Case for all d , But want possibly negative integers. 78 / 151 applies. Choose moduli m 1 , . . . , m n to be distinct primes: ▶ Automatically coprime. ▶ Z p a fjeld so in Z p [ x ] gcd’s exists and Euclidean Algorithm ▶ This is critical . ▶ p not a prime means Z p is not an ID, gcd’s need not exist in Z p [ x ] . ▶ Example: in Z 6 [ x ] we have 3 x d + 1 | 2 x 3 x d + 1 | 4 x & since 2 x = ( 3 x d + 1 ) 2 x and 4 x = ( 3 x d + 1 ) 4 x . ▶ Use of CRT gives coeffjcients in range: 0 ≤ r < M = m 1 m 2 · · · m n .

  58. Shift CRA results to range: where Symmetric representation of remainders. Conclusion: If trying to recover R with then choose moduli so that 79 / 151 − M / 2 < r ′ ≤ M / 2 , { if r ≤ M / 2 ; r , r ′ = r − M , if r > M / 2 . Can recover R uniquely if − M / 2 < R ≤ M / 2. | R | ≤ B M > 2 B .

  59. Bound on Coeffjcients of gcd m Bit of a shame really. —FALSE— value than the largest absolute value of the coeffjcients of A or B . i b 2 n a 2 m 1 a 2 80 / 151 n Theorem: (Landau-Mignotte Inequality) Let A = ∑ m i = 0 a i x i and B = ∑ n i = 0 b i x i in Z [ x ] and suppose that B is a factor of A . Then � � | b i | ≤ 2 n | b n | ∑ ∑ � i . � | a m | i = 0 i = 0 Corollary: Let A , B ∈ Z [ x ] . The absolute value of each coeffjcient of gcd( A , B ) is bounded by  � �  � � � ∑ � ∑ 2 min( m , n ) gcd( a m , b n ) min  . i , 1 � �  | a m | | b n | i = 0 i = 0 Conjecture: Coeffjcients of gcd( A , B ) are no larger in absolute

  60. Choosing Good Primes so invertible constant multiple. Note: We interpret equalities between gcds as being up to an 81 / 151 Put ▶ A , B ∈ Z [ x ] , G = gcd( A , B ) . ▶ Choose a prime p s.t. p ̸ | lc ( A ) or p ̸ | lc ( B ) so p ̸ | lc ( G ) . A = PG , B = QG , A p = P p G p , B p = Q p G p . Problem: G p might not be gcd( A p , B p ) in Z p [ x ] . Example: A = x − 3, B = x + 2, p = 5. gcd( A , B ) = 1 , in Z [ x ] , gcd( A 5 , B 5 ) = x + 2 , in Z 5 [ x ] .

  61. Call a prime p which doesn’t work unlucky , i.e. Same as for some constant c . primes. Question: How many unlucky primes are there? 82 / 151 Lemma: Let A , B ∈ Z [ x ] and p a prime which does not divide both lc ( A ) , lc ( B ) . Then deg(gcd( A p , B p )) ≥ deg(gcd( A , B )) . deg(gcd( A p , B p )) > deg(gcd( A , B )) . gcd( A p , B p ) ̸ = c gcd( A , B ) p Note: Could have gcd( A p , B p ) = c gcd( A , B ) p for p dividing both lc ( A ) , lc ( B ) . But then we have no reliable way of detecting bad

  62. Very useful tool: introduced by J. Sylvester 19th century. a m Have n rows of a -entries, m rows of b -entries, blank spaces 0. b 0 b n b 0 b n b 0 b n a 0 a m a 0 a m a 0 83 / 151 The resultant of A , B is A = a m x m + a m − 1 x m − 1 + · · · + a 0 , B = b n x n + b n − 1 x n − 1 + · · · + b 0 , both non-zero. Could have a m = 0 or b n = 0. . . . � � a m − 1 � � . . . � � a m − 1 � � · · � � � � · · � � � � · · � � � � · · � � � � . . . Res ( A , B ) = � � a m − 1 � � . . . � � b n − 1 � � . . . � � b n − 1 � · · � � � � · · � � � � · · � � � � · · � � � � . . . � b n − 1 Note: Strictly speaking should wrote Res m , n ( A , B ) .

  63. Proof: First Claim: A , B have non-constant common factor ifg Simple proof based on unique factorization. Now put 84 / 151 Theorem: Suppose that a m ̸ = 0 or b n ̸ = 0. Then A and B have a non-constant common factor if and only if Res ( A , B ) = 0. ψ A = ϕ B for some non-zero ϕ and ψ , with deg( ϕ ) < m & deg( ψ ) < n . ϕ = α m x m − 1 + · · · + α 1 , ψ = β n x n − 1 + · · · + β 1 . When can ψ A = ϕ B ?

  64. Equivalent to: . . . Use determinant condition for existence of non-trivial solution to 85 / 151 a 0 β 1 = b 0 α 1 , a 1 β 1 + a 0 β 2 = b 1 α 1 + b 0 α 2 , a m β n = b n α m . View as set of homogeneous equations in m + n unknowns: α 1 , . . . , α m , β 1 , . . . , β n . MX = 0 .

  65. 86 / 151 So 1 Example: 0 3 1 0 Thus 0 1 Lemma: Let A , B , p , A p , B p be as above and put G = gcd( A , B ) . Assume that A p ̸ = 0 and B p ̸ = 0. If p ̸ | Res ( A / G , B / G ) then gcd( A p , B p ) = G p . A = 3 x 4 + 4 x 3 − 6 x 2 − 3 x + 2 , B = 9 x 5 + 21 x 4 + 6 x 3 + x 2 + x − 2 , G = gcd( A , B ) = 3 x 3 + 7 x 2 + x − 2 . A / G = x − 1 , B / G = 3 x 2 + 1 . � � − 1 � � � � Res ( A / G , B / G ) = − 1 = 4 � � � � � �

  66. 87 / 151 5. goto 2 (all the primes were unlucky) 6. 2. od 3. fj (all previous primes were unlucky) 4. 1. MODGCD ( A , B ) �→ G g := gcd( lc ( A ) , lc ( B )) ; M := 2 g Landau_Mignote_Bound ( A , B ) ; p := new prime not dividing g ; C p := gcd( A p , B p ) computed in Z p [ x ] ; (ensure lc ( C p ) = 1) G p := ( g mod p ) C p in Z p [ x ] if deg( G p ) = 0 then return 1 fj ; P := p ; G := G p ; while P ≤ M do p := new prime not dividing g ; C p := gcd( A p , B p ) ; (ensure lc ( C p ) = 1) G p := ( g mod p ) C p ; if deg( G p ) < deg( G ) then goto 4 fj ; if deg( G p ) = deg( G ) then G := CRA ( G , G p , P , p ) ; P := pP H := pp ( G ) ; if H | A and H | B then return H fj ;

  67. Let This yields 88 / 151 A = ( x − 2 )( x + 1 )( x 3 + 2 x − 1 ) = x 5 − x 4 − 3 x 2 − 3 x + 2 , B = ( x − 2 ) 2 ( x + 1 ) 2 = x 4 − 2 x 3 − 3 x 2 + 4 x + 4 . g = 1 , √ √ M = 2 · 1 · 2 4 · 1 · min( 24 , 46 ) ≤ 160 .

  68. Trace of algorithm: 89 / 151 G 2 = x 3 + x , p = 2 : P = 2, G = x 3 + x , G 3 = x 2 − x + 1, so 2 was unlucky; p = 3 : P = 3, G = x 2 − x + 1 G 5 = x 2 − x − 2, p = 5 : G = x 2 − x − 2, this is gcd( A , B ) . Note: Algorithm would do 2 more steps to ensure P > 160

  69. Polynomial Simplifjcation Basics of Algebraic Geometry Defjnition: The Variety corresponding to the polynomials is the set of their common zeros: 90 / 151 ▶ k a fjeld, ▶ X = { x 1 , . . . , x n } indeterminates over k , ▶ p 1 ( x 1 , . . . , x n ) , . . . , p m ( x 1 , . . . , x n ) ∈ k [ X ] . V ( p 1 , . . . , p m ) = { ( a 1 , . . . , a n ) ∈ k n | p i ( a 1 , . . . , a n ) = 0 , for 1 ≤ i ≤ n } . ▶ Subset of k n (variety depends on k and n ). ▶ Defjnition makes sense for arbitrary S ⊆ k [ X ] : V ( S ) = { ( a 1 , . . . , a n ) ∈ k n | p ( a 1 , . . . , a n ) = 0 , for all p ∈ S } .

  70. Ideals Take: Put Obviously Thus Can add any set of polynomials like q to S without changing the variety. 91 / 151 p 1 , . . . , p s ∈ S , q 1 , . . . , q s ∈ k [ X ] . q = q 1 p 1 + · · · + q s p s . q ( a 1 , . . . , a n ) = 0 , for all ( a 1 , . . . , a n ) ∈ V ( S ) . V ( S ∪ { q } ) = V ( S ) .

  71. 92 / 151 Note: Bases not unique. Abstract defjnition: I is an ideal if and only if Have V commutative rings. S Note: Exactly the same defjnition of ideal applies to arbitrary Defjnition: The ideal of k [ X ] generated by S , denoted by ( S ) , is: ( S ) = { q 1 p 1 + · · · + q s p s | s ≥ 1 , q i ∈ k [ X ] , p i ∈ S , for 1 ≤ i ≤ s } . ( ) ( ) = V ( S ) . Say that S is a basis of ideal I if I = ( S ) . ( I is generated by S .) 1. I ̸ = ∅ , 2. p 1 , p 2 ∈ I ⇒ p 1 q , p 1 − p 2 ∈ I for all q ∈ k [ X ] . Fact: If S 1 ⊆ S 2 then ( S 1 ) ⊆ ( S 2 ) . Fact: If I is an ideal and p 1 , . . . , p s ∈ I , q 1 , . . . , q s ∈ k [ X ] then q 1 p 1 + · · · + q s p s ∈ I . Fact: If I is an ideal and S ⊆ I then ( S ) ⊆ I .

  72. and infjnitely more. 93 / 151 S ⊆ k [ x , y ] with elements p 1 = x 2 y + x − 1 , p 2 = xy 2 + y − 1 . Then ( S ) contains ( 2 x + 3 y 2 ) p 1 = 3 x 2 y 3 + 2 x 3 y + 3 xy 2 + 2 x 2 − 3 y 2 − 2 , yp 1 − xp 2 = x − y ,

  73. Consider Therefore Final set of equations is in triangular form so very easy to solve. Thus Thus 94 / 151 p 1 = x + y − 2 z − 1 , p 2 = 2 x − 3 y − z + 2 , p 3 = x − y + z , from Q [ x , y , z ] and let I = ( p 1 , p 2 , p 3 ) . Now p 4 = p 2 − 2 p 1 = − 5 y + 3 z + 4 ∈ I p 5 = p 3 − p 1 − 2 / 5 p 4 = 9 / 5 z − 3 / 5 ∈ I ( p 1 , p 4 , p 5 ) ⊆ I . Easily p 2 , p 3 ∈ ( p 1 , p 4 , p 5 ) so I = ( p 1 , p 4 , p 5 ) . V ( I ) = V ( p 1 , p 4 , p 5 ) = V ( x + y − 2 z − 1 , − 5 y + 3 z + 4 , 9 / 5 z − 3 / 5 ) .

  74. Major Problem Question: Does every ideal have a fjnite basis?. Geometric signifjcance: Given fjgures in n dimensional space defjned by infjnitely many polynomial equations. Are there fjnitely many equations that defjne precisely the same fjgures? of the invariants’). proof! 95 / 151 | X | = 1: Yes—easy (follows from Euclidean Algorithm). | X | = 2: Yes—long & complicated proof by Gordan (the ‘King | X | arbitrary: Yes—Hilbert’s Basis Theorem (1888) very short

  75. a fjnite basis. Method of proof: non-constructive. Gordan’s reaction: ‘Das ist nicht Mathematik. Das ist Theologie’. Not just sour grapes—fairly typical at the time. Later on: Hilbert produced constructive proof based on earlier non-constructive one. 96 / 151 Theorem: [Hilbert’s Basis Theorem, (1888)] Every ideal of k [ X ] has

  76. Can view V as a function Have obvious function I in opposite direction: assigns to variety V the ideal Questions: 97 / 151 Ideals → Varieties . Varieties → Ideals I ( V ) = { p | p ∈ k [ X ] & p ( a 1 , . . . , a n ) = 0 , for all ( a 1 , . . . , a n ) ∈ V } . 1. is I = I V ( I ) for an arbitrary ideal I of k [ X ] ? 2. is V = V I ( V ) for an arbitrary variety V of k n ?

  77. Easily: In fact always have But can have 98 / 151 1. I ⊆ I V ( I ) for all ideals I of k [ X ] , 2. V ⊆ V I ( V ) for all varieties V of k n , V = V I ( V ) I ̸ = I V ( I ) , e.g. take V = V ( p ( x ) 2 ) , p ( x ) non-constant.

  78. has a root in k Assumption: from now on k is algebraically closed. Theorem: [Hilbert’s Nullstellensatz, (1893)] Let I be an ideal of that 99 / 151 Defjnition: k is algebraically closed if every non-constant p ∈ k [ x ] Example: C , fjeld of complex numbers. k [ X ] and q a polynomial of k [ X ] which is zero at all points of V ( I ) , i.e. q ∈ I V ( I ) . Then q s ∈ I for some integer s > 0. Concrete form: If q , p 1 , . . . , p m ∈ k [ X ] and q vanishes whenever p 1 , . . . , p m do then there exist s > 0 and q 1 , . . . , q m ∈ k [ X ] such q s = q 1 p 1 + · · · + q m p m .

  79. Concrete form: A simultaneous system of polynomial equations: . . . does not have a simultaneous solution if and only if Note: Nullstellensatz defjnitely false if k not algebraically closed: 100 / 151 Equivalent form: V ( I ) = ∅ if and only if 1 ∈ I (i.e. I = k [ X ] ). p 1 ( x 1 , . . . , x n ) = 0 p 2 ( x 1 , . . . , x n ) = 0 p m ( x 1 , . . . , x n ) = 0 1 = q 1 p 1 + · · · + q m p m for some q 1 , . . . , q m ∈ k [ X ] . consider p = x 2 + 1 ∈ R [ x ] .

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend