RSOLVE.TEX 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. \documentstyle[11pt]{article}
  2. \title{R/I\_SOLVE: Rational/Integer Polynomial Solvers}
  3. \author{Francis J. Wright \\
  4. School of Mathematical Sciences \\
  5. Queen Mary and Westfield College \\
  6. University of London \\
  7. Mile End Road, London E1 4NS, UK. \\
  8. E-mail: {\tt F.J.Wright@QMW.ac.uk}}
  9. \date{27 January 1995}
  10. \begin{document}
  11. \maketitle
  12. \begin{abstract}
  13. This package provides the operators \verb|r/i_solve| that compute
  14. respectively the exact rational or integer zeros of a single
  15. univariate polynomial using fast modular methods.
  16. \end{abstract}
  17. \section{Introduction}
  18. This package provides operators that compute the exact rational zeros
  19. of a single univariate polynomial using fast modular methods. The
  20. algorithm used is that described by R. Loos (1983): Computing rational
  21. zeros of integral polynomials by $p$-adic expansion, {\it SIAM J.
  22. Computing}, {\bf 12}, 286--293. The operator \verb|r_solve| computes
  23. all rational zeros whereas the operator \verb|i_solve| computes only
  24. integer zeros in a way that is slightly more efficient than extracting
  25. them from the rational zeros. The \verb|r_solve| and \verb|i_solve|
  26. interfaces are almost identical, and are intended to be completely
  27. compatible with that of the general \verb|solve| operator, although
  28. \verb|r_solve| and \verb|i_solve| give more convenient output when
  29. only rational or integer zeros respectively are required. The current
  30. implementation appears to be faster than \verb|solve| by a factor that
  31. depends on the example, but is typically up to about 2.
  32. I plan to extend this package to compute Gaussian integer and rational
  33. zeros and zeros of polynomial systems.
  34. \section{The user interface}
  35. The first argument is required and must simplify to either a
  36. univariate polynomial expression or equation with integer, rational or
  37. rounded coefficients. Symbolic coefficients are not allowed (and
  38. currently complex coefficients are not allowed either.) The argument
  39. is simplified to a quotient of integer polynomials and the denominator
  40. is silently ignored.
  41. Subsequent arguments are optional. If the polynomial variable is to
  42. be specified then it must be the first optional argument, and if the
  43. first optional argument is not a valid option (see below) then it is
  44. (mis-)interpreted as the polynomial variable. However, since the
  45. variable in a non-constant univariate polynomial can be deduced from
  46. the polynomial it is unnecessary to specify it separately, except in
  47. the degenerate case that the first argument simplifies to either 0 or
  48. $0 = 0$. In this case the result is returned by \verb|i_solve| in
  49. terms of the operator \verb|arbint| and by \verb|r_solve| in terms of
  50. the (new) analogous operator \verb|arbrat|. The operator
  51. \verb|i_solve| will generally run slightly faster than \verb|r_solve|.
  52. The (rational or integer) zeros of the first argument are returned as
  53. a list and the default output format is the same as that used by
  54. \verb|solve|. Each distinct zero is returned in the form of an
  55. equation with the variable on the left and the multiplicities of the
  56. zeros are assigned to the variable \verb|root_multiplicities| as a
  57. list. However, if the switch \verb|multiplicities| is turned on then
  58. each zero is explicitly included in the solution list the appropriate
  59. number of times (and \verb|root_multiplicities| has no value).
  60. \begin{sloppypar}
  61. Optional keyword arguments acting as local switches allow other output
  62. formats. They have the following meanings:
  63. \begin{description}
  64. \item[\verb|separate|:] assign the multiplicity list to the global
  65. variable \verb|root_multiplicities| (the default);
  66. \item[\verb|expand| or \verb|multiplicities|:] expand the solution
  67. list to include multiple zeros multiple times (the default if the
  68. \verb|multiplicities| switch is on);
  69. \item[\verb|together|:] return each solution as a list whose second
  70. element is the multiplicity;
  71. \item[\verb|nomul|:] do not compute multiplicities (thereby saving
  72. some time);
  73. \item[\verb|noeqs|:] do not return univariate zeros as equations but
  74. just as values.
  75. \end{description}
  76. \end{sloppypar}
  77. \section{Examples}
  78. \begin{verbatim}
  79. r_solve((9x^2 - 16)*(x^2 - 9), x);
  80. \end{verbatim}
  81. \[
  82. \left\{x=\frac{-4}{3},x=3,x=-3,x=\frac{4}{3}\right\}
  83. \]
  84. \begin{verbatim}
  85. i_solve((9x^2 - 16)*(x^2 - 9), x);
  86. \end{verbatim}
  87. \[
  88. \{x=3,x=-3\}
  89. \]
  90. See the test/demonstration file \verb|rsolve.tst| for more examples.
  91. \section{Tracing}
  92. The switch {\tt trsolve} turns on tracing of the algorithm. It is off
  93. by default.
  94. \end{document}