The Algorithms Implemented in RCWA

Apart from the method for factoring residue class-wise affine permutations of \Z into class transpositions, class shifts and class reflections, most mathematically interesting algorithms implemented in this package are described in the author's thesis in the form of constructive proofs. This chapter provides references to the corresponding theorems, and lists short descriptions of the other algorithms and methods implemented in this package. The word trivial as a description means that essentially nothing is done except of storing or recalling one or several values, and straightforward means that no sophisticated algorithm is used. The descriptions are kept very informal and short. They are listed in alphabetical order.

ActionOnRespectedPartition(G)
Straightforward
after having computed a respected partition by RespectedPartition. One only needs to know how to compute images of residue classes under affine mappings.
Ball(G,g,d)
Straightforward
.
Ball(G,p,d,act)
Straightforward
.
ClassReflection(r,m)
Trivial
.
ClassShift(r,m)
Trivial
.
ClassTransposition(r1,m1,r2,m2)
See Remark 2.9.2 in .
Coefficients(f)
Trivial
.
CoefficientsOnTrajectory(f,n,val,cond,all)
Iterated application of an rcwa mapping, and composition of affine mappings.
CommonRightInverse(l,r)
Straightforward
if one knows how to compute images of residue classes under affine mappings, and how to compute inverses of affine mappings.
DecreasingOn(f)
Form the union of the residue classes which are determined by the coefficients as indicated.
Determinant(sigma)
Evaluation of the given expression. For the mathematical meaning (epimorphism!), see Theorem 2.11.9 in .
DirectProduct(G1,G2, ... )
Restrict the groups G1, G2, ... to disjoint residue classes. See Restriction and Corollary 2.3.3 in .
Display(f)
Trivial
.
Divisor(f)
Lcm of coefficients, as indicated.
FactorizationIntoCSCRCT(g)
This uses a rather sophisticated method which will likely some time be published elsewhere. At the moment termination is not guaranteed, but in case of termination the result is certain. The strategy is roughly first to make the mapping class-wise order-preserving and balanced, and then to remove all prime factors from multiplier and divisor one after the other in decreasing order by dividing by appropriate class transpositions. The remaining integral mapping can be factored almost similarly easily as a permutation of a finite set can be factored into transpositions.
FactorizationOnConnectedComponents(f,m)
Call `GRAPE` to get the connected components of the transition graph, and then compute a partition of the suitably blown up coefficient list corresponding to the connected components.
FixedPointsOfAffinePartialMappings(f)
Straightforward
.
GuessedDivergence(f)
Numerical computation of the limit of some series, which seems to converge often. Caution!!!
Image(f)
, Image(f,S)
Straightforward
if one can compute images of residue classes under affine mappings and unite and intersect residue classes (Chinese Remainder Theorem). See Lemma 1.2.1 in .
ImageDensity(f)
Evaluation of the given expression.
g in G
(membership test)
Test whether the mapping g or its inverse is in the list of generators of G. If it is, return true. Test whether its prime set is a subset of the prime set of G. If not, return false. Test if G is class-wise order-preserving, and g is not. If so, return false. Test if the sign of g is -1 and all generators of G have sign 1. If yes, return false. Test if G is class-wise order-preserving, all generators of G have determinant 0 and g has determinant \neq 0. If yes, return false. Test whether the support of g is a subset of the support of G. If not, return false.

If G is not tame, try to factor g into generators of G using PreImagesRepresentative. If successful, return true. If g is in G, this terminates after a finite number of steps. Both runtime and memory requirements are exponential in the word length. If g is not in G, it runs into an infinite loop. If G is tame, proceed as follows:

Test whether the modulus of g divides the modulus of G. If not, return false. Test whether G is finite and g has infinite order. If so, return false. Test whether g is tame. If not, return false. Compute a respected partition P of G and the finite permutation group H induced by G on it (see RespectedPartition). Check whether g permutes P. If not, return false. Let h be the permutation induced by g on P. Check whether h lies in H. If not, return false.

If G is class-wise order-preserving, do the following: Compute an element g1 of G which acts on P like g. For this purpose, factor h into generators of H using PreImagesRepresentative. Compute the corresponding product of generators of G. Set k := g/g1. The mapping k is necessarily integral. Compute the kernel K of the action of G on P using KernelOfActionOnRespectedPartition. Check whether k lies in the kernel of the action of G on P by using SolutionIntMat to decide membership of the coefficient vector (second entry of each triple) of k in the lattice spanned by the rows of the matrix KernelOfActionOnRespectedPartitionHNFMat(G). If it is contained, return true.

If membership still has not been decided yet, try to factor g into generators of G using PreImagesRepresentative. If successful, return true. If g is in G, this terminates after a finite number of steps. Both runtime and memory requirements are exponential in the word length. If g is not in G, the method runs into an infinite loop.
IncreasingOn(f)
Form the union of the residue classes which are determined by the coefficients as indicated.
IntegralConjugate(f)
, IntegralConjugate(G)
Uses the algorithm described in the proof of Theorem 2.5.14 in .
IntegralizingConjugator(f)
, IntegralizingConjugator(G)
Uses the algorithm described in the proof of Theorem 2.5.14 in .
Inverse(f)
Essentially inversion of affine mappings. See Lemma 1.3.1, Part (b) in .
IsClassWiseOrderPreserving(f)
Test whether the first entry of all coefficient triples is positive.
IsConjugate(RCWA(Integers),f,g)
Test whether f and g have the same order, and whether either both or none of them is tame. If not, return false.

If the mappings are wild, use ShortCycles to search for finite cycles not belonging to an infinite series, until their numbers for a particular length differ. This may run into an infinite loop. If it terminates, return false.

If the mappings are tame, use the method described in the proof of Theorem 2.5.14 in to construct integral conjugates of f and g. Then essentially use the algorithm described in the proof of Theorem 2.6.7 in to compute standard representatives of the conjugacy classes which the integral conjugates of f and g belong to. Finally compare these standard representatives, and return true if they are equal and false if not.
IsInjective(f)
See Image.
IsIntegral(f)
Trivial
.
IsomorphismMatrixGroup(G)
Use the algorithm described in the proof of Theorem 2.6.3 in .
IsomorphismPermGroup(G)
If G is wild or KernelOfActionOnRespectedPartition is not trivial, return fail. Otherwise use ActionOnRespectedPartition.
IsomorphismRcwaGroup(G)
The method for finite groups uses RcwaMapping, Part (d).

The method for free products of finite groups uses the Table-Tennis Lemma (which is also known as Ping-Pong Lemma, cp. e.g. Section II.B. in ). It uses regular permutation representations of the factors G_r (r = 0, \dots ,m-1) of the free product on residue classes modulo n_r := |G_r|. The basic idea is that since point stabilizers in regular permutation groups are trivial, all non-identity elements map any of the permuted residue classes into their complements. To get into a situation where the Table-Tennis Lemma is applicable, the method computes conjugates of the images of the mentioned permutation representations under bijective rcwa mappings \sigma_r which satisfy 0(n_r)^{\sigma_r} = \mathbb{Z} \setminus r(m).

The method for free groups uses an adaptation of the construction given on page 27 in from PSL(2,\mathbb{C}) to RCWA(\mathbb{Z}). As an equivalent for the closed discs used there, the method takes the residue classes modulo two times the rank of the free group.
IsSurjective(f)
See Image.
IsTame(G)
Checks whether the modulus of the group is non-zero.
IsTame(f)
Application of the criteria given in Corollary 2.5.10 and 2.5.12 and Theorem A.8 and A.11 in . For applying the last-mentioned criterium (existence of weakly-connected components of the transition graph which are not strongly-connected), `GRAPE` is needed.

In addition, some probabilistic methods are used. If the result depends on one of these, a warning is displayed.
IsTransitive(G,Integers)
Look for finite orbits, using ShortOrbits on a couple of intervals. If a finite orbit is found, return false. Test if G is finite. If yes, return false.

Search for an element g and a residue class r(m) such that the restriction of g to r(m) is given by n \mapsto n + m. Then the cyclic group generated by g acts transitively on r(m). The element g is searched among the generators of G, its powers, its commutators, powers of its commutators and products of few different generators. The search for such an element may run into an infinite loop, as there is no guarantee that the group has a suitable element.

If suitable g and r(m) are found, proceed as follows:

Set S := r(m). Set S := S \cup S^g for all generators g of G, and repeat this until S remains constant. This may run into an infinite loop.

If it terminates: If S = \mathbb{Z}, return true, otherwise return false.
KernelOfActionOnRespectedPartition(G)
Use a random walk through the group G. Compute powers of elements encountered along the way which fix the respected partition of G which has been computed by RespectedPartition. Get vectors from these powers by taking the second entry of each coefficient triple. Form a lattice out of these vectors. Stop if for a while all found vectors already belong to this lattice (this is probabilistic). Bring the lattice to Hermite Normal Form, and transform the rows of the resulting matrix back to rcwa mappings generating the kernel.
KernelOfActionOnRespectedPartitionHNFMat(G)
This is a spin-off of KernelOfActionOnRespectedPartition.
LargestSourcesOfAffineMappings(f)
Form unions of residue classes modulo the modulus of the mapping, whose corresponding coefficient triples are equal.
LaTeXObj(f)
Collect residue classes those corresponding coefficient triples are equal.
LikelyContractionCentre(f,maxn,bound)
Compute trajectories with starting values from a given interval, until a cycle is reached. Abort if the trajectory exceeds the prescribed bound. Form the union of the detected cycles.
LocalizedRcwaMapping(f,p)
Trivial
.
mKnot(m)
Straightforward
, following the definition given in .
Modulus(G)
Searches for a wild element in the group. If unsuccessful, tries to construct a respected partition (see RespectedPartition).
Modulus(f)
Trivial
.
MovedPoints(G)
Needs only forming unions of residue classes and determining fixed points of affine mappings.
Multiplier(f)
Lcm of coefficients, as indicated.
Multpk(f,p,k)
Form the union of the residue classes modulo the modulus of the mapping, which are determined by the given divisibility criteria for the coefficients of the corresponding affine mapping.
NrConjugacyClassesOfRCWAZOfOrder(ord)
The class numbers are taken from Corollary 2.7.1 in .
OrbitsModulo(f,m)
Use `GRAPE` to compute the connected components of the transition graph.
OrbitsModulo(G,m)
Straightforward
.
Order(f)
Test for IsTame. If the mapping is not tame, then return infinity. Otherwise use Corollary 2.5.10 in .
PreImage(f,S)
See Image.
PreImagesRepresentative(phi,g)
, PreImagesRepresentatives(phi,g)
As indicated in the documentation of these methods. The underlying idea to successively compute two balls around 1 and g until they intersect non-trivially is standard in computational group theory. For rcwa groups it would mean wasting both memory and runtime to actually compute group elements. Thus only images of tuples of points are computed and stored.
PrimeSet(f)
, PrimeSet(G)
Straightforward
.
PrimeSwitch(p)
Multiplication of rcwa mappings as indicated.
Print(f)
Trivial
.
f*g
Essentially composition of affine mappings. See Lemma 1.3.1, Part (a) in .
Random(RCWA(Integers))
Computes a product of randomly chosen class shifts, class reflections and class transpositions. This seems to be suitable for generating reasonably good examples.
RankOfKernelOfActionOnRespectedPartition(G)
This is a spin-off of KernelOfActionOnRespectedPartition.
RCWA(R)
Attributes are set according to Theorem 2.1.1, Theorem 2.1.2, Corollary 2.1.6 and Theorem 2.12.8 in .
RcwaGroupByPermGroup(G)
Uses RcwaMapping, Part (d).
RcwaMapping
(a)-(c): trivial, (d): n&circum;perm - n for determining the coefficients, (e): affine mappings by values at two given points, (f) and (g): trivial, (h) and (i): correspond to Lemma 2.1.4 in .
RepresentativeAction(G,src,dest,act)
, RepresentativeActionPreImage
As indicated in the documentation of these methods. The underlying idea to successively compute two balls around src and dest until they intersect non-trivially is standard in computational group theory. Words standing for products of generators of G are stored for any image of src or dest.
RepresentativeAction(G,P1,P2)
Arbitrary mapping: see Lemma 2.1.4 in . Tame mapping: see proof of Theorem 2.8.9 in . The former is almost trivial, while the latter is a bit complicate and takes usually also much more time.
RepresentativeAction(RCWA(Integers),f,g)
The algorithm used by IsConjugate constructs actually also an element x such that f&circum;x = g.
RespectedPartition(f)
, RespectedPartition(G)
Uses the algorithm described in the proof of Theorem 2.5.8 in .
Restriction(g,f)
Computes images (n&circum;g)&circum;f and preimages n&circum;f for sufficiently many integers n under the image of g under the restriction monomorphism associated to f. Then it constructs the desired mapping by RcwaMapping(m,values). Finally, the result is checked by a direct verification that the diagram in Definition 2.3.1 in commutes.
Restriction(G,f)
Get a set of generators by applying Restriction(g,f) to the generators g of G.
Root(f,k)
If f is bijective, class-wise order-preserving and has finite order:

Find a conjugate of f which is a product of class transpositions. Slice cycles \prod_{i=2}^l \tau_{r_1(m_1),r_i(m_i)} of f a respected partition \mathcal{P} into cycles \prod_{i=1}^l \prod_{j=0}^{k-1} \tau_{r_1(km_1),r_i+jm_i(km_i)} of the k-fold length on the refined partition which one gets from \mathcal{P} by decomposing any r_i(m_i) \in \mathcal{P} into residue classes (mod km_i). Finally conjugate the resulting permutation back.

Other cases seem to be more difficult and are currently not covered.
SemilocalizedRcwaMapping(f,pi)
Trivial
.
ShortCycles(f,maxlng)
Look for fixed points of affine partial mappings of powers of f.
ShortOrbits(G,S,maxlng)
Straightforward
.
SetOnWhichMappingIsClassWiseOrderPreserving(f)
, etc.
Form the union of the residue classes modulo the modulus of the mapping, in whose corresponding coefficient triple the first entry is positive, zero resp. negative.
Sign(sigma)
Evaluation of the given expression. For the mathematical meaning (epimorphism!), see Theorem 2.12.8 in .
Size(G)
Test whether the group G is tame. If not, return infinity. Otherwise use ActionOnRespectedPartition to compute the permutation group H induced by G on a respected partition P, and KernelOfActionOnRespectedPartition to compute the kernel K of the action of G on P. The group K is infinite if and only if one of its generators has infinite order. Return the product of the order of H and the order of K.
f+g
Pointwise addition of affine mappings.
Trajectory(f,n,...)
Iterated application of an rcwa mapping. In the methods computing accumulated coefficients additionally composition of affine mappings.
TransitionGraph(f,m)
Straightforward
-- just check a sufficiently long interval.
TransitionMatrix(f,m)
Evaluation of the given expression.
ViewObj(f)
Trivial
.
WreathProduct(G,P)
Uses DirectProduct to embed the DegreeAction(P)th direct power of G, and RcwaMapping, Part (d) to embed the finite permutation group P.
WreathProduct(G,Z)
Restricts G to the residue class 3(4), and encodes the generator of Z as \tau_{0(2),1(2)} \cdot \tau_{0(2),1(4)}. It is used that the images of 3(4) under powers of this mapping are pairwise disjoint residue classes.