Algorithms for Computer Algebra Algorithms for Computer Algebra
Total Page:16
File Type:pdf, Size:1020Kb
Algorithms for Computer Algebra Algorithms for Computer Algebra K.O . Geddes University of Wa e loo S.R. Czapo La en ian Uni e i G. Labahn Uni e i of Wa e loo \/ Kl we Academi P bliP1he B o on/Do d e h /Lon don Distributors for North America: Kluwer Academic Publishers 101 Philip Drive Assinippi Park Norwell, Massachusetts 02061 USA Distributors for all other countries: Kluwer Academic Publishers Group Distribution Centre Post Office Box 322 3300 AH Dordrecht, THE NETHERLANDS Library of Congress Cataloging-in-PublicationData Geddes, K.O. (Keith O.), 1947- Algorithms for computer algebra / K.O. Geddes, S.R. Czapor, G. Labahn. p. cm. Includes bibliographical references and index. ISBN 0-7923-9259-0 (alk. paper) 1. Algebra--Data processing. 2. Algorithms. I. Czapor, S.R. (Stephen R.), 1957- . 11. Labahn, G. (George), 1951- 111. Title. QA155.7.E4G43 1992 512'.00285--dc20 92-25697 CIP Copyright O 1992 by Kluwer Academic Publishers All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, mechanical, photo-copying, recording, or otherwise, without the prior written permission of the publisher, Kluwer Academic Publishers, 101 Philip Drive, Assinippi Park, Norwell, Massachusetts 02061. Printed on acid-free paper. Printed in the United States of America Dedi a ion Fo hei ppo in n me o wa , hi boo i dedi a ed o Debbie, Kim, Ka h n, and Ki en Alexand a, Me le, Se ge, and Ma ga e La a, Cla dia, Jeff e , and Philip CONTENTS P efa e x Chap e 1 In od ion o Comp e Algeb a 1 .1 In od ion 1 1.2 S mboli e N me i Comp a ion 2 1 .3 A B ief Hi o i al S e h 4 1.4 An Example of a Comp e Algeb a S em : MAPLE 11 Exe i e 20 Chap e 2 Algeb a of Pol nomial , Ra ional F n ion , and Powe Se ie 2.1 In od ion 23 2.2 Ring and Field 23 2.3 Di i ibili and Fa o iza ion in In eg al Domain 26 2 .4 The E lidean Algo i hm 32 2 .5 Uni a ia e Pol nomial Domain 38 2.6 M l i a ia e Pol nomial Domain 46 2 .7 The P imi i e E lidean Algo i hm 52 2.8 Q o ien Field and Ra ional F n ion 60 2.9 Powe Seie and Ex ended Powe Seie 63 2.10 Rela ion hip among Domain 70 Exe i e 73 Chap e 3 No mal Fo m and Algeb ai Rep e en a ion 3.1 In od ion 79 3 .2 Le el of Ab a ion 79 3.3 No mal Fo m and Canoni al Fo m 80 3.4 No mal Fo m fo Pol nomial 84 3.5 No mal Fo m fo Ra ional F n ion and Powe Se ie 88 3.6 Da a S e fo M l ip e i ion In ege and Ra ional N mbe 93 3.7 Da a S e fo Pol nomial , Ra ional F n ion , and Powe Se ie 96 Exe i e 105 ia Algoi hm fo Comp e Algeb a Chap e 4 A i hme i of Pol nomial , Ra ional F n ion , and Powe Se ie 4.1 In od ion 11 i 4.2 Ba i A i hme i Algo i hm 112 4 .3 Fa A i hme i Algo i hm : Ka a ba' Algo i hm 118 4.4 Mod la Rep e en a ion 120 4 .5 The Fa Fo ie T an fo m 123 4.6 The In e e Fo ie T an fo m 128 4.7 Fa Pol nomial M l ipli a ion 132 4.8 Comp ing P imi i e N- h Roo of Uni 133 4.9 New on' I e a ion fo Powe Seie Di i ion 136 Exe i e 145 Chap e 5 Homomo phi m and Chine e Remainde Algo i hm 5.1 In od ion 151 5 .2 In e media e Exp e ion Swell : An Example 151 5.3 Ring Mo phi m 153 5.4 Cha a e iza ion of Mo phi m 160 5.5 Homomo phi Image 167 5.6 The In ege Chine e Remainde Algoi hm 174 5.7 The Pol nomial In e pola ion Algoi hm 183 5.8 F he Di ion of he Two Algoi hm 189 Exe i e 196 Chap e 6 New on' I e a ion and he Hen el Con ion 6.1 In od ion 205 6.2 P-adi and Ideal-adi Rep e en a ion 205 6.3 New on' I e a ion fo F( )=0 214 6.4 Hen el' Lemma 226 6.5 The Uni a ia e Hen el Lif ing Algoi hm 232 6 .6 Spe ial Te hniq e fo he Non-moni Ca e 240 6.7 The M l i a ia e Gene aliza ion of Hen el' Lemma 250 6.8 The M l i a ia e Hen el Lif ing Algo i hm 260 Exe i e 274 Chap e 7 Pol nomial GCD Comp a ion 7.1 In od ion 279 7.2 Pol nomial Remainde Seq en e 280 7 .3 The S l e e Ma ix and S b e l an 285 7.4 The Mod la GCD Algo i hm 300 7.5 The Spa e Mod la GCD Algo i hm 311 7.6 GCD' ing Hen el Lif ing : The EZ-GCD Algo i hm 314 7 .7 A He i i Pol nomial GCD Algo i hm 320 Exe i e 331 Con en ix Chap e 8 Pol nomial Fa o iza ion 8 .1 In od ion 337 8 .2 Sq a e-F ee Fa o iza ion 337 8 .3 Sq a e-F ee Fa o iza ion O e Fini e Field 343 8 .4 Be le amp' Fa o iza ion Algo i hm 347 8 .5 The Big P ime Be le amp Algo i hm 359 8 .6 Di in Deg ee Fa o iza ion 368 8 .7 Fa oing Pol nomial o e he Ra ional 374 8 .8 Fa oing Pol nomial o e Algeb ai N mbe Field 378 Exe i e 384 Chap e 9 Sol ing S em of Eq a ion 9 .1 In od ion 389 9 .2 Linea Eq a ion and Ga ian Elimina ion 390 9 .3 F a ion-F ee Ga ian Elimina ion 393 9 .4 Al ena i e Me hod fo Sol ing Linea Eq a ion 399 9 .5 Nonlinea Eq a ion and Re l an 405 Exe i e 422 Chap e 10 G obne Ba e fo Pol nomial Ideal 10.1 In od ion 429 10.2 Te m O de ing and Red ion 431 10 .3 G obne Ba e and B hbe ge ' Algo i hm 439 10 .4 Imp o ing B hbe ge ' Algo i hm 447 10 .5 Appli a ion of G obne Ba e 451 10 .6 Addi ional Appli a ion 462 Exe i e 466 Chap e 11 In eg a ion of Ra ional F n ion 11 .1 In od ion 473 11 .2 Ba i Con ep of Diffe en ial Algeb a 474 11 .3 Ra ional Pa of he In eg al : He mi e' Me hod 482 11 .4 Ra ional Pa of he In eg al : Ho owi z' Me hod 488 11 .5 Loga i hmi Pa of he In eg al 492 Exe i e 508 x Algo i hm fo Comp e Algeb a Chap e 12 The Ri h In eg a ion Algo i hm 12 .1 In od ion 511 12 .2 Elemen a F n ion 512 12 .3 Diffe en ia ion of Elemen a F n ion 519 12 .4 Lio ille' P in iple 523 12 .5 The Ri h Algo i hm fo T an enden al Elemen a F n ion 529 12 .6 The Ri h Algo i hm fo Loga i hmi Ex en ion 530 12 .7 The Ri h Algo i hm fo Exponen ial Ex en ion 547 12 .8 In eg a ion of Algeb ai F n ion 561 Exe i e 569 No a ion 575 Index 577 LIST OF ALGORITHMS 2.1 E lidean Algo i hm 34 2.2 Ex ended E lidean Algo i hm 36 2.3 P imi i e E lidean Algo i hm 57 4.1 M l ip e i ion In ege M l ipli a ion 113 4.2 Ka a ba' M l ipli a ion Algo i hm 119 4.3 Pol nomial T ial Di i ion Algo i hm 122 4 .4 Fa Fo ie T an fo m (FFT) 128 4 .5 Fa Fo ie Pol nomial M l ipli a ion 132 4.6 New on' Me hod fo Powe Seie In e ion 140 4.7 New on' Me hod fo Sol ing P( ) = 0 144 5.1 Ga ne ' Chine e Remainde Algo i hm 180 5.2 New on In e polaion Algo i hm 188 6.1 Uni a ia e Hen el Lif ing Algoi hm 233 6.2 M l i a ia e Pol nomial Diophan ine Eq a ion 268 6.3 Uni a ia e Pol nomial Diophan ine Eq a ion 270 6.4 M l i a ia e Hen el Lif ing Algoi hm 272 7.1 Mod la GCD Algo i hm 307 7 .2 M l i a ia e GCD Red ion Algo i hm 309 7 .3 The Ex ended Za enha GCD Algo i hm 316 7.4 GCD He i i Algo i hm 330 8 .1 Sq a e-F ee Fa o iza ion 340 8.2 Y n' Sq a e-F ee Fa o iza ion 342 8.3 Fini e Field Sq a e-F ee Fa o iza ion 345 8.4 Be le amp' Fa o ing Algoi hm 352 8.5 Fo m Q Ma ix 353 8.6 N ll Spa e Ba i Algo i hm 356 8 .7 Big P ime Be le amp Fa o ing Algoi hm 367 8 .8 Di in Deg ee Fa o iza ion (Pa ial) 371 8.9 Di in Deg ee Fa oiza ion (Spli ing) 373 8.10 Fa o iza ion o e Algeb ai N mbe Field 383 xii Algo i hm fo Comp e Algeb a 9 .1 F a ion-F ee Ga ian Elimina ion 398 9 .2 Nonlinea Elimina ion Algo i hm 417 9 .3 Sol ion of a Nonlinea S em of Eq a ion 421 10 .1 F ll Red ion Algo i hm 436 10 .2 B hbe ge ' Algoi hm fo G obne Ba e 446 10 .3 Con ion of a Red ed Ideal Ba i 448 10 .4 Imp o ed Con ion of Red ed G obne Ba i 450 10 .5 Sol ion of S em fo One Va iable 457 10 .6 Comple e Sol ion of S em 458 10 .7 Sol ion ing Lexi og aphi G obne Ba i 461 11 .1 He mi e' Me hod fo Ra ional F n ion 485 11 .2 Ho owi z' Red ion fo Ra ional F n ion 490 11 .3 Ro h ein/T age Me hod 499 11 .4 Laza d/Rioboo/T age Imp o emen 506 LIST OF FIGURES 1 .1 FORTRAN p og am in ol ing Cheb he pol nomial 3 1 .2 ALTRAN p og am in ol ing Cheb he pol nomial 3 1 .3 O p f om ALTRAN p og am in Fig e 1 .2 4 1.4 MAPLE e ion in ol ing Cheb he pol nomial 5 2.1 Rela ion hip among fo domain o e an in eg al domain 71 2.2 Rela ion hip among nine domain 71 3.1 Le el of ab a ion fo m l i a ia e pol nomial ep e en a ion 86 3.2 A lin ed li ep e en a ion 98 3.3 A d nami a a ep e en a ion 100 3 .4 A de ip o blo ep e en a ion 101 5.1 Homomo phi m diag am fo Chine e emainde and in e pola ion algo i hm 195 6.1 Homomo phi m diag am fo p-adi and ideal-adi New on' i e a ion 226 6.2 Homomo phi m diag am fo ni aia e and m l i aia e Hen el on ion ....251 LIST OF TABLES 1 .1 The fi fi e Cheb he pol nomial 2 2.1 Defini ion of algeb ai e 25 2.2 Addi ion and m l ipli a ion able fo Z5 25 2 .3 Hie a h of domain 31 PREFACE The field of computer algebra has gained widespread attention in recent years because of the increasing use of computer algebra systems in the scientific community.