=================================================================== RCS file: /home/cvs/OpenXM/doc/ascm2001/homogeneous-network.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -u -p -r1.3 -r1.4 --- OpenXM/doc/ascm2001/homogeneous-network.tex 2001/03/07 08:12:56 1.3 +++ OpenXM/doc/ascm2001/homogeneous-network.tex 2001/03/08 06:19:21 1.4 @@ -1,4 +1,4 @@ -% $OpenXM: OpenXM/doc/ascm2001/homogeneous-network.tex,v 1.2 2001/03/07 07:17:02 noro Exp $ +% $OpenXM: OpenXM/doc/ascm2001/homogeneous-network.tex,v 1.3 2001/03/07 08:12:56 noro Exp $ \subsection{Distributed computation with homogeneous servers} \label{section:homog} @@ -59,9 +59,9 @@ such as {\tt MPI\_Bcast} and {\tt MPI\_Reduce} respect sending $f_1$, $f_2$ and gathering $F_j$ may be reduced to $O(\log_2L)$ and we can expect better results in such a case. In order to implement such operations we need new specifications for inter-sever communication -and the session management. The will be proposed as OpenXM-RFC-102 in future. -We note that preliminary experiments shows the collective operations -works well on OpenXM. +and the session management, which will be proposed as OpenXM-RFC 102. +We note that preliminary experiments show the collective operations +work well on OpenXM. \subsubsection{Competitive distributed computation by various strategies} @@ -102,7 +102,7 @@ def dgr(G,V,O,P0,P1) \subsubsection{Nesting of client-server communication} -Under OpenXM-RFC-100 an OpenXM server can be a client of other servers. +Under OpenXM-RFC 100 an OpenXM server can be a client of other servers. Figure \ref{tree} illustrates a tree-like structure of an OpenXM client-server communication. \begin{figure} @@ -132,11 +132,11 @@ algorithms whose task can be divided into subtasks rec typical example is {\it quicksort}, where an array to be sorted is partitioned into two sub-arrays and the algorithm is applied to each sub-array. In each level of recursion, two subtasks are generated -and one can ask other OpenXM servers to execute them. Though -this makes little contribution to the efficiency, it is worth -to show that such an attempt is very easy under OpenXM. -Here is an Asir program. -A predefined constant {\tt LevelMax} determines +and one can ask other OpenXM servers to execute them. +Though it makes little contribution to the efficiency in the case of +quicksort, we present an Asir program of this distributed quicksort +to demonstrate that OpenXM gives an easy way to test this algorithm. +In the program, a predefined constant {\tt LevelMax} determines whether new servers are launched or whole subtasks are done on the server. \begin{verbatim} @@ -182,12 +182,13 @@ def quickSort(A,P,Q,Level) { \end{verbatim} Another example is a parallelization of the Cantor-Zassenhaus -algorithm for polynomial factorization over finite fields. Its -fundamental structure is similar to that of quicksort. By choosing a -random polynomial, a polynomial is divided into two sub-factors with -some probability. Then each subfactor is factorized recursively. In -the following program, one of the two sub-factors generated on a server -is sent to another server and the other subfactor is factorized on the server +algorithm for polynomial factorization over finite fields. +It is a recursive algorithm similar to quicksort. +At each level of the recursion, a given polynomial can be +divided into two non-trivial factors with some probability by using +a randomly generated polynomial as a {\it separator}. +In the following program, one of the two factors generated on a server +is sent to another server and the other factor is factorized on the server itself. \begin{verbatim} /* factorization of F */ @@ -198,11 +199,15 @@ def c_z(F,E,Level) if ( N == E ) return [F]; M = field_order_ff(); K = idiv(N,E); L = [F]; while ( 1 ) { + /* gererate a random polynomial */ W = monic_randpoly_ff(2*E,V); + /* compute a power of the random polynomial */ T = generic_pwrmod_ff(W,F,idiv(M^E-1,2)); if ( !(W = T-1) ) continue; + /* G = GCD(F,W^((M^E-1)/2)) mod F) */ G = ugcd(F,W); if ( deg(G,V) && deg(G,V) < N ) { + /* G is a non-trivial factor of F */ if ( Level >= LevelMax ) { /* everything is done on this server */ L1 = c_z(G,E,Level+1);