Skip to main content

Giac and GeoGebra – Improved Gröbner Basis Computations

  • Chapter
  • First Online:
Computer Algebra and Polynomials

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8942))

Abstract

GeoGebra is open source mathematics education software being used in thousands of schools worldwide. It already supports equation system solving, locus equation computation and automatic geometry theorem proving by using an embedded or outsourced CAS. GeoGebra recently changed its embedded CAS from Reduce to Giac because it fits better into the educational use. Also careful benchmarking of open source Gröbner basis implementations showed that Giac is fast in algebraic computations, too, therefore it allows heavy Gröbner basis calculations even in a web browser via Javascript.

Gröbner basis on \({\mathbb {Q}}\) for revlex ordering implementation in Giac is a modular algorithm (E. Arnold). Each \({\mathbb {Z}}/p{\mathbb {Z}}\) computation is done via the Buchberger algorithm using F4 linear algebra technics and “remake” speedups, they might be run in parallel for large examples. The output can be probabilistic or certified (which is much slower). Experimentation shows that the probabilistic version is faster than other open-source implementations, and about 3 times slower than the Magma implementation on one processor, it also requires less memory for big examples like Cyclic9.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    http://sagemath.org.

  2. 2.

    http://live.sympy.org, http://www.sympygamma.com.

  3. 3.

    http://ipython.org/notebook.html.

  4. 4.

    Giac has already been successfully compiled into .pexe and .nexe applications at http://ggb1.idm.jku.at/~kovzol/data/giac. The native executables for 32/64 bits Intel and ARM achitecture binaries are between 9.7 and 11.9 MB, the portable executable is 6.3 MB, however, the .pexe \(\rightarrow \) .nexe compilation takes too long, at least 1 min on a recent hardware. The runtime speed is comparable with the JNI version, i.e. much faster than the JavaScript version.

  5. 5.

    Axel Rauschmayer, author of the forthcoming O’Reilly book Speaking JavaScript, predicts JavaScript to run near-native performance in 2014 (see http://www.2ality.com/2014/01/web-platform-2014.html for details). The speed is currently about 70 % of compiled C++ code by using asm.js. This will, however, doubtfully speed up the JS port of Giac like in a native client since it heavily uses the anonymous union of C/C++ to pack data (unsupported in JS).

  6. 6.

    https://github.com/ariya/phantomjs/wiki/PhantomJS-2 contains a step-by-step guide to compile the development version of PhantomJS version 2.

References

  1. Ancsin, G., Hohenwarter, M., Kovács, Z.: GeoGebra goes mobile. Electron. J. Math. Technol. 5(2), 160–168 (2011)

    Google Scholar 

  2. Arnold, E.A.: Modular algorithms for computing Gröbner bases. J. Symbolic Comput. 35(4), 403–419 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  3. Buchberger, B.: Gröbner bases: an algorithmic method in polynomial ideal theory. In: Bose, N.K. (ed.) Multidimensional Systems Theory, pp. 184–232. Reidel Publishing Company, Dodrecht (1985)

    Chapter  Google Scholar 

  4. Dersch, H.: Jasymca 2.0 – symbolic calculator for Java, Mar 2009. http://webuser.hs-furtwangen.de/~dersch/jasymca2/Jasymca2en/Jasymca2en.html

  5. Faugère, J.-C.: A new efficient algorithm for computing Gröbner bases (F4). J. Pure Appl. Algebra 139(1–3), 61–88 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  6. Faugère, J.-C.: A new efficient algorithm for computing Gröbner bases without reduction to zero (F5). In: Proceedings of the 2002 International Symposium on Symbolic and Algebraic Computation, ISSAC 2002, pp. 75–83. ACM, New York (2002)

    Google Scholar 

  7. Gebauer, R., Möller, H.M.: On an installation of Buchberger’s algorithm. J. Symbolic Comput. 6(2–3), 275–286 (1988)

    Article  MATH  MathSciNet  Google Scholar 

  8. Hanselman, S.: JavaScript is assembly language for the web: semantic markup is dead! Clean vs. machine-coded HTML (2011). http://goo.gl/YKiO6B. Accessed 8 Jan 2014

  9. Hearn, A.C.: REDUCE User’s Manual Version 3.8, Feb 2004. http://reduce-algebra.com/docs/reduce.pdf

  10. Hicklin, J., Moler, C., Webb, P., Boisvert, R.F., Miller, B., Pozo, R., Remington, K.: JAMA: JAva MAtrix package, Nov 2012. http://math.nist.gov/javanumerics/jama/

  11. Joux, A., Vitse, V.: A variant of the F4 algorithm. In: Kiayias, A. (ed.) CT-RSA 2011. LNCS, vol. 6558, pp. 356–375. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  12. Kosan, T.: JSLisp. http://sourceforge.net/p/reduce-algebra/code/HEAD/tree/trunk/jslisp

  13. Kosan, T.: MathPiper, Jan 2011. http://www.mathpiper.org

  14. Kovács, Z.: Definition of a parabola as a locus. GeoGebraTube material (2012). http://www.geogebratube.org/student/m23662

  15. Kovács, Z.: GeoGebra developers’ Trac wiki: theorem proving planning (2012). http://dev.geogebra.org/trac/wiki/TheoremProvingPlanning. Accessed 8 Jan 2014

  16. Kovács, Z.: GeoGebraWeb offers CAS functionality, May 2012. http://blog.geogebra.org/2012/05/geogebraweb-cas/

  17. Monagan, M., Pearce, R.: Sparse polynomial division using a heap. J. Symbolic Comput. 46(7), 807–822 (2011)

    Article  MATH  MathSciNet  Google Scholar 

  18. Parisse, B., Graeve, R.D.: Giac/Xcas computer algebra system (2013). http://www-fourier.ujf-grenoble.fr/~parisse/giac_fr.html

  19. Steel, A.: Gröbner basis timings page (2004). http://magma.maths.usyd.edu.au/~allan/gb/

  20. Wikipedia. Equation solving — Wikipedia, the free encyclopedia (2013). http://en.wikipedia.org/w/index.php?title=Equation_solving&oldid=580349875. Accessed 14 Jan 2014

  21. Wikipedia. Google Native Client — Wikipedia, the free encyclopedia (2013). http://en.wikipedia.org/w/index.php?title=Google_Native_Client&oldid=588335015. Accessed 8 Jan 2014

  22. Wikipedia. JavaScript engine — Wikipedia, the free encyclopedia (2013). http://en.wikipedia.org/w/index.php?title=JavaScript_engine&oldid=586802475. Accessed 8 Jan 2014

  23. Wikipedia. Dart (programming language) — Wikipedia, the free encyclopedia (2014). http://en.wikipedia.org/w/index.php?title=Dart_(programming_language)&oldid=589448479 . Accessed 8 Jan 2014

Download references

Acknowledgments

The first author thanks Michael Borcherds and Zbyněk Konečný for the test cases in benchmarking the embeddable computer algebra systems. The second author wishes to thank Vanessa Vitse for insightful discussions and Frédéric Han for testing.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Zoltán Kovács .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Kovács, Z., Parisse, B. (2015). Giac and GeoGebra – Improved Gröbner Basis Computations. In: Gutierrez, J., Schicho, J., Weimann, M. (eds) Computer Algebra and Polynomials. Lecture Notes in Computer Science(), vol 8942. Springer, Cham. https://doi.org/10.1007/978-3-319-15081-9_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-15081-9_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-15080-2

  • Online ISBN: 978-3-319-15081-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics