[BACK]Return to dag-noro-proc.tex CVS log [TXT][DIR] Up to [local] / OpenXM / doc / Papers

Annotation of OpenXM/doc/Papers/dag-noro-proc.tex, Revision 1.7

1.7     ! noro        1: % $OpenXM: OpenXM/doc/Papers/dag-noro-proc.tex,v 1.6 2001/11/28 09:05:57 noro Exp $
1.1       noro        2: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                      3: % This is a sample input file for your contribution to a multi-
                      4: % author book to be published by Springer Verlag.
                      5: %
                      6: % Please use it as a template for your own input, and please
                      7: % follow the instructions for the formal editing of your
                      8: % manuscript as described in the file "1readme".
                      9: %
                     10: % Please send the Tex and figure files of your manuscript
                     11: % together with any additional style files as well as the
                     12: % PS file to the editor of your book.
                     13: %
                     14: % He or she will collect all contributions for the planned
                     15: % book, possibly compile them all in one go and pass the
                     16: % complete set of manuscripts on to Springer.
                     17: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                     18:
                     19:
                     20:
                     21: %RECOMMENDED%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                     22:
                     23: \documentclass[runningheads]{cl2emult}
                     24:
                     25: \usepackage{makeidx}  % allows index generation
                     26: \usepackage{graphicx} % standard LaTeX graphics tool
                     27:                       % for including eps-figure files
                     28: \usepackage{subeqnar} % subnumbers individual equations
                     29:                       % within an array
                     30: \usepackage{multicol} % used for the two-column index
                     31: \usepackage{cropmark} % cropmarks for pages without
                     32:                       % pagenumbers
                     33: \usepackage{math}     % placeholder for figures
                     34: \makeindex            % used for the subject index
                     35:                       % please use the style sprmidx.sty with
                     36:                       % your makeindex program
                     37:
                     38: %upright Greek letters (example below: upright "mu")
                     39: \newcommand{\euler}[1]{{\usefont{U}{eur}{m}{n}#1}}
                     40: \newcommand{\eulerbold}[1]{{\usefont{U}{eur}{b}{n}#1}}
                     41: \newcommand{\umu}{\mbox{\euler{\char22}}}
                     42: \newcommand{\umub}{\mbox{\eulerbold{\char22}}}
                     43:
                     44: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                     45:
                     46:
                     47: %OPTIONAL%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                     48: %
                     49: %\usepackage{amstex}   % useful for coding complex math
                     50: %\mathindent\parindent % needed in case "Amstex" is used
                     51: %
                     52: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                     53:
                     54: %AUTHOR_STYLES_AND_DEFINITIONS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                     55: %
                     56: %Please reduce your own definitions and macros to an absolute
                     57: %minimum since otherwise the editor will find it rather
                     58: %strenuous to compile all individual contributions to a
                     59: %single book file
                     60: \usepackage{epsfig}
                     61: \def\cont{{\rm cont}}
                     62: \def\GCD{{\rm GCD}}
                     63: %
                     64: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                     65:
                     66: \begin{document}
                     67: %
                     68: \title*{A Computer Algebra System Risa/Asir and OpenXM}
                     69: %
                     70: %
                     71: \toctitle{A Computer Algebra System Risa/Asir and OpenXM}
                     72: % allows explicit linebreak for the table of content
                     73: %
                     74: %
                     75: \titlerunning{Risa/Asir and OpenXM}
                     76: % allows abbreviation of title, if the full title is too long
                     77: % to fit in the running head
                     78: %
1.7     ! noro       79: \author{Masayuki Noro}
1.1       noro       80: %
                     81: %\authorrunning{Masayuki Noro}
                     82: % if there are more than two authors,
                     83: % please abbreviate author list for running head
                     84: %
                     85: %
                     86: \institute{Kobe University, Rokko, Kobe 657-8501, Japan}
                     87:
                     88: \maketitle              % typesets the title of the contribution
                     89:
                     90: \begin{abstract}
1.7     ! noro       91: Risa/Asir is software for polynomial computation. It has been
        !            92: developed for testing experimental polynomial algorithms, and now it
        !            93: acts also as a main component in the OpenXM package \cite{OPENXM}.
        !            94: OpenXM is an infrastructure for exchanging mathematical
1.1       noro       95: data.  It defines a client-server architecture for parallel and
1.7     ! noro       96: distributed computation. In this article we present an overview of
        !            97: Risa/Asir and review several techniques for improving performances of
        !            98: Groebner basis computation over {\bf Q}. We also show Risa/Asir's
        !            99: OpenXM interfaces and their usages.
1.1       noro      100: \end{abstract}
                    101:
                    102: \section{A computer algebra system Risa/Asir}
                    103:
                    104: \subsection{What is Risa/Asir?}
                    105:
                    106: Risa/Asir \cite{RISA} is software mainly for polynomial
                    107: computation. Its major functions are polynomial factorization and
                    108: Groebner basis computation, whose core parts are implemented as
1.5       noro      109: built-in functions.  Some higher algorithms such as primary ideal
1.1       noro      110: decomposition or Galois group computation are built on them by the
1.5       noro      111: user language called Asir language. Asir language can be regarded as C
                    112: language without type declaration of variables, with list processing,
                    113: and with automatic garbage collection. A built-in {\tt gdb}-like user
1.7     ! noro      114: language debugger is available. Risa/Asir is open source and the
        !           115: source code and binaries are available via {\tt ftp} or {\tt CVS}.
        !           116: Risa/Asir is not only a standalone computer algebra system but also a
        !           117: main component in OpenXM package \cite{OPENXM}, which is a collection
        !           118: of various software compliant to OpenXM protocol specification.
        !           119: OpenXM is an infrastructure for exchanging mathematical data and
        !           120: Risa/Asir has three kinds of OpenXM interfaces : as a client, as a
        !           121: server, and as a subroutine library. Our goals of developing Risa/Asir
1.5       noro      122: are as follows:
1.1       noro      123:
                    124: \begin{enumerate}
1.5       noro      125: \item Providing a platform for testing new algorithms
1.1       noro      126:
                    127: Risa/Asir has been a platform for testing experimental algorithms in
1.7     ! noro      128: polynomial factorization, Groebner basis computation,
1.1       noro      129: cryptography and quantifier elimination. As to Groebner basis, we have
                    130: been mainly interested in problems over {\bf Q} and we tried applying
                    131: various modular techniques to overcome difficulties caused by huge
                    132: intermediate coefficients. We have had several results and they have
1.7     ! noro      133: been implemented in Risa/Asir with other known methods.
1.1       noro      134:
1.5       noro      135: \item General purpose open system
1.1       noro      136:
                    137: We need a lot of functions to make Risa/Asir a general purpose
1.7     ! noro      138: computer algebra system.  In recent years we can make use of various high
1.1       noro      139: performance applications or libraries as free software. We wrapped
                    140: such software as OpenXM servers and we started to release a collection
1.5       noro      141: of such servers and clients as the OpenXM package in 1997. Risa/Asir
                    142: is now a main client in the package.
1.1       noro      143:
                    144: \item Environment for parallel and distributed computation
                    145:
1.7     ! noro      146: The ancestor of OpenXM is a protocol designed for doing parallel
        !           147: distributed computations by connecting multiple Risa/Asir's over
        !           148: TCP/IP. OpenXM is also designed to provide an environment for
        !           149: efficient parallel distributed computation. Currently only
        !           150: client-server communication is available, but we are preparing a
        !           151: specification OpenXM-RFC 102 allowing client-client communication,
        !           152: which will enable us to execute wider range of parallel algorithms
        !           153: requiring collective operations efficiently.
1.1       noro      154: \end{enumerate}
                    155:
                    156: \subsection{Groebner basis and the related computation}
                    157:
                    158: Currently Risa/Asir can only deal with polynomial ring. Operations on
                    159: modules over polynomial rings have not yet supported.  However, both
                    160: commutative polynomial rings and Weyl algebra are supported and one
1.7     ! noro      161: can compute Groebner basis in both rings over {\bf Q}, fields of
1.1       noro      162: rational functions and finite fields. In the early stage of our
                    163: development, our effort was mainly devoted to improve the efficiency
1.7     ! noro      164: of computation over {\bf Q}. Our main tool is modular
1.1       noro      165: computation. For Buchberger algorithm we adopted the trace lifting
                    166: algorithm by Traverso \cite{TRAV} and elaborated it by applying our
                    167: theory on a correspondence between Groebner basis and its modular
                    168: image \cite{NOYO}. We also combine the trace lifting with
                    169: homogenization to stabilize selection strategies, which enables us to
1.7     ! noro      170: compute several examples efficiently which are hard to compute without
1.1       noro      171: such a combination.  Our modular method can be applied to the change
1.7     ! noro      172: of ordering algorithm\cite{FGLM} and rational univariate
        !           173: representation \cite{RUR}.  We also made a test implementation of
        !           174: $F_4$ algorithm \cite{F4}. In the later section we will show timing
        !           175: data on Groebner basis computation.
1.1       noro      176:
                    177: \subsection{Polynomial factorization}
                    178:
                    179: Here we briefly review functions on polynomial factorization.  For
                    180: univariate factorization over {\bf Q}, the classical
                    181: Berlekamp-Zassenhaus algorithm is implemented.  Efficient algorithms
1.7     ! noro      182: recently proposed have not yet implemented.  For univariate
        !           183: factorization over algebraic number fields, Trager's algorithm
        !           184: \cite{TRAGER} is implemented with some modifications.  Its major
        !           185: applications are splitting field and Galois group computation of
        !           186: polynomials over {\bf Q} \cite{ANY}. For such purpose a tower of
        !           187: simple extensions are suitable because factors represented over a
        !           188: simple extension often have huge coefficients.  For univariate
        !           189: factorization over finite fields, equal degree factorization and
        !           190: Cantor-Zassenhaus algorithm are implemented. We can use various
        !           191: representation of finite fields: $GF(p)$ with a machine integer prime
        !           192: $p$, $GF(p)$ and $GF(p^n)$ with any odd prime $p$, $GF(2^n)$ with a
        !           193: bit-array representation of polynomials over $GF(2)$ and $GF(p^n)$
        !           194: with small $p^n$ represented by a primitive root.  For multivariate
        !           195: factorization over {\bf Q}, the classical EZ(Extended
        !           196: Zassenhaus) type algorithm is implemented.
1.1       noro      197:
                    198: \subsection{Other functions}
                    199: By applying Groebner basis computation and polynomial factorization,
                    200: we have implemented several higher level algorithms. A typical
                    201: application is primary ideal decomposition of polynomial ideals over
                    202: {\bf Q}, which needs both functions.  Shimoyama-Yokoyama algorithm
1.5       noro      203: \cite{SY} for primary decomposition is written in the user language.
                    204: Splitting field and Galois group computation \cite{ANY} are closely
                    205: related and are also important applications of polynomial
                    206: factorization.
1.1       noro      207:
                    208: \section{Techniques for efficient Groebner basis computation over {\bf Q}}
                    209: \label{gbtech}
                    210:
                    211: In this section we review several practical techniques to improve
                    212: Groebner basis computation over {\bf Q}, which are easily
                    213: implemented but may not be well known.
                    214: We use the following notations.
                    215: \begin{description}
1.7     ! noro      216: \item $Id(F)$ : a polynomial ideal generated by a polynomial set $F$
1.1       noro      217: \item $\phi_p$ : the canonical projection from ${\bf Z}$ onto $GF(p)$
1.5       noro      218: \item $HT(f)$ : the head term of a polynomial with respect to a term order
                    219: \item $HC(f)$ : the head coefficient of a polynomial with respect to a term order
1.1       noro      220: \end{description}
                    221:
                    222: \subsection{Combination of homogenization and trace lifting}
1.7     ! noro      223: \label{gbhomo}
1.1       noro      224:
                    225: Traverso's trace lifting algorithm can be
1.7     ! noro      226: formulated in an abstract form as follows (c.f. \cite{FPARA}).
1.1       noro      227: \begin{tabbing}
                    228: Input : a finite subset $F \subset {\bf Z}[X]$\\
                    229: Output : a Groebner basis $G$ of $Id(F)$ with respect to a term order $<$\\
                    230: do \= \\
                    231: \> $p \leftarrow$ a new prime\\
                    232: \>Guess \= a Groebner basis candidate $G \subset Id(F)$
                    233: such that $\phi_p(G)$ \\
                    234: \>\> is a Groebner basis of $Id(\phi_p(F))$ in ${GF(p)}[X]$\\
                    235: \>Check that $G$ is a Groebner basis of $Id(G)$ and $F \subset Id(G)$\\
                    236: \>If $G$ passes the check return $G$\\
                    237: end do
                    238: \end{tabbing}
1.5       noro      239: We can apply various methods for {\it guess} part of the above
                    240: algorithm.  In the original algorithm we guess the candidate by
                    241: replacing zero normal form checks over {\bf Q} with those over $GF(p)$
                    242: in the Buchberger algorithm, which we call {\it tl\_guess}. In Asir
                    243: one can specify another method {\it tl\_h\_guess\_dh}, which is a
                    244: combination of {\it tl\_guess} and homogenization.
1.1       noro      245: \begin{tabbing}
                    246: $tl\_h\_guess\_dh(F,p)$\\
                    247: Input : $F\subset {\bf Z}[X]$, a prime $p$\\
                    248: Output : a Groebner basis candidate\\
                    249: $F_h \leftarrow$ the homogenization of $F$\\
                    250: $G_h \leftarrow tl\_guess(F_h,p)$ under an appropriate term order\\
                    251: $G \leftarrow$ the dehomogenization of $G_h$\\
                    252: $G \leftarrow G \setminus \{g \in G| \exists h \in G \setminus \{g\}$
                    253: such that $HT(h)|HT(g)$ \}
                    254: \end{tabbing}
                    255: The input is homogenized to suppress intermediate coefficient swells
                    256: of intermediate basis elements.  The number of zero normal forms may
                    257: increase by the homogenization, but they are detected over
1.5       noro      258: $GF(p)$. Finally, by dehomogenizing the candidate we can expect that
1.7     ! noro      259: lots of redundant elements can be removed.
1.1       noro      260:
                    261: \subsection{Minimal polynomial computation by modular method}
1.7     ! noro      262:
1.1       noro      263: Let $I$ be a zero-dimensional ideal in $R={\bf Q}[x_1,\ldots,x_n]$.
                    264: Then the minimal polynomial $m(x_i)$ of a variable $x_i$ in $R/I$ can
                    265: be computed by a partial FGLM \cite{FGLM}, but it often takes long
                    266: time if one searches $m(x_i)$ incrementally over {\bf Q}.  In this
                    267: case we can apply a simple modular method to compute the minimal
                    268: polynomial.
                    269: \begin{tabbing}
                    270: Input : a Groebner basis $G$ of $I$, a variable $x_i$\\
                    271: Output : the minimal polynomial of $x$ in $R/I$\\
                    272: do \= \\
                    273: \> $p \leftarrow$ a new prime such that $p \not{|} HC(g)$ for all $g \in G$\\
                    274: \> $m_p \leftarrow$ the minimal polynomial of $x_i$ in $GF(p)[x_1,\ldots,x_n]/Id(\phi_p(G))$\\
                    275: \> If there exists $m(x_i) \in I$ such that $\phi_p(m) = m_p$ and $\deg(m)=\deg(m_p)$\\
                    276: \> then return $m(x_i)$\\
                    277: end do
                    278: \end{tabbing}
                    279: In this algorithm, $m_p$ can be obtained by a partial FGLM over
                    280: $GF(p)$ because $\phi_p(G)$ is a Groebner basis. Once we know the
                    281: candidate of $\deg(m(x_i))$, $m(x_i)$ can be determined by solving a
                    282: system of linear equations via the method of indeterminate
1.7     ! noro      283: coefficient, and it can be solved efficiently by $p$-adic method.
        !           284: Arguments on \cite{NOYO} ensures that $m(x_i)$ is what we want if it
        !           285: exists. Note that the full FGLM can also be computed by the same
        !           286: method.
1.1       noro      287:
                    288: \subsection{Integer contents reduction}
1.7     ! noro      289: \label{gbcont}
1.1       noro      290:
1.5       noro      291: In some cases the cost to remove integer contents during normal form
1.1       noro      292: computations is dominant. We can remove the content of an integral
                    293: polynomial $f$ efficiently by the following method \cite{REPL}.
                    294: \begin{tabbing}
                    295: Input : an integral polynomial $f$\\
                    296: Output : a pair $(\cont(f),f/\cont(f))$\\
                    297: $g_0 \leftarrow$ an estimate of $\cont(f)$ such that $\cont(f)|g_0$\\
1.7     ! noro      298: Write $f$ as $f = g_0q+r$ by division with remainder by $g_0$ for each coefficient\\
1.1       noro      299: If $r = 0$ then return $(g_0,q)$\\
                    300: else return $(g,g_0/g \cdot q + r/g)$, where $g = \GCD(g_0,\cont(r))$
                    301: \end{tabbing}
1.5       noro      302: By separating the set of coefficients of $f$ into two subsets and by
1.7     ! noro      303: computing GCD of sums of the elements in each subset we can estimate
1.1       noro      304: $g_0$ with high accuracy. Then other components are easily computed.
                    305:
                    306: %\subsection{Demand loading of reducers}
1.5       noro      307: %An execution of the Buchberger algorithm may produce vary large number
1.1       noro      308: %of intermediate basis elements. In Asir, we can specify that such
                    309: %basis elements should be put on disk to enlarge free memory space.
                    310: %This does not reduce the efficiency so much because all basis elements
                    311: %are not necessarily used in a single normal form computation, and the
                    312: %cost for reading basis elements from disk is often negligible because
                    313: %of the cost for coefficient computations.
                    314:
                    315: \section{Risa/Asir performance}
                    316:
1.5       noro      317: We show timing data on Risa/Asir for Groebner basis computation
                    318: and polynomial factorization. The measurements were made on
1.1       noro      319: a PC with PentiumIII 1GHz and 1Gbyte of main memory. Timings
                    320: are given in seconds. In the tables `---' means it was not
                    321: measured.
                    322:
                    323: \subsection{Groebner basis computation}
                    324:
1.5       noro      325: Table \ref{gbmod} and Table \ref{gbq} show timing data for Groebner
                    326: basis computation over $GF(32003)$ and over {\bf Q} respectively.
1.1       noro      327: $C_n$ is the cyclic $n$ system and $K_n$ is the Katsura $n$ system,
1.5       noro      328: both are famous bench mark problems \cite{BENCH}.  We also measured
                    329: the timing for $McKay$ system over {\bf Q} \cite{REPL}.  the term
                    330: order is graded reverse lexicographic order.  In the both tables, the
                    331: first three rows are timings for the Buchberger algorithm, and the
                    332: last two rows are timings for $F_4$ algorithm. As to the Buchberger
                    333: algorithm over $GF(32003)$, Singular\cite{SINGULAR} shows the best
                    334: performance among the three systems. $F_4$ implementation in Risa/Asir
                    335: is faster than the Buchberger algorithm implementation in Singular,
                    336: but it is still several times slower than $F_4$ implementation in FGb
1.7     ! noro      337: \cite{FGB}.  In Table \ref{gbq}, Risa/Asir computed $C_7$ and $McKay$
        !           338: by the Buchberger algorithm with the methods described in Section
        !           339: \ref{gbhomo} and \ref{gbcont}.  It is obvious that $F_4$
        !           340: implementation in Risa/Asir over {\bf Q} is too immature. Nevertheless
        !           341: the timing of $McKay$ is greatly reduced.  Fig. \ref{f4vsbuch}
        !           342: explains why $F_4$ is efficient in this case.  The figure shows that
        !           343: the Buchberger algorithm produces normal forms with huge coefficients
        !           344: for S-polynomials after the 250-th one, which are the computations in
        !           345: degree 16.  However, we know that the reduced basis elements have much
        !           346: smaller coefficients after removing contents.  As $F_4$ algorithm
        !           347: automatically produces the reduced ones, the degree 16 computation is
        !           348: quite easy in $F_4$.
1.1       noro      349:
                    350: \begin{table}[hbtp]
                    351: \begin{center}
                    352: \begin{tabular}{|c||c|c|c|c|c|c|c|} \hline
                    353:                & $C_7$ & $C_8$ & $K_7$ & $K_8$ & $K_9$ & $K_{10}$ & $K_{11}$ \\ \hline
                    354: Asir $Buchberger$      & 31 & 1687  & 2.6  & 27 & 294  & 4309 & --- \\ \hline
                    355: Singular & 8.7 & 278 & 0.6 & 5.6 & 54 & 508 & 5510 \\ \hline
                    356: CoCoA 4 & 241 & $>$ 5h & 3.8 & 35 & 402 &7021  & --- \\ \hline\hline
                    357: Asir $F_4$     & 5.3 & 129 & 0.5  & 4.5 & 31  & 273 & 2641 \\ \hline
                    358: FGb(estimated) & 0.9 & 23 & 0.1 & 0.8 & 6 & 51 & 366 \\ \hline
                    359: \end{tabular}
                    360: \end{center}
                    361: \caption{Groebner basis computation over $GF(32003)$}
                    362: \label{gbmod}
                    363: \end{table}
                    364:
                    365: \begin{table}[hbtp]
                    366: \begin{center}
1.5       noro      367: \begin{tabular}{|c||c|c|c|c|c|c|} \hline
                    368:                & $C_7$ & $Homog. C_7$ & $C_8$ & $K_7$ & $K_8$ & $McKay$ \\ \hline
                    369: Asir $Buchberger$      & 389 & 594 & 54000 & 29 & 299 & 34950 \\ \hline
                    370: Singular & --- & 15247 & --- & 7.6 & 79 & $>$ 20h \\ \hline
                    371: CoCoA 4 & --- & 13227 & --- & 57 & 709 & --- \\ \hline\hline
                    372: Asir $F_4$     &  989 & 456 & --- & 90 & 991 & 4939 \\ \hline
                    373: FGb(estimated) & 8 &11 & 288 &  0.6 & 5 & 10 \\ \hline
1.1       noro      374: \end{tabular}
                    375: \end{center}
                    376: \caption{Groebner basis computation over {\bf Q}}
                    377: \label{gbq}
                    378: \end{table}
                    379:
                    380: \begin{figure}[hbtp]
                    381: \begin{center}
                    382: \epsfxsize=12cm
1.6       noro      383: %\epsffile{../compalg/ps/blenall.ps}
                    384: \epsffile{blen.ps}
1.1       noro      385: \end{center}
                    386: \caption{Maximal coefficient bit length of intermediate bases}
                    387: \label{f4vsbuch}
                    388: \end{figure}
                    389:
1.5       noro      390: Table \ref{minipoly} shows timing data for the minimal polynomial
                    391: computation over {\bf Q}. Singular provides a function {\tt finduni}
                    392: for computing the minimal polynomial in each variable in ${\bf
                    393: Q}[x_1,\ldots,x_n]/I$ for zero dimensional ideal $I$. The modular
                    394: method used in Asir is efficient when the resulting minimal
                    395: polynomials have large coefficients and we can verify the fact from Table
                    396: \ref{minipoly}.
                    397: \begin{table}[hbtp]
                    398: \begin{center}
                    399: \begin{tabular}{|c||c|c|c|c|c|} \hline
                    400:                & $C_6$ & $C_7$ & $K_6$ & $K_7$ & $K_8$ \\ \hline
                    401: Singular & 0.9 & 846 & 307 & 60880 & ---  \\ \hline
                    402: Asir & 1.5 & 182 & 12 & 164 & 3420  \\ \hline
                    403: \end{tabular}
                    404: \end{center}
                    405: \caption{Minimal polynomial computation}
                    406: \label{minipoly}
                    407: \end{table}
                    408:
1.1       noro      409: \subsection{Polynomial factorization}
                    410:
1.3       noro      411: %Table \ref{unifac} shows timing data for univariate factorization over
                    412: %{\bf Q}.  $N_{i,j}$ is an irreducible polynomial which are hard to
                    413: %factor by the classical algorithm. $N_{i,j}$ is a norm of a polynomial
                    414: %and $\deg(N_i) = i$ with $j$ modular factors. Risa/Asir is
                    415: %disadvantageous in factoring polynomials of this type because the
                    416: %algorithm used in Risa/Asir has exponential complexity. In contrast,
                    417: %CoCoA 4\cite{COCOA} and NTL-5.2\cite{NTL} show nice performances
                    418: %because they implement recently developed algorithms.
                    419: %
                    420: %\begin{table}[hbtp]
                    421: %\begin{center}
                    422: %\begin{tabular}{|c||c|c|c|c|} \hline
                    423: %              & $N_{105,23}$ & $N_{120,20}$ & $N_{168,24}$ & $N_{210,54}$ \\ \hline
                    424: %Asir  & 0.86  & 59 & 840 & hard \\ \hline
                    425: %Asir NormFactor & 1.6         & 2.2& 6.1& hard \\ \hline
                    426: %%Singular& hard?      & hard?& hard? & hard? \\ \hline
                    427: %CoCoA 4 & 0.2         & 7.1   & 16 & 0.5 \\ \hline\hline
                    428: %NTL-5.2       & 0.16  & 0.9   & 1.4 & 0.4 \\ \hline
                    429: %\end{tabular}
                    430: %\end{center}
                    431: %\caption{Univariate factorization over {\bf Q}}
                    432: %\label{unifac}
                    433: %\end{table}
1.1       noro      434:
                    435: Table \ref{multifac} shows timing data for multivariate
                    436: factorization over {\bf Q}.
                    437: $W_{i,j,k}$ is a product of three multivariate polynomials
                    438: $Wang[i]$, $Wang[j]$, $Wang[k]$ given in a data file
                    439: {\tt fctrdata} in Asir library directory. It is also included
                    440: in Risa/Asir source tree and located in {\tt asir2000/lib}.
                    441: For these examples Risa/Asir shows reasonable performance
                    442: compared with other famous systems.
                    443: \begin{table}[hbtp]
                    444: \begin{center}
                    445: \begin{tabular}{|c||c|c|c|c|c|} \hline
                    446:        & $W_{1,2,3}$ & $W_{4,5,6}$ & $W_{7,8,9}$ & $W_{10,11,12}$ & $W_{13,14,15}$ \\ \hline
                    447: variables & 3 & 5 & 5 & 5 & 4 \\ \hline
                    448: monomials & 905 & 41369 & 51940 & 30988 & 3344 \\ \hline\hline
                    449: Asir   & 0.2 & 4.7 & 14 & 17 & 0.4 \\ \hline
                    450: %Singular& $>$15min    & ---   & ---& ---& ---\\ \hline
                    451: CoCoA 4 & 5.2 & $>$15min       & $>$15min & $>$15min & 117 \\ \hline\hline
                    452: Mathematica 4& 0.2     & 16    & 23 & 36 & 1.1 \\ \hline
                    453: Maple 7& 0.5   & 18    & 967  & 48 & 1.3 \\ \hline
                    454: \end{tabular}
                    455: \end{center}
                    456: \caption{Multivariate factorization over {\bf Q}}
                    457: \label{multifac}
                    458: \end{table}
1.3       noro      459: As to univariate factorization over {\bf Q},
                    460: the univariate factorizer implements only classical
1.5       noro      461: algorithms and its behavior is what one expects,
1.3       noro      462: that is, it shows average performance in cases
1.5       noro      463: where there are little extraneous factors, but
1.7     ! noro      464: shows poor performance for hard to factor polynomials with
        !           465: many extraneous factors.
1.3       noro      466:
1.1       noro      467: \section{OpenXM and Risa/Asir OpenXM interfaces}
                    468:
                    469: \subsection{OpenXM overview}
                    470:
                    471: OpenXM stands for Open message eXchange protocol for Mathematics.
1.5       noro      472: From the viewpoint of protocol design, it can be regarded as a child
                    473: of OpenMath \cite{OPENMATH}.  However our approach is somewhat
                    474: different. Our main purpose is to provide an environment for
                    475: integrating {\it existing} mathematical software systems. OpenXM
                    476: RFC-100 \cite{RFC100} defines a client-server architecture.  Under
                    477: this specification, a client invokes an OpenXM ({\it OX}) server.  The
                    478: client can send OpenXM ({\it OX}) messages to the server.  OX messages
                    479: consist of {\it data} and {\it command}. Data is encoded according to
                    480: the common mathematical object ({\it CMO}) format which defines
                    481: serialized representation of mathematical objects.  An OX server is a
                    482: stackmachine. If data is sent as an OX message, the server pushes the
                    483: data onto its stack. There is a common set of stackmachine commands
                    484: and each OX server understands its subset. The command set includes
                    485: stack manipulating commands and requests for execution of a procedure.
                    486: In addition, a server may accept its own command sequences if the
                    487: server wraps some interactive software. That is the server may be a
                    488: hybrid server.
1.1       noro      489:
                    490: OpenXM RFC-100 also defines methods for session management. In particular
                    491: the method to reset a server is carefully designed and it provides
                    492: a robust way of using servers both for interactive and non-interactive
                    493: purposes.
                    494:
                    495: \subsection{OpenXM client interface of {\tt asir}}
                    496:
                    497: Risa/Asir is a main client in OpenXM package.  The application {\tt
1.5       noro      498: asir} can access to OpenXM servers via several built-in interface
                    499: functions. and various interfaces to existing OpenXM servers are
                    500: prepared as user defined functions written in Asir language.
                    501: We show a typical OpenXM session.
1.1       noro      502:
                    503: \begin{verbatim}
                    504: [1] P = ox_launch();  /* invoke an OpenXM asir server */
                    505: 0
                    506: [2] ox_push_cmo(P,x^10-y^10);
                    507: /* push a polynomial onto the stack */
                    508: 0
                    509: [3] ox_execute_function(P,"fctr",1);  /* call factorizer */
                    510: 0
                    511: [4] ox_pop_cmo(P);  /* get the result from the stack */
                    512: [[1,1],[x^4+y*x^3+y^2*x^2+y^3*x+y^4,1],
                    513: [x^4-y*x^3+y^2*x^2-y^3*x+y^4,1],[x-y,1],[x+y,1]]
                    514: [5] ox_cmo_rpc(P,"fctr,",x^10000-2^10000*y^10000);
1.7     ! noro      515: /* call factorizer; a utility function */
1.1       noro      516: 0
                    517: [6] ox_reset(P); /* reset the computation in the server */
                    518: 1
                    519: [7] ox_shutdown(P); /* shutdown the server */
                    520: 0
                    521: \end{verbatim}
                    522:
                    523: \subsection{OpenXM server {\tt ox\_asir}}
                    524:
                    525: An application {\tt ox\_asir} is a wrapper of {\tt asir} and provides
                    526: all the functions of {\tt asir} to OpenXM clients. It completely
1.7     ! noro      527: implements the OpenXM reset protocol and also allows remote
1.5       noro      528: debugging of user programs running on the server. As an example we
                    529: show a program for checking whether a polynomial set is a Groebner
                    530: basis or not. A client executes {\tt gbcheck()} and servers execute
                    531: {\tt sp\_nf\_for\_gbcheck()} which is a simple normal form computation
1.7     ! noro      532: of an S-polynomial. First of all the client collects all critical pairs
1.1       noro      533: necessary for the check. Then the client requests normal form
                    534: computations to idling servers. If there are no idling servers the
                    535: clients waits for some servers to return results by {\tt
                    536: ox\_select()}, which is a wrapper of UNIX {\tt select()}. If we have
1.5       noro      537: large number of critical pairs to be processed, we can expect good
                    538: load balancing by {\tt ox\_select()}.
1.1       noro      539:
                    540: \begin{verbatim}
                    541: def gbcheck(B,V,O,Procs) {
                    542:   map(ox_reset,Procs);
                    543:   dp_ord(O); D = map(dp_ptod,B,V);
                    544:   L = dp_gr_checklist(D); DP = L[0]; Plist = L[1];
                    545:   /* register DP in servers */
                    546:   map(ox_cmo_rpc,Procs,"register_data_for_gbcheck",vtol(DP));
                    547:   /* discard return value in stack */
                    548:   map(ox_pop_cmo,Procs);
                    549:   Free = Procs; Busy = [];
                    550:   while ( Plist != [] || Busy != []  )
                    551:     if ( Free == [] || Plist == [] ) {
                    552:       /* someone is working; wait for data */
                    553:       Ready = ox_select(Busy);
                    554:          /* update Busy list and Free list */
                    555:       Busy = setminus(Busy,Ready); Free = append(Ready,Free);
                    556:       for ( ; Ready != []; Ready = cdr(Ready) )
                    557:         if ( ox_get(car(Ready)) != 0 ) {
                    558:                  /* a normal form is non zero */
                    559:           map(ox_reset,Procs); return 0;
                    560:         }
                    561:     } else {
                    562:          /* update Busy list and Free list */
                    563:       Id = car(Free); Free = cdr(Free); Busy = cons(Id,Busy);
                    564:          /* take a pair */
                    565:          Pair = car(Plist); Plist = cdr(Plist);
                    566:          /* request a normal form computation */
                    567:       ox_cmo_rpc(Id,"sp_nf_for_gbcheck",Pair);
                    568:       ox_push_cmd(Id,262); /* 262 = OX_popCMO */
                    569:     }
                    570:   map(ox_reset,Procs); return 1;
                    571: }
                    572: \end{verbatim}
                    573:
                    574: \subsection{Asir OpenXM library {\tt libasir.a}}
                    575:
1.7     ! noro      576: Asir OpenXM library {\tt libasir.a} contains functions simulating the
1.1       noro      577: stack machine commands supported in {\tt ox\_asir}.  By linking {\tt
                    578: libasir.a} an application can use the same functions as in {\tt
1.3       noro      579: ox\_asir} without accessing to {\tt ox\_asir} via TCP/IP. There is
1.7     ! noro      580: also a stack, which can be manipulated by the library functions. In
1.5       noro      581: order to make full use of this interface, one has to prepare
                    582: conversion functions between CMO and the data structures proper to the
1.7     ! noro      583: application itself.  A function {\tt asir\_ox\_pop\_string()} is
        !           584: provided to convert CMO to a human readable form, which may be
        !           585: sufficient for a simple use of this interface.
1.1       noro      586:
                    587: \section{Concluding remarks}
                    588: We have shown the current status of Risa/Asir and its OpenXM
                    589: interfaces. As a result of our policy of development, it is true that
                    590: Risa/Asir does not have abundant functions. However it is a completely
1.5       noro      591: open system and its total performance is not bad. Especially on
                    592: Groebner basis computation over {\bf Q}, many techniques for improving
                    593: practical performances have been implemented. As the OpenXM interface
                    594: specification is completely documented, we can easily add another
                    595: function to Risa/Asir by wrapping an existing software system as an OX
1.7     ! noro      596: server, and other clients can call functions in Risa/Asir by
        !           597: implementing the OpenXM client interface.  With the remote debugging
        !           598: and the function to reset servers, one will be able to enjoy parallel
        !           599: and distributed computation with OpenXM facilities.
1.1       noro      600: %
                    601: \begin{thebibliography}{7}
                    602: %
                    603: \addcontentsline{toc}{section}{References}
                    604:
                    605: \bibitem{ANY}
                    606: Anay, H., Noro, M., Yokoyama, K. (1996)
                    607: Computation of the Splitting fields and the Galois Groups of Polynomials.
                    608: Algorithms in Algebraic geometry and Applications,
                    609: Birkh\"auser (Proceedings of MEGA'94), 29--50.
                    610:
                    611: \bibitem{FPARA}
                    612: Jean-Charles Faug\`ere (1994)
                    613: Parallelization of Groebner basis.
                    614: Proceedings of PASCO'94, 124--132.
                    615:
                    616: \bibitem{F4}
                    617: Jean-Charles Faug\`ere (1999)
                    618: A new efficient algorithm for computing Groebner bases  ($F_4$).
                    619: Journal of Pure and Applied Algebra (139) 1-3 , 61--88.
                    620:
                    621: \bibitem{FGLM}
                    622: Faug\`ere, J.-C. et al. (1993)
                    623: Efficient computation of zero-dimensional Groebner bases by change of ordering.
                    624: Journal of Symbolic Computation 16, 329--344.
                    625:
                    626: \bibitem{RFC100}
                    627: M. Maekawa, et al. (2001)
                    628: The Design and Implementation of OpenXM-RFC 100 and 101.
                    629: Proceedings of ASCM2001, World Scientific, 102--111.
                    630:
                    631: \bibitem{RISA}
                    632: Noro, M. et al. (1994-2001)
                    633: A computer algebra system Risa/Asir.
                    634: {\tt http://www.openxm.org}, {\tt http://www.math.kobe-u.ac.jp/Asir/asir.html}.
                    635:
                    636: \bibitem{REPL}
                    637: Noro, M., McKay, J. (1997)
                    638: Computation of replicable functions on Risa/Asir.
                    639: Proceedings of PASCO'97, ACM Press, 130--138.
                    640:
                    641: \bibitem{NOYO}
                    642: Noro, M., Yokoyama, K. (1999)
                    643: A Modular Method to Compute the Rational Univariate
                    644: Representation of Zero-Dimensional Ideals.
                    645: Journal of Symbolic Computation, 28, 1, 243--263.
                    646:
                    647: \bibitem{OPENXM}
                    648: OpenXM committers (2000-2001)
                    649: OpenXM package.
                    650: {\tt http://www.openxm.org}.
1.7     ! noro      651:
        !           652: \bibitem{RUR}
        !           653: Rouillier, R. (1996)
        !           654: R\'esolution des syst\`emes z\'ero-dimensionnels.
        !           655: Doctoral Thesis(1996), University of Rennes I, France.
1.1       noro      656:
                    657: \bibitem{SY}
                    658: Shimoyama, T., Yokoyama, K. (1996)
                    659: Localization and Primary Decomposition of Polynomial Ideals.
                    660: Journal of Symbolic Computation, 22, 3, 247--277.
                    661:
                    662: \bibitem{TRAGER}
                    663: Trager, B.M. (1976)
                    664: Algebraic Factoring and Rational Function Integration.
                    665: Proceedings of SYMSAC 76, 219--226.
                    666:
                    667: \bibitem{TRAV}
                    668: Traverso, C. (1988)
                    669: Groebner trace algorithms.
                    670: LNCS {\bf 358} (Proceedings of ISSAC'88), Springer-Verlag, 125--138.
                    671:
1.5       noro      672: \bibitem{BENCH}
                    673: {\tt http://www.math.uic.edu/\~\,jan/demo.html}.
                    674:
1.1       noro      675: \bibitem{COCOA}
                    676: {\tt http://cocoa.dima.unige.it/}.
                    677:
                    678: \bibitem{FGB}
                    679: {\tt http://www-calfor.lip6.fr/\~\,jcf/}.
                    680:
1.5       noro      681: %\bibitem{NTL}
                    682: %{\tt http://www.shoup.net/}.
1.1       noro      683:
                    684: \bibitem{OPENMATH}
                    685: {\tt http://www.openmath.org/}.
                    686:
                    687: \bibitem{SINGULAR}
                    688: {\tt http://www.singular.uni-kl.de/}.
                    689:
                    690: \end{thebibliography}
                    691:
                    692: %INDEX%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    693: \clearpage
                    694: \addcontentsline{toc}{section}{Index}
                    695: \flushbottom
                    696: \printindex
                    697: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    698:
                    699: \end{document}
                    700:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>