Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

610986 views
1
2
7 Examples
3
4
This chapter discusses a number of examples of rcwa mappings and -groups in
5
detail. All of them show different aspects of the package, and the order in
6
which they appear is entirely arbitrary. In particular they are not ordered
7
by degree of difficulty or interest.
8
9
The rcwa mappings, rcwa groups and other objects defined in this chapter can
10
be found in the file pkg/rcwa/examples/examples.g. This file can be read
11
into the current GAP session by the function LoadRCWAExamples (6.1-1) which
12
takes no arguments and returns the name of a variable which the record
13
containing the examples got assigned to. The global variable assignments
14
made in a section of this chapter can be made by applying the function
15
AssignGlobals to the respective component of the examples record. The
16
component names are given at the end of the corresponding sections.
17
18
The discussions of the examples are typically far from being exhaustive. It
19
is quite likely that in many instances by just a few little modifications or
20
additional easy commands you can find out interesting things yourself --
21
have fun!
22
23
24
7.1 Thompson's group V
25
26
Thompson's group V, also known as Higman-Thompson group, is a finitely
27
presented infinite simple group. This group has been found by Graham Higman,
28
cf. [Hig74]. We show that the group
29
30
 Example 
31

32
gap> G := Group(List([[0,2,1,4],[0,4,1,4],[1,4,2,4],[2,4,3,4]],
33
>  ClassTransposition));
34
<(0(2),1(4)),(0(4),1(4)),(1(4),2(4)),(2(4),3(4))>
35

36

37
38
is isomorphic to Thompson's group V. This isomorphism has been pointed out
39
by John P. McDermott. We take a slightly different set of generators:
40
41
 Example 
42

43
gap> k := ClassTransposition(0,2,1,2);;
44
gap> l := ClassTransposition(1,2,2,4);;
45
gap> m := ClassTransposition(0,2,1,4);;
46
gap> n := ClassTransposition(1,4,2,4);;
47
gap> H := Group(k,l,m,n);
48
<(0(2),1(2)),(1(2),2(4)),(0(2),1(4)),(1(4),2(4))>
49
gap> G = H; # k, l, m and n generate G as well
50
true
51

52

53
54
Now we verify that our four generators satisfy the relations given on
55
page 50 in [Hig74], when we read k as κ, l as λ, m as μ and n as ν:
56
57
 Example 
58

59
gap> HigmanThompsonRels :=
60
> [ k^2, l^2, m^2, n^2, # (1) in Higman's book
61
>  l*k*m*k*l*n*k*n*m*k*l*k*m, # (2) "
62
>  k*n*l*k*m*n*k*l*n*m*n*l*n*m, # (3) "
63
>  (l*k*m*k*l*n)^3, (m*k*l*k*m*n)^3, # (4) "
64
>  (l*n*m)^2*k*(m*n*l)^2*k, # (5) "
65
>  (l*n*m*n)^5, # (6) "
66
>  (l*k*n*k*l*n)^3*k*n*k*(m*k*n*k*m*n)^3*k*n*k*n,# (7) "
67
>  ((l*k*m*n)^2*(m*k*l*n)^2)^3, # (8) "
68
>  (l*n*l*k*m*k*m*n*l*n*m*k*m*k)^4, # (9) "
69
>  (m*n*m*k*l*k*l*n*m*n*l*k*l*k)^4, #(10) "
70
>  (l*m*k*l*k*m*l*k*n*k)^2, #(11) "
71
>  (m*l*k*m*k*l*m*k*n*k)^2 ]; #(12) "
72
[ IdentityMapping( Integers ), IdentityMapping( Integers ), 
73
 IdentityMapping( Integers ), IdentityMapping( Integers ), 
74
 IdentityMapping( Integers ), IdentityMapping( Integers ), 
75
 IdentityMapping( Integers ), IdentityMapping( Integers ), 
76
 IdentityMapping( Integers ), IdentityMapping( Integers ), 
77
 IdentityMapping( Integers ), IdentityMapping( Integers ), 
78
 IdentityMapping( Integers ), IdentityMapping( Integers ), 
79
 IdentityMapping( Integers ), IdentityMapping( Integers ) ]
80

81

82
83
We conclude that our group is an homomorphic image of Thompson's group V.
84
But since Thompson's group V is simple and our group is not trivial, this
85
means indeed that the two groups are isomorphic.
86
87
In fact it is straightforward to show that G is the group CT([2],Integers)
88
which is generated by the set of all class transpositions which interchange
89
residue classes modulo powers of 2. First we check that G contains all 11
90
class transpositions which interchange residue classes modulo 2 or 4:
91
92
 Example 
93

94
gap> S := Filtered(List(ClassPairs(4),ClassTransposition),
95
>  ct->Mod(ct) in [2,4]);
96
[ ( 0(2), 1(2) ), ( 0(2), 1(4) ), ( 0(2), 3(4) ), ( 0(4), 1(4) ), 
97
 ( 0(4), 2(4) ), ( 0(4), 3(4) ), ( 1(2), 0(4) ), ( 1(2), 2(4) ), 
98
 ( 1(4), 2(4) ), ( 1(4), 3(4) ), ( 2(4), 3(4) ) ]
99
gap> IsSubset(G,S);
100
true
101

102

103
104
Then we give a function which takes a class transposition τ ∈ CT_∅(ℤ), and
105
which returns a factorization of an element γ satisfying τ^γ ∈ S into g_1 :=
106
τ_0(2),1(4) ∈ S, g_2 := τ_0(2),3(4) ∈ S, g_3 := τ_1(2),0(4) ∈ S, g_4 :=
107
τ_1(2),2(4) ∈ S, h_1 := τ_0(4),1(4) ∈ S and h_2 := τ_1(4),2(4) ∈ S:
108
109
 GAP code 
110

111
ReducingConjugator := function ( tau )
112

113
 local w, F, g1, g2, g3, g4, h1, h2, h, cls, cl, r;
114

115
 g1 := ClassTransposition(0,2,1,4); h1 := ClassTransposition(0,4,1,4);
116
 g2 := ClassTransposition(0,2,3,4); h2 := ClassTransposition(1,4,2,4);
117
 g3 := ClassTransposition(1,2,0,4);
118
 g4 := ClassTransposition(1,2,2,4);
119

120
 F := FreeGroup("g1","g2","g3","g4","h1","h2");
121

122
 w := One(F); if Mod(tau) <= 4 then return w; fi;
123

124
 # Before we can reduce the moduli of the interchanged residue classes,
125
 # we must make sure that both of them have at least modulus 4.
126
 cls := TransposedClasses(tau);
127
 if Mod(cls[1]) = 2 then
128
 if Residue(cls[1]) = 0 then
129
 if Residue(cls[2]) mod 4 = 1 then tau := tau^g2; w := w * F.2;
130
 else tau := tau^g1; w := w * F.1; fi;
131
 else
132
 if Residue(cls[2]) mod 4 = 0 then tau := tau^g4; w := w * F.4;
133
 else tau := tau^g3; w := w * F.3; fi;
134
 fi;
135
 fi;
136

137
 while Mod(tau) > 4 do # Now we can successively reduce the moduli.
138
 if not ForAny(AllResidueClassesModulo(2),
139
 cl -> IsEmpty(Intersection(cl,Support(tau))))
140
 then
141
 cls := TransposedClasses(tau);
142
 h := Filtered([h1,h2],
143
 hi->Length(Filtered(cls,cl->IsSubset(Support(hi),cl)))=1);
144
 h := h[1]; tau := tau^h;
145
 if h = h1 then w := w * F.5; else w := w * F.6; fi;
146
 fi;
147
 cl := TransposedClasses(tau)[2]; # class with larger modulus
148
 r := Residue(cl);
149
 if r mod 4 = 1 then tau := tau^g1; w := w * F.1;
150
 elif r mod 4 = 3 then tau := tau^g2; w := w * F.2;
151
 elif r mod 4 = 0 then tau := tau^g3; w := w * F.3;
152
 elif r mod 4 = 2 then tau := tau^g4; w := w * F.4; fi;
153
 od;
154

155
 return w;
156
end;
157

158

159
160
After assigning g1, g2, g3, g4, h1 and h2 appropriately, we obtain for
161
example:
162
163
 Example 
164

165
gap> ReducingConjugator(ClassTransposition(3,16,34,256));
166
h2*g1*h1*g1*h1*g1*h1*g1*h2*g2*h2*g4*h2*g4*h2*g3
167
gap> gamma := h2*g1*h1*g1*h1*g1*h1*g1*h2*g2*h2*g4*h2*g4*h2*g3;
168
<rcwa permutation of Z with modulus 256>
169
gap> ct := ClassTransposition(3,16,34,256)^gamma;;
170
gap> IsClassTransposition(ct);;
171
gap> ct;
172
ClassTransposition(1,4,2,4)
173

174

175
176
Thompson's group V can also be embedded in a natural way into CT(GF(2)[x]):
177
178
 Example 
179

180
gap> x := Indeterminate(GF(2));; SetName(x,"x");
181
gap> R := PolynomialRing(GF(2),1);;
182
gap> k := ClassTransposition(0,x,1,x);;
183
gap> l := ClassTransposition(1,x,x,x^2);;
184
gap> m := ClassTransposition(0,x,1,x^2);;
185
gap> n := ClassTransposition(1,x^2,x,x^2);;
186
gap> G := Group(k,l,m,n);
187
<rcwa group over GF(2)[x] with 4 generators>
188

189

190
191
The correctness of this representation can likewise be verified by simply
192
checking the defining relations given above.
193
194
Enter AssignGlobals(LoadRCWAExamples().HigmanThompson); in order to assign
195
the global variables defined in this section.
196
197
198
7.2 Factoring Collatz' permutation of the integers
199
200
In 1932, Lothar Collatz mentioned in his notebook the following permutation
201
of the integers:
202
203
 Example 
204

205
gap> Collatz := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);;
206
gap> Display(Collatz);
207

208
Rcwa mapping of Z with modulus 3
209

210
 /
211
 | 2n/3 if n in 0(3)
212
 n |-> < (4n-1)/3 if n in 1(3)
213
 | (4n+1)/3 if n in 2(3)
214
 \
215

216
gap> ShortCycles(Collatz,[-50..50],50); # There are some finite cycles:
217
[ [ 0 ], [ -1 ], [ 1 ], [ 2, 3 ], [ -2, -3 ], [ 4, 5, 7, 9, 6 ], 
218
 [ -4, -5, -7, -9, -6 ], 
219
 [ 44, 59, 79, 105, 70, 93, 62, 83, 111, 74, 99, 66 ], 
220
 [ -44, -59, -79, -105, -70, -93, -62, -83, -111, -74, -99, -66 ] ]
221

222

223
224
The cycle structure of Collatz' permutation has not been completely
225
determined yet. In particular it is not known whether the cycle containing 8
226
is finite or infinite. Nevertheless, the factorization routine included in
227
this package can determine a factorization of this permutation into class
228
transpositions, i.e. involutions interchanging two disjoint residue classes:
229
230
 Example 
231

232
gap> Collatz in CT(Integers); # `Collatz' lies in the simple group CT(Z).
233
true
234
gap> Length(Factorization(Collatz));
235
212
236

237

238
239
Setting the Info level of InfoRCWA equal to 2 (simply issue RCWAInfo(2);)
240
causes the factorization routine to display detailed information on the
241
progress of the factoring process. For reasons of saving space, this is not
242
done in this manual.
243
244
We would like to get a factorization into fewer factors. Firstly, we try to
245
factor the inverse -- just like the various options interpreted by the
246
factorization routine, this has influence on decisions taken during the
247
factoring process:
248
249
 Example 
250

251
gap> Length(Factorization(Collatz^-1));
252
129
253

254

255
256
This is already a shorter product, but can still be improved. We remember
257
the mKnot's, of which the permutation mKnot(3) looks very similar to
258
Collatz' permutation. Therefore it is straightforward to try to factor both
259
mKnot(3) and Collatz/mKnot(3), and to look whether the sum of the numbers of
260
factors is less than 129:
261
262
 Example 
263

264
gap> KnotFacts := Factorization(mKnot(3));;
265
gap> QuotFacts := Factorization(Collatz/mKnot(3));;
266
gap> List([KnotFacts,QuotFacts],Length);
267
[ 59, 9 ]
268
gap> CollatzFacts := Concatenation(QuotFacts,KnotFacts);
269
[ ( 0(6), 4(6) ), ( 0(6), 5(6) ), ( 0(6), 3(6) ), ( 0(6), 1(6) ), 
270
 ( 0(6), 2(6) ), ( 2(3), 4(6) ), ( 0(3), 4(6) ), ( 2(3), 1(6) ), 
271
 ( 0(3), 1(6) ), ( 0(36), 35(36) ), ( 0(36), 22(36) ), 
272
 ( 0(36), 18(36) ), ( 0(36), 17(36) ), ( 0(36), 14(36) ), 
273
 ( 0(36), 20(36) ), ( 0(36), 4(36) ), ( 2(36), 8(36) ), 
274
 ( 2(36), 16(36) ), ( 2(36), 13(36) ), ( 2(36), 9(36) ), 
275
 ( 2(36), 7(36) ), ( 2(36), 6(36) ), ( 2(36), 3(36) ), 
276
 ( 2(36), 10(36) ), ( 2(36), 15(36) ), ( 2(36), 12(36) ), 
277
 ( 2(36), 5(36) ), ( 21(36), 28(36) ), ( 21(36), 33(36) ), 
278
 ( 21(36), 30(36) ), ( 21(36), 23(36) ), ( 21(36), 34(36) ), 
279
 ( 21(36), 31(36) ), ( 21(36), 27(36) ), ( 21(36), 25(36) ), 
280
 ( 21(36), 24(36) ), ( 26(36), 32(36) ), ( 26(36), 29(36) ), 
281
 ( 10(18), 35(36) ), ( 5(18), 35(36) ), ( 10(18), 17(36) ), 
282
 ( 5(18), 17(36) ), ( 8(12), 14(24) ), ( 6(9), 17(18) ), 
283
 ( 3(9), 17(18) ), ( 0(9), 17(18) ), ( 6(9), 16(18) ), ( 3(9), 16(18) ),
284
 ( 0(9), 16(18) ), ( 6(9), 11(18) ), ( 3(9), 11(18) ), ( 0(9), 11(18) ),
285
 ( 6(9), 4(18) ), ( 3(9), 4(18) ), ( 0(9), 4(18) ), ( 0(6), 14(24) ), 
286
 ( 0(6), 2(24) ), ( 8(12), 17(18) ), ( 7(12), 17(18) ), 
287
 ( 8(12), 11(18) ), ( 7(12), 11(18) ), PrimeSwitch(3)^-1, 
288
 ( 7(12), 17(18) ), ( 2(6), 17(18) ), ( 0(3), 17(18) ), 
289
 PrimeSwitch(3)^-1, PrimeSwitch(3)^-1, PrimeSwitch(3)^-1 ]
290
gap> Product(CollatzFacts) = Collatz; # Check.
291
true
292

293

294
295
The factors PrimeSwitch(3) are products of 6 class transpositions
296
(cf. PrimeSwitch (2.5-2)).
297
298
Enter AssignGlobals(LoadRCWAExamples().CollatzlikePerms); in order to assign
299
the global variables defined in this section.
300
301
302
7.3 The 3n+1 group
303
304
The following group acts transitively on the set of positive integers for
305
which the 3n+1 conjecture holds and which are not divisible by 6:
306
307
 Example 
308

309
gap> a := ClassTransposition(1,2,4,6);;
310
gap> b := ClassTransposition(1,3,2,6);;
311
gap> c := ClassTransposition(2,3,4,6);;
312
gap> G := Group(a,b,c);
313
<(1(2),4(6)),(1(3),2(6)),(2(3),4(6))>
314
gap> LoadDatabaseOfGroupsGeneratedBy3ClassTranspositions();
315
"3CTsGroups6"
316
gap> 3CTsGroups6.Id3CTsGroup(G,3CTsGroups6.grps); # 'catalogue number' of G
317
44132
318

319

320
321
To see this, consider the action of G on the 3n+1 tree. The vertices of this
322
tree are the positive integers for which the 3n+1 conjecture holds, and for
323
every vertex n there is an edge from n to T(n), where T denotes the Collatz
324
mapping
325
326
/
327
| n/2 if n even,
328
T: Z -> Z, n |-> <
329
| (3n+1)/2 if n odd
330
\
331
332
(cf. Chapter 1). It is easy to check that for every vertex n, either a, b or
333
c maps n to T(n), and that the other two generators either fix n or map it
334
to one of its preimages under T. So the 3n+1 conjecture is equivalent to the
335
assertion that the group G acts transitively on N ∖ 0(6). First let's have a
336
look at balls of small radius about 1 under the action of G -- these consist
337
of those numbers whose trajectory under T reaches 1 quickly:
338
339
 Example 
340

341
gap> Ball(G,1,5,OnPoints);
342
[ 1, 2, 4, 5, 8, 10, 16, 32, 64 ]
343
gap> Ball(G,1,10,OnPoints);
344
[ 1, 2, 3, 4, 5, 8, 10, 13, 16, 20, 21, 26, 32, 40, 52, 53, 64, 80, 85, 
345
 128, 160, 170, 256, 320, 340, 341, 512, 1024, 2048 ]
346
gap> Ball(G,1,15,OnPoints);
347
[ 1, 2, 3, 4, 5, 7, 8, 10, 11, 13, 16, 17, 20, 21, 22, 23, 26, 32, 34, 
348
 35, 40, 44, 45, 46, 52, 53, 64, 68, 69, 70, 75, 80, 85, 104, 106, 113, 
349
 128, 136, 140, 141, 151, 160, 170, 208, 212, 213, 226, 227, 256, 272, 
350
 277, 280, 301, 302, 320, 340, 341, 416, 424, 452, 453, 454, 512, 640, 
351
 680, 682, 832, 848, 853, 904, 908, 909, 1024, 1280, 1360, 1364, 1365, 
352
 1664, 1696, 1706, 1808, 1813, 1816, 2048, 2560, 2720, 2728, 4096, 
353
 5120, 5440, 5456, 5461, 8192, 10240, 10880, 10912, 10922, 16384, 
354
 32768, 65536 ]
355
gap> Ball(G,1,15,OnPoints:Spheres);
356
[ [ 1 ], [ 2, 4 ], [ 8 ], [ 16 ], [ 5, 32 ], [ 10, 64 ], 
357
 [ 3, 20, 21, 128 ], [ 40, 256 ], [ 13, 80, 85, 512 ], 
358
 [ 26, 160, 170, 1024 ], [ 52, 53, 320, 340, 341, 2048 ], 
359
 [ 17, 104, 106, 113, 640, 680, 682, 4096 ], 
360
 [ 34, 35, 208, 212, 213, 226, 227, 1280, 1360, 1364, 1365, 8192 ], 
361
 [ 11, 68, 69, 70, 75, 416, 424, 452, 453, 454, 2560, 2720, 2728, 16384 
362
 ], 
363
 [ 22, 23, 136, 140, 141, 151, 832, 848, 853, 904, 908, 909, 5120, 
364
 5440, 5456, 5461, 32768 ], 
365
 [ 7, 44, 45, 46, 272, 277, 280, 301, 302, 1664, 1696, 1706, 1808, 
366
 1813, 1816, 10240, 10880, 10912, 10922, 65536 ] ]
367
gap> List(Ball(G,1,50,OnPoints:Spheres),Length);
368
[ 1, 2, 1, 1, 2, 2, 4, 2, 4, 4, 6, 8, 12, 14, 17, 20, 26, 32, 43, 52, 
369
 66, 81, 104, 133, 170, 211, 271, 335, 424, 542, 686, 873, 1096, 1376, 
370
 1730, 2205, 2794, 3522, 4429, 5611, 7100, 8978, 11343, 14296, 18058, 
371
 22828, 28924, 36532, 46146, 58399, 73713 ]
372
gap> FloatQuotientsList(last);
373
[ 2., 0.5, 1., 2., 1., 2., 0.5, 2., 1., 1.5, 1.33333, 1.5, 1.16667, 
374
 1.21429, 1.17647, 1.3, 1.23077, 1.34375, 1.2093, 1.26923, 1.22727, 
375
 1.28395, 1.27885, 1.2782, 1.24118, 1.28436, 1.23616, 1.26567, 1.2783, 
376
 1.26568, 1.27259, 1.25544, 1.25547, 1.25727, 1.27457, 1.26712, 
377
 1.26056, 1.25752, 1.26688, 1.26537, 1.26451, 1.26342, 1.26034, 
378
 1.26315, 1.26415, 1.26704, 1.26303, 1.26317, 1.26553, 1.26223 ]
379
gap> Difference(Filtered([1..100],n->n mod 6 <> 0),Ball(G,1,40,OnPoints));
380
[ 27, 31, 41, 47, 55, 62, 63, 71, 73, 82, 83, 91, 94, 95, 97 ]
381
gap> T := RcwaMapping([[1,0,2],[3,1,2]]);;
382
gap> List(last2,n->Length(Trajectory(T,n,[1])));
383
[ 71, 68, 70, 67, 72, 69, 69, 66, 74, 71, 71, 60, 68, 68, 76 ]
384

385

386
387
It is convenient to define an epimorphism from the free group of rank 3 to
388
G:
389
390
 Example 
391

392
gap> F := FreeGroup("a","b","c");
393
<free group on the generators [ a, b, c ]>
394
gap> phi := EpimorphismByGenerators(F,G);
395
[ a, b, c ] -> [ ( 1(2), 4(6) ), ( 1(3), 2(6) ), ( 2(3), 4(6) ) ]
396

397

398
399
We can compute balls about 1 in G:
400
401
 Example 
402

403
gap> B := Ball(G,One(G),7:Spheres);;
404
gap> List(B,Length);
405
[ 1, 3, 6, 12, 24, 48, 96, 192 ]
406
gap> List(B[3],Order);
407
[ 12, infinity, infinity, infinity, infinity, 12 ]
408
gap> List(B[3],g->PreImagesRepresentative(phi,g));
409
[ b*a, c*b, c*a, b*c, a*c, a*b ]
410
gap> g := a*b;; Order(g);;
411
gap> Display(g);
412

413
Rcwa permutation of Z with modulus 18, of order 12
414

415
( 1(6), 8(36), 4(18), 2(12) ) ( 3(6), 20(36), 10(18) )
416
( 5(6), 32(36), 16(18) )
417

418

419

420
421
Spending some more time to compute B := Ball(G,One(G),12:Spheres);;, one can
422
check that (ab)^12 is the shortest word in the generators of G which does
423
not represent the identity in the free product of 3 cyclic groups of order
424
2, but which represents the identity in G. However, the group G has elements
425
of other finite orders as well -- for example:
426
427
 Example 
428

429
gap> g := (b*a)^3*b*c;; Order(g);;
430
gap> Display(g);
431

432
Rcwa permutation of Z with modulus 36, of order 105
433

434
( 8(9), 16(18), 64(72), 256(288), 85(96), 128(144), 32(36) )
435
( 7(12), 11(18), 22(36) ) ( 5(18), 10(36), 40(144), 13(48), 
436
 20(72) ) ( 1(24), 2(36), 4(72) ) ( 14(36), 28(72), 112(288), 
437
 37(96), 56(144) )
438

439
gap> Order(a*c*b*a*b*c*a*c);
440
60
441

442

443
444
With some more efforts, one finds that e.g. (abc)^2c^b has order 616, that
445
(abc)^2b has order 2310, that (ab)^2a^ca^bc has order 27720, and that
446
a(c(ab)^2)^2 has order 65520. Of course G has many elements of infinite
447
order as well. Some of them have infinite cycles, like e.g.
448
449
 Example 
450

451
gap> g := b*c;;
452
gap> Display(g);
453

454
Rcwa permutation of Z with modulus 12
455

456
 /
457
 | 4n if n in 1(3)
458
 | 2n if n in 5(6)
459
 n |-> < n/2 if n in 2(12)
460
 | n/4 if n in 8(12)
461
 | n if n in 0(3)
462
 \
463

464
gap> Sinks(g);
465
[ 4(12) ]
466
gap> Trajectory(g,last[1],10);
467
[ 4(12), 16(48), 64(192), 256(768), 1024(3072), 4096(12288), 
468
 16384(49152), 65536(196608), 262144(786432), 1048576(3145728) ]
469
gap> Trajectory(g,4,20);
470
[ 4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, 
471
 16777216, 67108864, 268435456, 1073741824, 4294967296, 17179869184, 
472
 68719476736, 274877906944, 1099511627776 ]
473

474

475
476
Others seem to have only finite cycles. Some of these appear to have on
477
average comparatively short cycles, like e.g.
478
479
 Example 
480

481
gap> g := a*b*a*c*b*c;
482
<rcwa permutation of Z with modulus 144>
483
gap> cycs := ShortCycles(g,[0..10000],100,10^20);;
484
gap> Difference([0..10000],Union(cycs));
485
[ ]
486
gap> Collected(List(cycs,Length));
487
[ [ 1, 2222 ], [ 3, 1945 ], [ 4, 1111 ], [ 5, 93 ], [ 6, 926 ], 
488
 [ 7, 31 ], [ 8, 864 ], [ 9, 10 ], [ 10, 289 ], [ 11, 4 ], [ 12, 95 ], 
489
 [ 13, 1 ], [ 14, 31 ], [ 16, 12 ], [ 18, 4 ], [ 20, 1 ] ]
490

491

492
493
If the cycle of g containing some n ∈ ℤ is finite and has a certain length
494
l, then there is some m ∈ ℤ such that for every k ∈ ℤ the cycle of g
495
containing n + km has length l as well. Thus, in other words, every finite
496
cycle of g belongs to a cycle of residue classes. (This is a special
497
property of g which is not shared by every rcwa permutation -- cf. e.g.
498
Collatz' permutation from Section 7.2.) We can find some of these infinitely
499
many residue class cycles:
500
501
 Example 
502

503
gap> cycsrc := ShortResidueClassCycles(g,Mod(g),20);
504
[ [ 0(6) ], [ 3(6), 160(288), 20(36) ], 
505
 [ 7(18), 352(864), 44(108), 28(72) ], 
506
 [ 11(18), 544(864), 2896(4608), 362(576), 68(108), 88(144) ], 
507
 [ 13(18), 640(864), 80(108), 52(72) ], [ 10(36) ], [ 34(36) ], 
508
 [ 1(54), 64(2592), 8(324), 4(216), 16(1152), 2(144) ], 
509
 [ 5(54), 256(2592), 1360(13824), 170(1728), 32(324), 40(432), 
510
 208(2304), 26(288) ], 
511
 [ 17(54), 832(2592), 4432(13824), 23632(73728), 2954(9216), 554(1728), 
512
 104(324), 136(432) ], 
513
 [ 37(54), 1792(2592), 224(324), 148(216), 784(1152), 98(144) ], 
514
 [ 41(54), 1984(2592), 10576(13824), 1322(1728), 248(324), 328(432), 
515
 1744(2304), 218(288) ], 
516
 [ 53(54), 2560(2592), 13648(13824), 72784(73728), 9098(9216), 
517
 1706(1728), 320(324), 424(432) ], [ 38(72), 58(108), 304(576) ], 
518
 [ 62(72), 94(108), 496(576) ] ]
519
gap> List(cycsrc,Length);
520
[ 1, 3, 4, 6, 4, 1, 1, 6, 8, 8, 6, 8, 8, 3, 3 ]
521
gap> Sum(List(Flat(cycsrc),cl->1/Mod(cl)));
522
97459/110592
523
gap> Float(last); # about 88% 'coverage'
524
0.881248
525
gap> cycsrc := ShortResidueClassCycles(g,3*Mod(g),20);
526
[ [ 0(6) ], [ 3(6), 160(288), 20(36) ], 
527
 [ 7(18), 352(864), 44(108), 28(72) ], 
528
 [ 11(18), 544(864), 2896(4608), 362(576), 68(108), 88(144) ], 
529
 [ 13(18), 640(864), 80(108), 52(72) ], [ 10(36) ], [ 34(36) ], 
530
 [ 1(54), 64(2592), 8(324), 4(216), 16(1152), 2(144) ], 
531
 [ 5(54), 256(2592), 1360(13824), 170(1728), 32(324), 40(432), 
532
 208(2304), 26(288) ], 
533
 [ 17(54), 832(2592), 4432(13824), 23632(73728), 2954(9216), 554(1728), 
534
 104(324), 136(432) ], 
535
 [ 37(54), 1792(2592), 224(324), 148(216), 784(1152), 98(144) ], 
536
 [ 41(54), 1984(2592), 10576(13824), 1322(1728), 248(324), 328(432), 
537
 1744(2304), 218(288) ], 
538
 [ 53(54), 2560(2592), 13648(13824), 72784(73728), 9098(9216), 
539
 1706(1728), 320(324), 424(432) ], [ 38(72), 58(108), 304(576) ], 
540
 [ 62(72), 94(108), 496(576) ], 
541
 [ 23(162), 1120(7776), 5968(41472), 746(5184), 140(972), 184(1296), 
542
 976(6912), 5200(36864), 650(4608), 122(864) ], 
543
 [ 35(162), 1696(7776), 9040(41472), 48208(221184), 257104(1179648), 
544
 32138(147456), 6026(27648), 1130(5184), 212(972), 280(1296) ], 
545
 [ 73(162), 3520(7776), 440(972), 292(648), 1552(3456), 8272(18432), 
546
 1034(2304), 194(432) ], 
547
 [ 77(162), 3712(7776), 19792(41472), 2474(5184), 464(972), 616(1296), 
548
 3280(6912), 17488(36864), 2186(4608), 410(864) ], 
549
 [ 89(162), 4288(7776), 22864(41472), 121936(221184), 650320(1179648), 
550
 81290(147456), 15242(27648), 2858(5184), 536(972), 712(1296) ], 
551
 [ 127(162), 6112(7776), 764(972), 508(648), 2704(3456), 14416(18432), 
552
 1802(2304), 338(432) ], 
553
 [ 14(216), 22(324), 112(1728), 592(9216), 74(1152) ], 
554
 [ 86(216), 130(324), 688(1728), 3664(9216), 458(1152) ] ]
555
gap> List(cycsrc,Length);
556
[ 1, 3, 4, 6, 4, 1, 1, 6, 8, 8, 6, 8, 8, 3, 3, 10, 10, 8, 10, 10, 8, 5, 
557
 5 ]
558
gap> Sum(List(Flat(cycsrc),Density));
559
5097073/5308416
560
gap> Float(last); # already about 96% 'coverage'
561
0.960187
562

563

564
565
There are also some elements of infinite order whose cycles seem to be all
566
finite, but on average pretty long -- e.g.
567
568
 Example 
569

570
gap> g := (b*a*c)^2*a;;
571
gap> Display(g);
572

573
Rcwa permutation of Z with modulus 288
574

575
 /
576
 | (16n-1)/3 if n in 1(3)
577
 | (9n+5)/4 if n in 3(24) U 11(24)
578
 | (27n+19)/4 if n in 15(24) U 23(24)
579
 | (3n+1)/4 if n in 5(24)
580
 | (n-3)/6 if n in 21(24)
581
 | (27n+29)/8 if n in 9(48) U 41(48)
582
 | (9n+7)/8 if n in 17(48) U 33(48)
583
 | (2n-7)/9 if n in 8(36)
584
 n |-> < (4n-11)/9 if n in 32(36)
585
 | (27n+38)/8 if n in 14(48)
586
 | (3n+2)/8 if n in 26(48)
587
 | (9n+10)/8 if n in 38(48)
588
 | (3n+4)/4 if n in 20(72)
589
 | n/4 if n in 56(72)
590
 | (9n+14)/16 if n in 2(96)
591
 | (27n+58)/16 if n in 50(96)
592
 | n if n in 0(6)
593
 \
594

595
gap> List([1..100],n->Length(Cycle(g,n)));
596
[ 6, 1, 6, 6, 6, 1, 194, 6, 216, 26, 26, 1, 26, 194, 65, 26, 26, 1, 216, 
597
 26, 6, 216, 46, 1, 640, 26, 70, 194, 216, 1, 70, 26, 216, 216, 26, 1, 
598
 194, 216, 73, 26, 110, 1, 194, 216, 194, 111, 39, 1, 194, 640, 640, 
599
 194, 26, 1, 171, 194, 204, 640, 216, 1, 111, 70, 91, 26, 194, 1, 216, 
600
 216, 26, 111, 65, 1, 50, 194, 26, 216, 640, 1, 502, 26, 111, 40, 110, 
601
 1, 26, 194, 385, 640, 88, 1, 100, 111, 65, 110, 416, 1, 171, 194, 194, 
602
 640 ]
603
gap> Length(Cycle(g,25));
604
640
605
gap> Maximum(Cycle(g,25));
606
323270249684063829
607
gap> Length(Cycle(g,25855));
608
4751
609
gap> Maximum(Cycle(g,25855));
610
507359605810239426786254778159924369135184044618585904603866210104085
611
gap> cycs := ShortCycles(g,[0..50000],10000,10^100);;
612
gap> S := [0..50000];;
613
gap> for cyc in cycs do S := Difference(S,cyc); od;
614
gap> S; # no cycle containing some n in [0..50000] has length > 10000 
615
[ ]
616

617

618
619
Taking a look at the lengths of the trajectories of the Collatz mapping T
620
starting at the points in a cycle, we can see how a cycle of g goes up and
621
down in the 3n+1 tree:
622
623
 Example 
624

625
gap> List(Cycle(g,25),n->Length(Trajectory(T,n,[1])));
626
[ 17, 21, 25, 29, 33, 31, 35, 34, 32, 33, 37, 41, 45, 44, 42, 39, 43, 
627
 41, 45, 44, 42, 43, 40, 38, 35, 39, 37, 41, 40, 44, 48, 46, 50, 49, 
628
 47, 48, 45, 42, 46, 44, 48, 47, 45, 46, 50, 49, 47, 43, 41, 38, 39, 
629
 36, 34, 30, 27, 31, 29, 33, 32, 30, 31, 35, 33, 37, 36, 40, 39, 43, 
630
 41, 45, 44, 42, 43, 47, 51, 55, 53, 57, 56, 54, 55, 59, 58, 62, 66, 
631
 64, 68, 67, 65, 66, 63, 60, 64, 62, 66, 65, 63, 64, 68, 67, 65, 61, 
632
 59, 56, 52, 49, 53, 51, 55, 54, 52, 53, 57, 55, 59, 58, 56, 57, 54, 
633
 50, 48, 45, 49, 47, 51, 50, 54, 52, 56, 55, 53, 54, 58, 62, 66, 70, 
634
 74, 72, 76, 75, 79, 83, 87, 91, 90, 94, 93, 97, 95, 99, 98, 96, 97, 
635
 94, 91, 88, 85, 89, 87, 91, 90, 88, 89, 86, 84, 81, 85, 83, 87, 86, 
636
 90, 94, 98, 97, 101, 105, 109, 107, 111, 110, 108, 109, 113, 117, 115, 
637
 119, 118, 122, 126, 125, 123, 120, 124, 122, 126, 125, 123, 124, 121, 
638
 119, 116, 117, 114, 111, 115, 113, 117, 116, 114, 115, 119, 123, 122, 
639
 120, 117, 121, 119, 123, 122, 120, 121, 118, 116, 112, 110, 106, 103, 
640
 107, 105, 109, 108, 106, 107, 111, 109, 113, 112, 116, 114, 118, 117, 
641
 115, 116, 113, 110, 111, 108, 104, 102, 99, 103, 101, 105, 104, 108, 
642
 106, 110, 109, 107, 108, 112, 111, 109, 105, 102, 103, 100, 98, 95, 
643
 92, 96, 94, 98, 97, 95, 96, 93, 91, 88, 92, 90, 94, 93, 97, 101, 105, 
644
 109, 108, 106, 103, 107, 105, 109, 108, 106, 107, 104, 102, 99, 103, 
645
 101, 105, 104, 108, 112, 110, 114, 113, 111, 112, 116, 115, 113, 109, 
646
 106, 110, 108, 112, 111, 109, 110, 114, 112, 116, 115, 113, 114, 111, 
647
 107, 105, 102, 103, 100, 98, 95, 99, 97, 101, 100, 104, 103, 107, 105, 
648
 109, 108, 106, 107, 104, 101, 98, 99, 96, 94, 91, 92, 89, 87, 84, 85, 
649
 82, 80, 77, 81, 79, 83, 82, 86, 85, 89, 88, 86, 83, 80, 81, 78, 76, 
650
 73, 74, 71, 68, 72, 70, 74, 73, 71, 72, 76, 80, 79, 83, 87, 91, 90, 
651
 88, 85, 89, 87, 91, 90, 88, 89, 86, 84, 81, 85, 83, 87, 86, 90, 94, 
652
 92, 96, 95, 93, 94, 98, 96, 100, 99, 97, 98, 102, 106, 110, 114, 113, 
653
 111, 108, 112, 110, 114, 113, 111, 112, 109, 107, 104, 108, 106, 110, 
654
 109, 113, 117, 115, 119, 118, 116, 117, 114, 111, 115, 113, 117, 116, 
655
 114, 115, 119, 118, 116, 112, 110, 107, 108, 105, 103, 100, 104, 102, 
656
 106, 105, 109, 108, 112, 110, 114, 113, 111, 112, 116, 115, 113, 109, 
657
 106, 103, 104, 101, 99, 95, 91, 88, 92, 90, 94, 93, 91, 92, 96, 94, 
658
 98, 97, 95, 96, 100, 98, 102, 101, 105, 104, 102, 99, 100, 97, 93, 89, 
659
 87, 84, 85, 82, 80, 77, 74, 78, 76, 80, 79, 77, 78, 75, 73, 69, 67, 
660
 64, 68, 66, 70, 69, 73, 71, 75, 74, 72, 73, 70, 67, 68, 65, 63, 60, 
661
 64, 62, 66, 65, 69, 68, 66, 63, 64, 61, 59, 56, 60, 58, 62, 61, 65, 
662
 64, 62, 59, 60, 57, 55, 51, 48, 49, 46, 44, 40, 37, 34, 35, 32, 28, 
663
 26, 23, 27, 25, 29, 28, 32, 30, 34, 33, 31, 32, 36, 35, 33, 29, 26, 
664
 27, 24, 22, 19, 23, 21, 25, 24, 28, 27, 25, 22, 23, 20, 18, 14, 18, 
665
 22, 20, 24, 23, 21, 22, 19, 16, 20, 18, 22, 21, 19, 20, 24, 23, 21, 
666
 17, 15, 17, 15, 19, 18, 16 ]
667
gap> lngs := List(Cycle(g,25855),n->Length(Trajectory(T,n,[1])));;
668
gap> Minimum(lngs);
669
55
670
gap> Maximum(lngs);
671
521
672
gap> Position(lngs,55);
673
15
674
gap> Position(lngs,521);
675
2807
676

677

678
679
Finally let's have a look at elements of G with small modulus:
680
681
 Example 
682

683
gap> B := RestrictedBall(G,One(G),20,36:Spheres);;
684
gap> List(B,Length);
685
[ 1, 3, 6, 12, 4, 6, 6, 4, 4, 4, 6, 6, 3, 3, 2, 0, 0, 0, 0, 0, 0 ]
686
gap> Sum(last);
687
70
688
gap> Position(last2,0)-2;
689
14
690

691

692
693
So we have 70 elements of modulus 36 or less in G which can be reached from
694
the identity by successive multiplication with generators without passing
695
elements with mudulus exceeding 36. Further we see that the longest word in
696
the generators yielding an element with modulus at most 36 has length 14.
697
Now we double our bound on the modulus:
698
699
 Example 
700

701
gap> B := RestrictedBall(G,One(G),100,72:Spheres);;
702
gap> List(B,Length);
703
[ 1, 3, 6, 12, 22, 14, 18, 22, 24, 26, 26, 34, 35, 32, 37, 38, 46, 58, 
704
 65, 73, 82, 91, 93, 96, 110, 121, 114, 117, 146, 138, 148, 168, 174, 
705
 196, 215, 214, 232, 255, 280, 305, 315, 359, 377, 371, 363, 366, 397, 
706
 419, 401, 405, 405, 401, 407, 415, 435, 424, 401, 359, 338, 330, 332, 
707
 281, 278, 271, 269, 254, 255, 257, 258, 258, 233, 215, 202, 185, 154, 
708
 121, 88, 55, 35, 20, 10, 5, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
709
 0, 0, 0, 0, 0 ]
710
gap> Sum(last);
711
15614
712
gap> Position(last2,0)-2;
713
83
714
gap> Collected(List(Flat(B),Modulus));
715
[ [ 1, 1 ], [ 6, 3 ], [ 12, 4 ], [ 18, 2 ], [ 24, 4 ], [ 36, 56 ], 
716
 [ 48, 4 ], [ 72, 15540 ] ]
717

718

719
720
We observe that there are 15540 elements in G with modulus 72 which are
721
reachable from the identity by successive multiplication with generators
722
without passing elements with mudulus exceeding 72. Further we see that the
723
longest word in the generators yielding an element with modulus at most 72
724
has length 83.
725
726
It is obvious that many questions regarding the group G remain open.
727
728
729
7.4 A group with huge finite orbits
730
731
In this section we investigate a group which has huge finite orbits on ℤ.
732
733
 Example 
734

735
gap> a := ClassTransposition(0,2,1,2);;
736
gap> b := ClassTransposition(0,5,4,5);;
737
gap> c := ClassTransposition(1,4,0,6);;
738
gap> G := Group(a,b,c);
739
<(0(2),1(2)),(0(5),4(5)),(1(4),0(6))>
740
gap> LoadDatabaseOfGroupsGeneratedBy3ClassTranspositions();
741
"3CTsGroups6"
742
gap> 3CTsGroups6.Id3CTsGroup(G,3CTsGroups6.grps); # 'catalogue number' of G
743
1284
744

745

746
747
We look for orbits of length at most 100 containing an integer in the range
748
[0..1000]:
749
750
 Example 
751

752
gap> orbs := ShortOrbits(G,[0..1000],100);;
753
gap> List(orbs,Length);
754
[ 16, 2, 24, 2, 2, 2, 8, 2, 8, 2, 2, 8, 2, 8, 2, 2, 2, 40, 2, 8, 24, 2, 
755
 8, 2, 2, 8, 2, 24, 8, 2, 56, 2, 2, 2, 8, 2, 8, 2, 2, 8, 2, 8, 2, 2, 2, 
756
 24, 2, 8, 2, 8, 2, 2, 8, 2, 8, 2, 24, 2, 2, 2, 8, 2, 8, 2, 2, 8, 2, 8, 
757
 2, 2, 2, 2, 8, 24, 2, 8, 2, 2, 8, 2, 24, 8, 2, 2, 2, 2, 8, 2, 8, 2, 2, 
758
 8, 2, 8, 2, 2, 2, 24, 2, 8, 2, 8, 2, 2, 8, 2, 8, 2, 24, 2, 2 ]
759
gap> Collected(last);
760
[ [ 2, 67 ], [ 8, 32 ], [ 16, 1 ], [ 24, 9 ], [ 40, 1 ], [ 56, 1 ] ]
761
gap> Length(Difference([0..1000],Union(orbs)));
762
491
763

764

765
766
So almost half of the integers in the range [0..1000] lie in orbits of
767
length larger than 100. In fact there are much larger orbits. For example:
768
769
 Example 
770

771
gap> B := Ball(G,32,500,OnPoints:Spheres);; # compute ball about 32
772
gap> Position(B,[]); # <> fail -> we have exhausted the orbit
773
354
774
gap> Sum(List(B,Length)); # the orbit length
775
6296
776
gap> Maximum(Flat(B)); # the largest integer in the orbit
777
3301636381609509797437679
778
gap> B := Ball(G,736,5000,OnPoints:Spheres);; # the same for 736 ...
779
gap> Position(B,[]);
780
2997
781
gap> Sum(List(B,Length)); # the orbit length for this time
782
495448
783
gap> Maximum(Flat(B));
784
2461374276522713949036151811903149785690151467356354652860276957152301465\
785
0546360696627187194849439881973442451686685024708652634593861146709752378\
786
847078493406287854573381920553713155967741550498839
787

788

789
790
It seems that the cycles of abc completely traverse all orbits of G, with
791
the only exception of the orbit of 0. Let's check this in the above
792
examples:
793
794
 Example 
795

796
gap> g := a*b*c;;
797
gap> Display(g);
798

799
Rcwa permutation of Z with modulus 60
800

801
 /
802
 | n-1 if n in 3(30) U 9(30) U 17(30) U 23(30) U 27(30) U 
803
 | 29(30)
804
 | 3n/2 if n in 0(20) U 12(20) U 16(20)
805
 | n+1 if n in 2(20) U 6(20) U 10(20)
806
 | (2n+1)/3 if n in 7(30) U 13(30) U 19(30)
807
 | n+3 if n in 1(30) U 11(30)
808
 n |-> < n-5 if n in 15(30) U 25(30)
809
 | (3n+12)/2 if n in 4(20)
810
 | (3n-12)/2 if n in 8(20)
811
 | n+5 if n in 14(20)
812
 | n-3 if n in 18(20)
813
 | (2n-7)/3 if n in 5(30)
814
 | (2n+9)/3 if n in 21(30)
815
 \
816

817
gap> Length(Cycle(g,32));
818
6296
819
gap> Length(Cycle(g,736));
820
495448
821

822

823
824
Representatives and lengths of the cycles of g which intersect nontrivially
825
with the range [0..1000] are as follows:
826
827
 Example 
828

829
gap> CycleRepresentativesAndLengths(g,[0..1000]:notify:=50000);
830
n = 736: after 50000 steps, the iterate has 157 binary digits.
831
n = 736: after 100000 steps, the iterate has 135 binary digits.
832
n = 736: after 150000 steps, the iterate has 131 binary digits.
833
n = 736: after 200000 steps, the iterate has 507 binary digits.
834
n = 736: after 250000 steps, the iterate has 414 binary digits.
835
n = 736: after 300000 steps, the iterate has 457 binary digits.
836
n = 736: after 350000 steps, the iterate has 465 binary digits.
837
n = 736: after 400000 steps, the iterate has 325 binary digits.
838
n = 736: after 450000 steps, the iterate has 534 binary digits.
839
n = 896: after 50000 steps, the iterate has 359 binary digits.
840
n = 896: after 100000 steps, the iterate has 206 binary digits.
841
[ [ 1, 15 ], [ 2, 2 ], [ 16, 24 ], [ 22, 2 ], [ 26, 2 ], [ 32, 6296 ], 
842
 [ 46, 2 ], [ 52, 8 ], [ 56, 296 ], [ 62, 2 ], [ 76, 8 ], [ 82, 2 ], 
843
 [ 86, 2 ], [ 92, 8 ], [ 106, 2 ], [ 112, 104 ], [ 116, 8 ], 
844
 [ 122, 2 ], [ 136, 440 ], [ 142, 2 ], [ 146, 2 ], [ 152, 40 ], 
845
 [ 166, 2 ], [ 172, 8 ], [ 176, 24 ], [ 182, 2 ], [ 196, 8 ], 
846
 [ 202, 2 ], [ 206, 2 ], [ 212, 8 ], [ 226, 2 ], [ 232, 24 ], 
847
 [ 236, 8 ], [ 242, 2 ], [ 256, 56 ], [ 262, 2 ], [ 266, 2 ], 
848
 [ 272, 408 ], [ 286, 2 ], [ 292, 8 ], [ 296, 104 ], [ 302, 2 ], 
849
 [ 316, 8 ], [ 322, 2 ], [ 326, 2 ], [ 332, 8 ], [ 346, 2 ], 
850
 [ 352, 264 ], [ 356, 8 ], [ 362, 2 ], [ 376, 1304 ], [ 382, 2 ], 
851
 [ 386, 2 ], [ 392, 24 ], [ 406, 2 ], [ 412, 8 ], [ 416, 200 ], 
852
 [ 422, 2 ], [ 436, 8 ], [ 442, 2 ], [ 446, 2 ], [ 452, 8 ], 
853
 [ 466, 2 ], [ 472, 104 ], [ 476, 8 ], [ 482, 2 ], [ 496, 24 ], 
854
 [ 502, 2 ], [ 506, 2 ], [ 512, 696 ], [ 526, 2 ], [ 532, 8 ], 
855
 [ 536, 3912 ], [ 542, 2 ], [ 556, 8 ], [ 562, 2 ], [ 566, 2 ], 
856
 [ 572, 8 ], [ 586, 2 ], [ 592, 888 ], [ 596, 8 ], [ 602, 2 ], 
857
 [ 616, 728 ], [ 622, 2 ], [ 626, 2 ], [ 632, 2776 ], [ 646, 2 ], 
858
 [ 652, 8 ], [ 656, 24 ], [ 662, 2 ], [ 676, 8 ], [ 682, 2 ], 
859
 [ 686, 2 ], [ 692, 8 ], [ 706, 2 ], [ 712, 24 ], [ 716, 8 ], 
860
 [ 722, 2 ], [ 736, 495448 ], [ 742, 2 ], [ 746, 2 ], [ 752, 1272 ], 
861
 [ 766, 2 ], [ 772, 8 ], [ 776, 376 ], [ 782, 2 ], [ 796, 8 ], 
862
 [ 802, 2 ], [ 806, 2 ], [ 812, 8 ], [ 826, 2 ], [ 832, 120 ], 
863
 [ 836, 8 ], [ 842, 2 ], [ 856, 2264 ], [ 862, 2 ], [ 866, 2 ], 
864
 [ 872, 24 ], [ 886, 2 ], [ 892, 8 ], [ 896, 132760 ], [ 902, 2 ], 
865
 [ 916, 8 ], [ 922, 2 ], [ 926, 2 ], [ 932, 8 ], [ 946, 2 ], 
866
 [ 952, 456 ], [ 956, 8 ], [ 962, 2 ], [ 976, 24 ], [ 982, 2 ], 
867
 [ 986, 2 ], [ 992, 1064 ] ]
868

869

870
871
So far the author has checked that all positive integers less than 173176
872
lie in finite cycles of g. Several of them are longer than 1000000, and the
873
cycle containing 25952 has length 245719352. Whether the cycle containing
874
173176 is finite or infinite has not been checked so far -- in any case it
875
is longer than 5700000000, and it exceeds 10^40000. Presumably it is finite
876
as well, but checking this may require a lot of computing time.
877
878
On the one hand the cycles of g seem to behave randomly, perhaps as if they
879
would ascend or descend from one point to the next by a certain factor
880
depending on which side a thrown coin falls on. -- In this model, cycles
881
would be finite with probability 1 since the simple random walk on ℤ is
882
recurrent. On the other, there seems to be quite some structure on them,
883
however little is known so far.
884
885
First we observe that each orbit under the action of G seems to split into
886
two cycles of h := abcacb of the same length (of course this has been
887
checked for many more orbits than those shown here):
888
889
 Example 
890

891
gap> h := a*b*c*a*c*b;
892
<rcwa permutation of Z with modulus 360>
893
gap> List(CyclesOnFiniteOrbit(G,h,32),Length);
894
[ 3148, 3148 ]
895
gap> List(CyclesOnFiniteOrbit(G,h,736),Length);
896
[ 247724, 247724 ]
897

898

899
900
One cycle seems to contain the points at the odd positions and the other
901
seems to contain the points at the even positions in the cycle of g:
902
903
 Example 
904

905
gap> cycle_g := Cycle(g,32);;
906
gap> positions1 := List(Cycle(h,32),n->Position(cycle_g,n));;
907
gap> Collected(positions1 mod 2);
908
[ [ 1, 3148 ] ]
909
gap> positions2 := List(Cycle(h,33),n->Position(cycle_g,n));;
910
gap> Collected(positions2 mod 2);
911
[ [ 0, 3148 ] ]
912

913

914
915
However the ordering in which these points are traversed looks pretty
916
scrambled:
917
918
 Example 
919

920
gap> positions1{[1..200]};
921
[ 1, 6271, 6291, 6281, 6285, 6287, 6283, 6289, 6273, 6275, 6277, 6279, 
922
 6293, 5, 15, 17, 19, 6259, 6261, 6263, 6265, 21, 23, 25, 41, 6227, 
923
 6229, 6231, 6233, 6235, 6237, 6239, 43, 53, 55, 57, 63, 59, 61, 65, 
924
 45, 47, 49, 51, 67, 6223, 6221, 69, 6163, 6215, 6205, 6209, 6211, 
925
 6207, 6213, 6165, 6171, 6177, 6179, 6181, 6183, 6175, 6173, 6185, 
926
 6189, 6191, 6187, 6193, 6169, 6167, 6195, 6199, 6201, 6197, 6203, 
927
 6217, 73, 83, 85, 87, 103, 113, 115, 117, 4357, 4361, 4363, 4359, 
928
 4365, 4371, 4373, 4375, 4377, 4369, 4367, 4379, 119, 121, 123, 125, 
929
 129, 131, 127, 133, 139, 141, 143, 145, 137, 135, 147, 149, 151, 153, 
930
 155, 159, 161, 157, 163, 169, 175, 4283, 4281, 177, 4271, 4273, 4275, 
931
 4277, 181, 4255, 4257, 4259, 4261, 4263, 4265, 4267, 183, 2161, 2163, 
932
 4195, 4199, 4201, 4197, 4203, 4209, 4211, 4213, 4215, 4207, 4205, 
933
 4217, 2165, 2167, 2169, 2171, 2175, 2177, 2173, 2179, 2185, 2187, 
934
 2189, 2191, 2183, 2181, 2193, 2195, 2197, 2199, 2201, 2467, 2469, 
935
 4117, 4121, 4123, 4119, 4125, 4131, 4133, 4135, 4137, 4129, 4127, 
936
 4139, 2471, 2473, 2475, 2477, 2487, 2489, 2491, 2507, 2517, 2519, 
937
 2521, 2537, 3923, 3925, 3941, 3943 ]
938

939

940
941
942
7.5 A group which acts 4-transitively on the positive integers
943
944
In this section, we would like to show that the group G generated by the two
945
permutations
946
947
 Example 
948

949
gap> a := RcwaMapping([[3,0,2],[3,1,4],[3,0,2],[3,-1,4]]);;
950
gap> u := RcwaMapping([[3,0,5],[9,1,5],[3,-1,5],[9,-2,5],[9,4,5]]);;
951
gap> SetName(a,"a"); SetName(u,"u"); G := Group(a,u);;
952

953

954
955
which we have already investigated in earlier examples acts 4-transitively
956
on the set of positive integers. Obviously, it acts on the set of positive
957
integers. First we show that this action is transitive. We start by checking
958
in which residue classes sufficiently large positive integers are mapped to
959
smaller ones by a suitable group element:
960
961
 Example 
962

963
gap> List([a,a^-1,u,u^-1],DecreasingOn);
964
[ 1(2), 0(3), 0(5) U 2(5), 2(3) ]
965
gap> Union(last);
966
Z \ 4(30) U 16(30) U 28(30)
967

968

969
970
We see that we cannot always choose such a group element from the set of
971
generators and their inverses -- otherwise the union would be Integers.
972
973
 Example 
974

975
gap> List([a,a^-1,u,u^-1,a^2,a^-2,u^2,u^-2],DecreasingOn);
976
[ 1(2), 0(3), 0(5) U 2(5), 2(3), 1(8) U 7(8), 0(3) U 2(9) U 7(9), 
977
 0(25) U 12(25) U 17(25) U 20(25), 2(3) U 1(9) U 3(9) ]
978
gap> Union(last); # Still not enough ...
979
Z \ 4(90) U 58(90) U 76(90)
980
gap> List([a,a^-1,u,u^-1,a^2,a^-2,u^2,u^-2,a*u,u*a,(a*u)^-1,(u*a)^-1],
981
>  DecreasingOn);
982
[ 1(2), 0(3), 0(5) U 2(5), 2(3), 1(8) U 7(8), 0(3) U 2(9) U 7(9), 
983
 0(25) U 12(25) U 17(25) U 20(25), 2(3) U 1(9) U 3(9), 
984
 3(5) U 0(10) U 7(20) U 9(20), 0(5) U 2(5), 2(3), 3(9) U 4(9) U 8(9) ]
985
gap> Union(last); # ... but that's it!
986
Integers
987

988

989
990
Finally, we have to deal with small integers. We use the notation for the
991
coefficients of rcwa mappings introduced at the beginning of this manual.
992
Let c_r(m) > a_r(m). Then we easily see that (a_r(m)n+b_r(m))/c_r(m) > n
993
implies n < b_r(m)/(c_r(m)-a_r(m)). Thus we can restrict our considerations
994
to integers n < b_ max, where b_ max is the largest second entry of a
995
coefficient triple of one of the group elements in our list:
996
997
 Example 
998

999
gap> List([a,a^-1,u,u^-1,a^2,a^-2,u^2,u^-2,a*u,u*a,(a*u)^-1,(u*a)^-1],
1000
>  f->Maximum(List(Coefficients(f),c->c[2])));
1001
[ 1, 1, 4, 2, 7, 7, 56, 28, 25, 17, 17, 11 ]
1002
gap> Maximum(last);
1003
56
1004

1005

1006
1007
Thus this upper bound is 56. The rest is easy -- all we have to do is to
1008
check that the orbit containing 1 contains also all other positive integers
1009
less than or equal to 56:
1010
1011
 Example 
1012

1013
gap> S := [1];;
1014
gap> while not IsSubset(S,[1..56]) do
1015
>  S := Union(S,S^a,S^u,S^(a^-1),S^(u^-1));
1016
>  od;
1017
gap> IsSubset(S,[1..56]);
1018
true
1019

1020

1021
1022
Checking 2-transitivity is computationally harder, and in the sequel we will
1023
omit some steps which are in practice needed to find out what to do. The
1024
approach taken here is to show that the stabilizer of 1 in G acts
1025
transitively on the set of positive integers greater than 1. We do this by
1026
similar means as used above for showing the transitivity of the action of G
1027
on the positive integers. We start by determining all products of at most 5
1028
generators and their inverses, which stabilize 1 (taking at most 4-generator
1029
products would not suffice!):
1030
1031
 Example 
1032

1033
gap> gens := [a,u,a^-1,u^-1];;
1034
gap> tups := Concatenation(List([1..5],k->Tuples([1..4],k)));;
1035
gap> Length(tups);
1036
1364
1037
gap> tups := Filtered(tups,tup->ForAll([[1,3],[3,1],[2,4],[4,2]],
1038
>  l->PositionSublist(tup,l)=fail));;
1039
gap> Length(tups);
1040
484
1041
gap> stab := [];;
1042
gap> for tup in tups do
1043
>  n := 1;
1044
>  for i in tup do n := n^gens[i]; od;
1045
>  if n = 1 then Add(stab,tup); fi;
1046
>  od;
1047
gap> Length(stab);
1048
118
1049
gap> stabelm := List(stab,tup->Product(List(tup,i->gens[i])));;
1050
gap> ForAll(stabelm,elm->1^elm=1); # Check.
1051
true
1052

1053

1054
1055
The resulting products have various different not quite small moduli:
1056
1057
 Example 
1058

1059
gap> List(stabelm,Modulus);
1060
[ 4, 3, 16, 25, 9, 81, 64, 100, 108, 100, 25, 75, 27, 243, 324, 243, 
1061
 256, 400, 144, 400, 100, 432, 324, 400, 80, 400, 625, 25, 75, 135, 
1062
 150, 75, 225, 81, 729, 486, 729, 144, 144, 81, 729, 1296, 729, 6561, 
1063
 1024, 1600, 192, 1600, 400, 576, 432, 1600, 320, 1600, 2500, 100, 100, 
1064
 180, 192, 192, 108, 972, 1728, 972, 8748, 1600, 400, 320, 80, 1600, 
1065
 2500, 300, 2500, 625, 625, 75, 675, 75, 75, 135, 405, 600, 120, 600, 
1066
 1875, 75, 225, 405, 225, 225, 675, 243, 2187, 729, 2187, 216, 216, 
1067
 243, 2187, 1944, 2187, 19683, 576, 144, 576, 432, 81, 81, 729, 2187, 
1068
 5184, 324, 8748, 243, 2187, 19683, 26244, 19683 ]
1069
gap> Lcm(last);
1070
12597120000
1071
gap> Collected(Factors(last));
1072
[ [ 2, 10 ], [ 3, 9 ], [ 5, 4 ] ]
1073

1074

1075
1076
Similar as before, we determine for any of the above mappings the residue
1077
classes whose elements larger than the largest b_r(m) - coefficient of the
1078
respective mapping are mapped to smaller integers:
1079
1080
 Example 
1081

1082
gap> decs := List(stabelm,DecreasingOn);;
1083
gap> List(decs,Modulus);
1084
[ 2, 3, 8, 25, 9, 9, 16, 100, 12, 50, 25, 75, 27, 81, 54, 81, 64, 400, 
1085
 48, 200, 100, 72, 108, 400, 80, 200, 625, 25, 75, 45, 75, 75, 225, 81, 
1086
 243, 81, 243, 144, 144, 81, 243, 216, 243, 243, 128, 1600, 64, 400, 
1087
 400, 48, 144, 1600, 320, 400, 2500, 100, 100, 60, 96, 192, 108, 324, 
1088
 144, 324, 972, 400, 400, 80, 80, 400, 2500, 100, 1250, 625, 625, 25, 
1089
 75, 75, 75, 45, 135, 600, 120, 150, 1875, 75, 225, 135, 225, 225, 675, 
1090
 243, 729, 243, 729, 108, 216, 243, 729, 162, 729, 2187, 144, 144, 144, 
1091
 144, 81, 81, 243, 729, 1296, 324, 972, 243, 729, 2187, 1458, 2187 ]
1092
gap> Lcm(last);
1093
174960000
1094

1095

1096
1097
Since the least common multiple of the moduli of these unions of residue
1098
classes is as large as 174960000, directly forming their union and checking
1099
whether it is equal to the set of integers would take relatively much time
1100
and memory. However, starting with the set of integers and subtracting the
1101
above sets one-by-one in a suitably chosen order is cheap:
1102
1103
 Example 
1104

1105
gap> SortParallel(decs,stabelm,
1106
>  function(S1,S2)
1107
>  return First([1..100],k->Factorial(k) mod Modulus(S1)=0)
1108
>  < First([1..100],k->Factorial(k) mod Modulus(S2)=0);
1109
>  end);
1110
gap> S := Integers;;
1111
gap> for i in [1..Length(decs)] do
1112
>  S_old := S; S := Difference(S,decs[i]);
1113
>  if S <> S_old then ViewObj(S); Print("\n"); fi;
1114
>  if S = [] then maxind := i; break; fi;
1115
>  od;
1116
0(2)
1117
2(6) U 4(6)
1118
<union of 8 residue classes (mod 30)>
1119
<union of 19 residue classes (mod 90) (9 classes)>
1120
<union of 114 residue classes (mod 720)>
1121
<union of 99 residue classes (mod 720)>
1122
<union of 57 residue classes (mod 720)>
1123
<union of 54 residue classes (mod 720)>
1124
<union of 41 residue classes (mod 720)>
1125
<union of 35 residue classes (mod 720)>
1126
<union of 8 residue classes (mod 720) (6 classes)>
1127
4(720) U 94(720) U 148(720) U 238(720)
1128
<union of 24 residue classes (mod 5760)>
1129
<union of 72 residue classes (mod 51840)>
1130
<union of 48 residue classes (mod 51840)>
1131
<union of 192 residue classes (mod 259200)>
1132
<union of 168 residue classes (mod 259200)>
1133
<union of 120 residue classes (mod 259200)>
1134
<union of 96 residue classes (mod 259200)>
1135
<union of 72 residue classes (mod 259200)>
1136
<union of 60 residue classes (mod 259200)>
1137
<union of 48 residue classes (mod 259200)>
1138
<union of 24 residue classes (mod 259200)>
1139
<union of 12 residue classes (mod 259200) (6 classes)>
1140
<union of 24 residue classes (mod 777600)>
1141
<union of 12 residue classes (mod 777600) (6 classes)>
1142
111604(194400) U 14404(777600) U 208804(777600)
1143
[ ]
1144

1145

1146
1147
Similar as above, it remains to check that the small integers all lie in the
1148
orbit containing 2. Obviously, it is sufficient to check that any integer
1149
greater than 2 is mapped to a smaller one by some suitably chosen element of
1150
the stabilizer under consideration:
1151
1152
 Example 
1153

1154
gap> Maximum(List(stabelm{[1..maxind]},
1155
>  f->Maximum(List(Coefficients(f),c->c[2]))));
1156
6581
1157
gap> Filtered([3..6581],n->Minimum(List(stabelm,elm->n^elm))>=n);
1158
[ 4 ]
1159

1160

1161
1162
We have to treat 4 separately:
1163
1164
 Example 
1165

1166
gap> 1^(u*a*u^2*a^-1*u);
1167
1
1168
gap> 4^(u*a*u^2*a^-1*u);
1169
3
1170

1171

1172
1173
Now we know that any positive integer greater than 1 lies in the same orbit
1174
under the action of the stabilizer of 1 in G as 2, thus that this stabilizer
1175
acts transitively on ℕ ∖ {1}. But this means that we have established the
1176
2-transitivity of the action of G on ℕ.
1177
1178
In the following, we essentially repeat the above steps to show that this
1179
action is indeed 3-transitive:
1180
1181
 Example 
1182

1183
gap> tups := Concatenation(List([1..6],k->Tuples([1..4],k)));;
1184
gap> tups := Filtered(tups,tup->ForAll([[1,3],[3,1],[2,4],[4,2]],
1185
>  l->PositionSublist(tup,l)=fail));;
1186
gap> stab := [];;
1187
gap> for tup in tups do
1188
>  l := [1,2];
1189
>  for i in tup do l := List(l,n->n^gens[i]); od;
1190
>  if l = [1,2] then Add(stab,tup); fi;
1191
>  od;
1192
gap> Length(stab);
1193
212
1194
gap> stabelm := List(stab,tup->Product(List(tup,i->gens[i])));;
1195
gap> decs := List(stabelm,DecreasingOn);;
1196
gap> SortParallel(decs,stabelm,function(S1,S2)
1197
>  return First([1..100],k->Factorial(k) mod Mod(S1)=0)
1198
>  < First([1..100],k->Factorial(k) mod Mod(S2)=0); end);
1199
gap> S := Integers;;
1200
gap> for i in [1..Length(decs)] do
1201
>  S_old := S; S := Difference(S,decs[i]);
1202
>  if S <> S_old then ViewObj(S); Print("\n"); fi;
1203
>  if S = [] then break; fi;
1204
>  od;
1205
Z \ 1(8) U 7(8)
1206
<union of 151 residue classes (mod 240)>
1207
<union of 208 residue classes (mod 720)>
1208
<union of 51 residue classes (mod 720)>
1209
<union of 45 residue classes (mod 720)>
1210
<union of 39 residue classes (mod 720)>
1211
<union of 33 residue classes (mod 720)>
1212
<union of 23 residue classes (mod 720)>
1213
<union of 19 residue classes (mod 720) (7 classes)>
1214
<union of 17 residue classes (mod 720) (6 classes)>
1215
<union of 16 residue classes (mod 720) (7 classes)>
1216
<union of 14 residue classes (mod 720) (9 classes)>
1217
<union of 8 residue classes (mod 720) (6 classes)>
1218
<union of 7 residue classes (mod 720) (6 classes)>
1219
238(360) U 4(720) U 148(720) U 454(720)
1220
<union of 38 residue classes (mod 5760)>
1221
<union of 37 residue classes (mod 5760)>
1222
<union of 25 residue classes (mod 5760)>
1223
<union of 21 residue classes (mod 5760)>
1224
<union of 17 residue classes (mod 5760) (13 classes)>
1225
<union of 16 residue classes (mod 5760) (12 classes)>
1226
<union of 138 residue classes (mod 51840)>
1227
<union of 48 residue classes (mod 51840)>
1228
<union of 32 residue classes (mod 51840)>
1229
<union of 20 residue classes (mod 51840) (14 classes)>
1230
<union of 16 residue classes (mod 51840) (12 classes)>
1231
<union of 68 residue classes (mod 259200)>
1232
<union of 42 residue classes (mod 259200)>
1233
<union of 32 residue classes (mod 259200)>
1234
<union of 26 residue classes (mod 259200)>
1235
<union of 25 residue classes (mod 259200)>
1236
<union of 11 residue classes (mod 259200) (10 classes)>
1237
<union of 10 residue classes (mod 259200) (9 classes)>
1238
<union of 7 residue classes (mod 259200) (6 classes)>
1239
13414(129600) U 2164(259200) U 66964(259200) U 228964(259200)
1240
2164(259200) U 66964(259200) U 228964(259200)
1241
[ ]
1242
gap> Maximum(List(stabelm,f->Maximum(List(Coefficients(f),c->c[2]))));
1243
515816
1244
gap> smallnum := [4..515816];;
1245
gap> for i in [1..Length(stabelm)] do
1246
>  smallnum := Filtered(smallnum,n->n^stabelm[i]>=n);
1247
>  od;
1248
gap> smallnum;
1249
[ ]
1250

1251

1252
1253
The same for 4-transitivity:
1254
1255
 Example 
1256

1257
gap> tups := Concatenation(List([1..8],k->Tuples([1..4],k)));;
1258
gap> tups := Filtered(tups,tup->ForAll([[1,3],[3,1],[2,4],[4,2]],
1259
>  l->PositionSublist(tup,l)=fail));;
1260
gap> stab := [];;
1261
gap> for tup in tups do
1262
>  l := [1,2,3];
1263
>  for i in tup do l := List(l,n->n^gens[i]); od;
1264
>  if l = [1,2,3] then Add(stab,tup); fi;
1265
>  od;
1266
gap> Length(stab);
1267
528
1268
gap> stabelm := [];;
1269
gap> for i in [1..Length(stab)] do
1270
>  elm := One(G);
1271
>  for j in stab[i] do
1272
>  if Modulus(elm) > 10000 then elm := fail; break; fi;
1273
>  elm := elm * gens[j];
1274
>  od;
1275
>  if elm <> fail then Add(stabelm,elm); fi;
1276
>  od;
1277
gap> Length(stabelm);
1278
334
1279
gap> decs := List(stabelm,DecreasingOn);;
1280
gap> SortParallel(decs,stabelm,
1281
>  function(S1,S2)
1282
>  return First([1..100],k->Factorial(k) mod Modulus(S1) = 0)
1283
>  < First([1..100],k->Factorial(k) mod Modulus(S2) = 0);
1284
>  end);
1285
gap> S := Integers;;
1286
gap> for i in [1..Length(decs)] do
1287
>  S_old := S; S := Difference(S,decs[i]);
1288
>  if S <> S_old then ViewObj(S); Print("\n"); fi;
1289
>  if S = [] then maxind := i; break; fi;
1290
>  od;
1291
Z \ 1(8) U 7(8)
1292
<union of 46 residue classes (mod 72)>
1293
<union of 20 residue classes (mod 72) (8 classes)>
1294
4(18)
1295
<union of 28 residue classes (mod 576)>
1296
<union of 22 residue classes (mod 576)>
1297
<union of 21 residue classes (mod 576)>
1298
40(72) U 4(144) U 94(144) U 346(576) U 418(576)
1299
<union of 16 residue classes (mod 576) (6 classes)>
1300
<union of 15 residue classes (mod 576) (6 classes)>
1301
4(144) U 94(144) U 346(576) U 418(576)
1302
<union of 30 residue classes (mod 5184)>
1303
<union of 26 residue classes (mod 5184)>
1304
<union of 6 residue classes (mod 1296)>
1305
<union of 504 residue classes (mod 129600)>
1306
<union of 324 residue classes (mod 129600)>
1307
<union of 282 residue classes (mod 129600)>
1308
<union of 239 residue classes (mod 129600)>
1309
<union of 218 residue classes (mod 129600)>
1310
<union of 194 residue classes (mod 129600)>
1311
<union of 154 residue classes (mod 129600)>
1312
<union of 97 residue classes (mod 129600)>
1313
<union of 85 residue classes (mod 129600)>
1314
<union of 77 residue classes (mod 129600)>
1315
<union of 67 residue classes (mod 129600)>
1316
<union of 125 residue classes (mod 259200)>
1317
<union of 108 residue classes (mod 259200)>
1318
<union of 107 residue classes (mod 259200)>
1319
<union of 101 residue classes (mod 259200)>
1320
<union of 100 residue classes (mod 259200)>
1321
<union of 84 residue classes (mod 259200)>
1322
<union of 80 residue classes (mod 259200)>
1323
<union of 76 residue classes (mod 259200)>
1324
<union of 70 residue classes (mod 259200)>
1325
<union of 66 residue classes (mod 259200)>
1326
<union of 54 residue classes (mod 259200)>
1327
<union of 53 residue classes (mod 259200)>
1328
<union of 47 residue classes (mod 259200)>
1329
<union of 43 residue classes (mod 259200)>
1330
<union of 31 residue classes (mod 259200)>
1331
<union of 24 residue classes (mod 259200)>
1332
<union of 23 residue classes (mod 259200)>
1333
<union of 13 residue classes (mod 259200) (8 classes)>
1334
57406(129600) U 115006(129600) U 192676(259200) U 250276(259200)
1335
57406(129600) U 192676(259200) U 250276(259200) U 374206(388800)
1336
57406(129600) U 192676(259200) U 250276(259200)
1337
250276(259200) U 57406(388800) U 316606(388800) U 451876(777600)
1338
316606(388800) U 451876(777600) U 509476(777600) U 768676(777600)
1339
<union of 18 residue classes (mod 3110400) (6 classes)>
1340
451876(777600) U 509476(777600) U 705406(777600) U 768676(777600)
1341
 U 2649406(3110400)
1342
451876(777600) U 705406(777600) U 768676(777600) U 2649406(3110400)
1343
451876(777600) U 705406(777600) U 2649406(3110400)
1344
705406(777600) U 2007076(3110400) U 2649406(3110400) U 2784676(3110400)
1345
<union of 14 residue classes (mod 9331200) (8 classes)>
1346
2260606(2332800) U 5759806(9331200) U 5895076(9331200) U 8227876(9331200)
1347
4593406(6998400) U 15091006(27993600) U 17559076(27993600)
1348
 U 24557476(27993600)
1349
<union of 14 residue classes (mod 83980800) (8 classes)>
1350
18590206(20995200) U 24557476(83980800) U 45552676(83980800)
1351
 U 71078206(83980800)
1352
[ ]
1353
gap> Maximum(List(stabelm{[1..maxind]},
1354
>  f->Maximum(List(Coefficients(f),c->c[2]))));
1355
58975
1356
gap> smallnum := [5..58975];;
1357
gap> for i in [1..maxind] do
1358
>  smallnum := Filtered(smallnum,n->n^stabelm[i]>=n);
1359
>  od;
1360
gap> smallnum;
1361
[ ]
1362

1363

1364
1365
There is even some evidence that the degree of transitivity of the action of
1366
G on the positive integers is higher than 4:
1367
1368
 Example 
1369

1370
gap> phi := EpimorphismFromFreeGroup(G);
1371
[ a, u ] -> [ a, u ]
1372
gap> F := Source(phi);
1373
<free group on the generators [ a, u ]>
1374
gap> List([5..20],
1375
>  n->RepresentativeActionPreImage(G,[1,2,3,4,5],
1376
>  [1,2,3,4,n],OnTuples,F));
1377
[ <identity ...>, a^-3*u^4*a*u^-2*a^2, a^-1*(a^-1*u)^4*a^-1*u^-1*a, 
1378
 a^4*u^-2*a^-4, a^-1*u^-4*a, (u^2*a^-1)^2*u^-2, u^-2*a^-2*u^4, 
1379
 a^-1*u^2*a, a^-1*u^-6*a, a^2*u^4*a^2*u^2, u^-4*a*u^-2*a^-3, 
1380
 a^-1*u^-2*a^-3*u^4*a^2, a^2*(a*u^2)^2, (a*u^-4)^2*a^-2, 
1381
 u^-2*a*u^2*a*u^-2, u^-4*a^2*u^2 ]
1382

1383

1384
1385
Enter AssignGlobals(LoadRCWAExamples().CollatzlikePerms); in order to assign
1386
the global variables defined in this section.
1387
1388
1389
7.6 A group which acts 3-transitively, but not 4-transitively on ℤ
1390
1391
In this section, we would like to show that the group G generated by the two
1392
permutations n ↦ n + 1 and τ_1(2),0(4) acts 3-transitively, but not
1393
4-transitively on the set of integers.
1394
1395
 Example 
1396

1397
gap> G := Group(ClassShift(0,1),ClassTransposition(1,2,0,4));
1398
<rcwa group over Z with 2 generators>
1399
gap> IsTame(G);
1400
false
1401
gap> (G.1^-2*G.2)^3*(G.1^2*G.2)^3; # G <> the free product C_infty * C_2.
1402
IdentityMapping( Integers )
1403
gap> Display(G:CycleNotation:=false);
1404

1405
Wild rcwa group over Z, generated by
1406

1407
[
1408
Tame rcwa permutation of Z: n -> n + 1
1409

1410
Rcwa permutation of Z with modulus 4, of order 2
1411

1412
 /
1413
 | 2n-2 if n in 1(2)
1414
 n |-> < (n+2)/2 if n in 0(4)
1415
 | n if n in 2(4)
1416
 \
1417

1418
]
1419

1420

1421
1422
This group acts transitively on ℤ, since already the cyclic group generated
1423
by the first of the two generators does so. Next we have to show that it
1424
acts 2-transitively. We essentially proceed as in the example in the
1425
previous section, by checking that the stabilizer of 0 acts transitively on
1426
ℤ ∖ {0}.
1427
1428
 Example 
1429

1430
gap> gens := [ClassShift(0,1)^-1,ClassTransposition(1,2,0,4),
1431
>  ClassShift(0,1)];;
1432
gap> tups := Concatenation(List([1..6],k->Tuples([-1,0,1],k)));;
1433
gap> tups := Filtered(tups,tup->ForAll([[0,0],[-1,1],[1,-1]],
1434
>  l->PositionSublist(tup,l)=fail));;
1435
gap> Length(tups);
1436
189
1437
gap> stab := [];;
1438
gap> for tup in tups do
1439
>  n := 0;
1440
>  for i in tup do n := n^gens[i+2]; od;
1441
>  if n = 0 then Add(stab,tup); fi;
1442
>  od;
1443
gap> stabelm := List(stab,tup->Product(List(tup,i->gens[i+2])));;
1444
gap> Collected(List(stabelm,Modulus));
1445
[ [ 4, 6 ], [ 8, 4 ], [ 16, 3 ] ]
1446
gap> decs := List(stabelm,DecreasingOn);
1447
[ 0(4), 3(4), 0(4), 3(4), 2(4), 0(4), 4(8), 2(4), 2(4), 0(4), 1(4), 
1448
 0(8), 3(8) ]
1449
gap> Union(decs);
1450
Integers
1451

1452

1453
1454
Similar as in the previous section, it remains to check that the integers
1455
with small absolute value all lie in the orbit containing 1 under the action
1456
of the stabilizer of 0:
1457
1458
 Example 
1459

1460
gap> Maximum(List(stabelm,f->Maximum(List(Coefficients(f),
1461
>  c->AbsInt(c[2])))));
1462
21
1463
gap> S := [1];;
1464
gap> for elm in stabelm do S := Union(S,S^elm,S^(elm^-1)); od;
1465
gap> IsSubset(S,Difference([-21..21],[0])); # Not yet ..
1466
false
1467
gap> for elm in stabelm do S := Union(S,S^elm,S^(elm^-1)); od;
1468
gap> IsSubset(S,Difference([-21..21],[0])); # ... but now!
1469
true
1470

1471

1472
1473
Now we have to check for 3-transitivity. Since we cannot find for every
1474
residue class an element of the pointwise stabilizer of {0,1} which properly
1475
divides its elements, we also have to take additions and subtractions into
1476
consideration. Since the moduli of all of our stabilizer elements are quite
1477
small, simply looking at sets of representatives is cheap:
1478
1479
 Example 
1480

1481
gap> tups := Concatenation(List([1..10],k->Tuples([-1,0,1],k)));;
1482
gap> tups := Filtered(tups,tup->ForAll([[0,0],[-1,1],[1,-1]],
1483
>  l->PositionSublist(tup,l)=fail));;
1484
gap> Length(tups);
1485
3069
1486
gap> stab := [];;
1487
gap> for tup in tups do
1488
>  l := [0,1];
1489
>  for i in tup do l := List(l,n->n^gens[i+2]); od;
1490
>  if l = [0,1] then Add(stab,tup); fi;
1491
>  od;
1492
gap> Length(stab);
1493
10
1494
gap> stabelm := List(stab,tup->Product(List(tup,i->gens[i+2])));;
1495
gap> Maximum(List(stabelm,Modulus));
1496
8
1497
gap> Maximum(List(stabelm,
1498
>  f->Maximum(List(Coefficients(f),c->AbsInt(c[2])))));
1499
8
1500
gap> decsp := List(stabelm,elm->Filtered([9..16],n->n^elm<n));
1501
[ [ 9, 13 ], [ 10, 12, 14, 16 ], [ 12, 16 ], [ 9, 13 ], [ 12, 16 ], 
1502
 [ 9, 11, 13, 15 ], [ 9, 11, 13, 15 ], [ 12, 16 ], [ 12, 16 ], 
1503
 [ 9, 11, 13, 15 ] ]
1504
gap> Union(decsp);
1505
[ 9, 10, 11, 12, 13, 14, 15, 16 ]
1506
gap> decsm := List(stabelm,elm->Filtered([-16..-9],n->n^elm>n));
1507
[ [ -15, -13, -11, -9 ], [ -16, -12 ], [ -16, -12 ], [ -15, -11 ], 
1508
 [ -16, -14, -12, -10 ], [ -15, -11 ], [ -15, -11 ], 
1509
 [ -16, -14, -12, -10 ], [ -16, -14, -12, -10 ], [ -15, -11 ] ]
1510
gap> Union(decsm);
1511
[ -16, -15, -14, -13, -12, -11, -10, -9 ]
1512
gap> S := [2];;
1513
gap> for elm in stabelm do S := Union(S,S^elm,S^(elm^-1)); od;
1514
gap> IsSubset(S,Difference([-8..8],[0,1]));
1515
true
1516

1517

1518
1519
At this point we have established 3-transitivity. It remains to check that
1520
the group G does not act 4-transitively. We do this by checking that it is
1521
not transitive on 4-tuples (mod 4). Since n mod 8 determines the image of n
1522
under a generator of G (mod 4), it suffices to compute (mod 8):
1523
1524
 Example 
1525

1526
gap> orb := [[0,1,2,3]];;
1527
gap> extend := function ()
1528
>  local gen;
1529
>  for gen in gens do
1530
>  orb := Union(orb,List(orb,l->List(l,n->n^gen) mod 8));
1531
>  od;
1532
>  end;;
1533
gap> repeat
1534
>  old := ShallowCopy(orb);
1535
>  extend(); Print(Length(orb),"\n");
1536
>  until orb = old;
1537
7
1538
27
1539
97
1540
279
1541
573
1542
916
1543
1185
1544
1313
1545
1341
1546
1344
1547
1344
1548
gap> Length(Set(List(orb,l->l mod 4)));
1549
120
1550
gap> last < 4^4;
1551
true
1552

1553

1554
1555
This shows that G acts not 4-transitively on ℤ. The corresponding
1556
calculation for 3-tuples looks as follows:
1557
1558
 Example 
1559

1560
gap> orb := [[0,1,2]];;
1561
gap> repeat
1562
>  old := ShallowCopy(orb);
1563
>  extend(); Print(Length(orb),"\n");
1564
>  until orb = old;
1565
7
1566
27
1567
84
1568
207
1569
363
1570
459
1571
503
1572
512
1573
512
1574
gap> Length(Set(List(orb,l->l mod 4)));
1575
64
1576
gap> last = 4^3;
1577
true
1578

1579

1580
1581
Needless to say that the latter kind of argumentation is not suitable for
1582
proving, but only for disproving k-transitivity.
1583
1584
1585
7.7 An rcwa mapping which seems to be contracting, but very slow
1586
1587
The iterates of an integer under the Collatz mapping T seem to approach its
1588
contraction centre -- this is the finite set where all trajectories end up
1589
after a finite number of steps -- rather quickly and do not get very large
1590
before doing so (of course this is a purely heuristic statement as the 3n+1
1591
conjecture has not been proved so far!):
1592
1593
 Example 
1594

1595
gap> T := RcwaMapping([[1,0,2],[3,1,2]]);;
1596
gap> S0 := LikelyContractionCentre(T,100,1000);
1597
#I Warning: `LikelyContractionCentre' is highly probabilistic.
1598
The returned result can only be regarded as a rough guess.
1599
See ?LikelyContractionCentre for more information.
1600
[ -136, -91, -82, -68, -61, -55, -41, -37, -34, -25, -17, -10, -7, -5, 
1601
 -1, 0, 1, 2 ]
1602
gap> S0^T = S0; # This holds by definition of the contraction centre.
1603
true
1604
gap> List([1..30],n->Length(Trajectory(T,n,S0)));
1605
[ 1, 1, 5, 2, 4, 6, 11, 3, 13, 5, 10, 7, 7, 12, 12, 4, 9, 14, 14, 6, 6, 
1606
 11, 11, 8, 16, 8, 70, 13, 13, 13 ]
1607
gap> Maximum(List([1..1000],n->Length(Trajectory(T,n,S0))));
1608
113
1609
gap> Maximum(List([1..1000],n->Maximum(Trajectory(T,n,S0))));
1610
125252
1611

1612

1613
1614
The following mapping seems to be contracting as well, but its trajectories
1615
are much longer:
1616
1617
 Example 
1618

1619
gap> f6 := RcwaMapping([[ 1,0,6],[ 5, 1,6],[ 7,-2,6],
1620
>  [11,3,6],[11,-2,6],[11,-1,6]]);;
1621
gap> Display(f6);
1622

1623
Rcwa mapping of Z with modulus 6
1624

1625
 /
1626
 | n/6 if n in 0(6)
1627
 | (5n+1)/6 if n in 1(6)
1628
 | (7n-2)/6 if n in 2(6)
1629
 n |-> < (11n+3)/6 if n in 3(6)
1630
 | (11n-2)/6 if n in 4(6)
1631
 | (11n-1)/6 if n in 5(6)
1632
 |
1633
 \
1634

1635
gap> S0 := LikelyContractionCentre(f6,1000,100000);;
1636
#I Warning: `LikelyContractionCentre' is highly probabilistic.
1637
The returned result can only be regarded as a rough guess.
1638
See ?LikelyContractionCentre for more information.
1639
gap> Trajectory(f6,25,S0);
1640
[ 25, 21, 39, 72, 12, 2 ]
1641
gap> List([1..100],n->Length(Trajectory(f6,n,S0)));
1642
[ 1, 1, 3, 4, 1, 2, 3, 2, 1, 5, 7, 2, 8, 17, 3, 16, 1, 4, 17, 6, 5, 2, 
1643
 5, 5, 6, 1, 4, 2, 15, 1, 1, 3, 2, 5, 13, 3, 2, 3, 4, 1, 8, 4, 4, 2, 7, 
1644
 19, 23517, 3, 9, 3, 1, 18, 14, 2, 20, 23512, 14, 2, 6, 6, 1, 4, 19, 
1645
 12, 23511, 8, 23513, 10, 1, 13, 13, 3, 1, 23517, 7, 20, 7, 9, 9, 6, 
1646
 12, 8, 6, 18, 14, 23516, 31, 12, 23545, 4, 21, 19, 5, 1, 17, 17, 13, 
1647
 19, 6, 23515 ]
1648
gap> Maximum(Trajectory(f6,47,S0));
1649
7363391777762473304431877054771075818733690108051469808715809256737742295\
1650
45698886054
1651

1652

1653
1654
Computing the trajectory of 3224 takes quite a while -- this trajectory
1655
ascends to about 3 ⋅ 10^2197, before it approaches the fixed point 2 after
1656
19949562 steps.
1657
1658
When constructing the mapping f6, the denominators of the partial mappings
1659
have been chosen to be equal and the numerators have been chosen to be
1660
numbers coprime to the common denominator, whose product is just a little
1661
bit smaller than the Modulus(f6)th power of the denominator. In the example
1662
we have 5 ⋅ 7 ⋅ 11^3 = 46585 and 6^6 = 46656.
1663
1664
Although the trajectories of T are much shorter than those of f6, it seems
1665
likely that this does not make the problem of deciding whether the mapping T
1666
is contracting essentially easier -- even for mappings with much shorter
1667
trajectories than T the problem seems to be equally hard. A solution can
1668
usually only be found in trivial cases, i.e. for example when there is some
1669
k such that applying the kth power of the respective mapping to any integer
1670
decreases its absolute value.
1671
1672
Enter AssignGlobals(LoadRCWAExamples().SlowlyContractingMappings); in order
1673
to assign the global variables defined in this section.
1674
1675
1676
7.8 Checking a result by P. Andaloro
1677
1678
In [And00], P. Andaloro has shown that proving that trajectories of integers
1679
n ∈ 1(16) under the Collatz mapping always contain 1 would be sufficient to
1680
prove the 3n+1 conjecture. In the sequel, this result is verified by RCWA.
1681
Checking that the union of the images of the residue class 1(16) under
1682
powers of the Collatz mapping T contains ℤ ∖ 0(3) is obviously enough. Thus
1683
we put S := 1(16), and successively unite the set S with its image under T:
1684
1685
 Example 
1686

1687
gap> T := RcwaMapping([[1,0,2],[3,1,2]]);
1688
<rcwa mapping of Z with modulus 2>
1689
gap> S := ResidueClass(Integers,16,1);
1690
1(16)
1691
gap> S := Union(S,S^T);
1692
1(16) U 2(24)
1693
gap> S := Union(S,S^T);
1694
1(12) U 2(24) U 17(48) U 33(48)
1695
gap> S := Union(S,S^T);
1696
<union of 30 residue classes (mod 144)>
1697
gap> S := Union(S,S^T);
1698
<union of 42 residue classes (mod 144)>
1699
gap> S := Union(S,S^T);
1700
<union of 172 residue classes (mod 432)>
1701
gap> S := Union(S,S^T);
1702
<union of 676 residue classes (mod 1296)>
1703
gap> S := Union(S,S^T);
1704
<union of 810 residue classes (mod 1296)>
1705
gap> S := Union(S,S^T);
1706
<union of 2638 residue classes (mod 3888)>
1707
gap> S := Union(S,S^T);
1708
<union of 33 residue classes (mod 48)>
1709
gap> S := Union(S,S^T);
1710
<union of 33 residue classes (mod 48)>
1711
gap> Union(S,ResidueClass(Integers,3,0)); # Et voila ...
1712
Integers
1713

1714

1715
1716
Further similar computations are shown in Section 7.17.
1717
1718
Enter AssignGlobals(LoadRCWAExamples().CollatzMapping); in order to assign
1719
the global variables defined in this section.
1720
1721
1722
7.9 Two examples by Matthews and Leigh
1723
1724
In [ML87], K. R. Matthews and G. M. Leigh have shown that two trajectories
1725
of the following (surjective, but not injective) mappings are acyclic
1726
(mod x) and divergent:
1727
1728
 Example 
1729

1730
gap> x := Indeterminate(GF(4),1);; SetName(x,"x");
1731
gap> R := PolynomialRing(GF(2),1);
1732
GF(2)[x]
1733
gap> ML1 := RcwaMapping(R,x,[[1,0,x],[(x+1)^3,1,x]]*One(R));;
1734
gap> ML2 := RcwaMapping(R,x,[[1,0,x],[(x+1)^2,1,x]]*One(R));;
1735
gap> Display(ML1);
1736

1737
Rcwa mapping of GF(2)[x] with modulus x
1738

1739
 /
1740
 | P/x if P in 0(x)
1741
 P |-> < ((x^3+x^2+x+1)*P + 1)/x if P in 1(x)
1742
 |
1743
 \
1744

1745
gap> Display(ML2);
1746

1747
Rcwa mapping of GF(2)[x] with modulus x
1748

1749
 /
1750
 | P/x if P in 0(x)
1751
 P |-> < ((x^2+1)*P + 1)/x if P in 1(x)
1752
 |
1753
 \
1754

1755
gap> List([ML1,ML2],IsSurjective);
1756
[ true, true ]
1757
gap> List([ML1,ML2],IsInjective);
1758
[ false, false ]
1759
gap> traj1 := Trajectory(ML1,One(R),16);
1760
[ 1, x^2+x+1, x^4+x^2+x, x^3+x+1, x^5+x^4+x^2, x^4+x^3+x, x^3+x^2+1, 
1761
 x^5+x^2+1, x^7+x^6+x^5+x^3+1, x^9+x^7+x^6+x^5+x^3+x+1, 
1762
 x^11+x^10+x^8+x^7+x^6+x^5+x^2, x^10+x^9+x^7+x^6+x^5+x^4+x, 
1763
 x^9+x^8+x^6+x^5+x^4+x^3+1, x^11+x^8+x^7+x^6+x^4+x+1, 
1764
 x^13+x^12+x^11+x^8+x^7+x^6+x^4, x^12+x^11+x^10+x^7+x^6+x^5+x^3 ]
1765
gap> traj2 := Trajectory(ML2,(x^3+x+1)*One(R),16);
1766
[ x^3+x+1, x^4+x+1, x^5+x^3+x^2+x+1, x^6+x^3+1, x^7+x^5+x^4+x^2+x, 
1767
 x^6+x^4+x^3+x+1, x^7+x^4+x^3+x+1, x^8+x^6+x^5+x^4+x^3+x+1, 
1768
 x^9+x^6+x^3+x+1, x^10+x^8+x^7+x^5+x^4+x+1, 
1769
 x^11+x^8+x^7+x^5+x^4+x^3+x^2+x+1, x^12+x^10+x^9+x^8+x^7+x^5+1, 
1770
 x^13+x^10+x^7+x^4+x, x^12+x^9+x^6+x^3+1, 
1771
 x^13+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x, 
1772
 x^12+x^10+x^9+x^7+x^6+x^4+x^3+x+1 ]
1773

1774

1775
1776
The pattern which Matthews and Leigh used to show the divergence of the
1777
above trajectories can be recognized easily by looking at the corresponding
1778
Markov chains with the two states 0 mod x and 1 mod x:
1779
1780
 Example 
1781

1782
gap> traj1modx := Trajectory(ML1,One(R),400,x);;
1783
gap> traj2modx := Trajectory(ML2,(x^3+x+1)*One(R),600,x);;
1784
gap> List(traj1modx{[1..150]},val->Position([Zero(R),One(R)],val)-1);
1785
[ 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 
1786
 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 
1787
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 
1788
 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 
1789
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1790
 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
1791
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1792
gap> List(traj2modx{[1..150]},val->Position([Zero(R),One(R)],val)-1);
1793
[ 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 
1794
 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1795
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 
1796
 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1797
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1798
 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 
1799
 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 ]
1800

1801

1802
1803
What is important here are the lengths of the intervals between two changes
1804
from one state to the other:
1805
1806
 Example 
1807

1808
gap> ChangePoints := l->Filtered([1..Length(l)-1],pos->l[pos]<>l[pos+1]);;
1809
gap> Diffs := l->List([1..Length(l)-1],pos->l[pos+1]-l[pos]);;
1810
gap> Diffs(ChangePoints(traj1modx)); # The pattern in the first ...
1811
[ 1, 1, 2, 4, 2, 2, 4, 8, 4, 4, 8, 16, 8, 8, 16, 32, 16, 16, 32, 64, 32, 
1812
 32, 64 ]
1813
gap> Diffs(ChangePoints(traj2modx)); # ... and in the second example.
1814
[ 1, 7, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1815
 1, 1, 1, 1, 1, 1, 49, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1816
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 97, 1, 1, 1, 1, 1, 1, 1, 
1817
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1818
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1819
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 193, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1820
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1821
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1822
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1823
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1824
gap> Diffs(ChangePoints(last)); # Make this a bit more obvious.
1825
[ 1, 3, 1, 7, 1, 15, 1, 31, 1, 63, 1 ]
1826

1827

1828
1829
This looks clearly acyclic, thus the trajectories diverge. Needless to say
1830
however that this computational evidence does not replace the proof along
1831
these lines given in the article cited above, but just sheds a light on the
1832
idea behind it.
1833
1834
Enter AssignGlobals(LoadRCWAExamples().MatthewsLeigh); in order to assign
1835
the global variables defined in this section.
1836
1837
1838
7.10 Orders of commutators
1839
1840
We enter some wild rcwa permutation:
1841
1842
 Example 
1843

1844
gap> u := RcwaMapping([[3,0,5],[9,1,5],[3,-1,5],[9,-2,5],[9,4,5]]);;
1845
gap> IsTame(u);;
1846
gap> Display(u);
1847

1848
Wild rcwa permutation of Z with modulus 5
1849

1850
 /
1851
 | 3n/5 if n in 0(5)
1852
 | (9n+1)/5 if n in 1(5)
1853
 n |-> < (3n-1)/5 if n in 2(5)
1854
 | (9n-2)/5 if n in 3(5)
1855
 | (9n+4)/5 if n in 4(5)
1856
 \
1857

1858

1859
1860
We would like to compute the order of [u,n ↦ n + k] and [u^2,n ↦ n + k] for
1861
different values of k:
1862
1863
 Example 
1864

1865
gap> nu := ClassShift(0,1);; # n -> n + 1
1866
gap> l := Filtered([0..100],k->IsTame(Comm(u,nu^k)));
1867
[ 0, 2, 3, 5, 6, 9, 10, 12, 13, 15, 17, 18, 20, 21, 24, 25, 27, 28, 30, 
1868
 32, 33, 35, 36, 39, 40, 42, 43, 45, 47, 48, 50, 51, 54, 55, 57, 58, 
1869
 60, 62, 63, 65, 66, 69, 70, 72, 73, 75, 77, 78, 80, 81, 84, 85, 87, 
1870
 88, 90, 92, 93, 95, 96, 99, 100 ]
1871
gap> List(l,k->Order(Comm(u,nu^k)));
1872
[ 1, 6, 5, 3, 5, 5, 3, infinity, 7, infinity, 7, 5, 3, infinity, 
1873
 infinity, 3, 5, 7, infinity, 7, infinity, 3, 5, 5, 3, 5, infinity, 
1874
 infinity, infinity, 5, 3, 5, 5, 3, infinity, 7, infinity, 7, 5, 3, 
1875
 infinity, infinity, 3, 5, 7, infinity, 7, infinity, 3, 5, 5, 3, 5, 
1876
 infinity, infinity, infinity, 5, 3, 5, 5, 3 ]
1877
gap> u2 := u^2;
1878
<wild rcwa permutation of Z with modulus 25>
1879
gap> Filtered([1..16],k->IsTame(Comm(u2,nu^k))); # k<15->[u^2,nu^k] wild!
1880
[ 15 ]
1881
gap> Order(Comm(u2,nu^15));
1882
infinity
1883
gap> u2nu17 := Comm(u2,nu^17);
1884
<rcwa permutation of Z with modulus 81>
1885
gap> cycs := ShortCycles(u2nu17,[-100..100],100);;
1886
gap> List(cycs,Length);
1887
[ 72, 73, 72, 72, 72, 73, 72, 72, 73, 72, 72, 73, 72, 72, 73, 72, 72, 
1888
 73, 72, 72, 73, 72, 72 ]
1889
gap> Lcm(last);
1890
5256
1891
gap> u2nu17^5256; # This element has indeed order 2^3*3^2*73 = 5256.
1892
IdentityMapping( Integers )
1893
gap> u2nu18 := Comm(u2,nu^18);
1894
<rcwa permutation of Z with modulus 81>
1895
gap> cycs := ShortCycles(u2nu18,[-100..100],100);;
1896
gap> List(cycs,Length);
1897
[ 21, 22, 22, 22, 21, 22, 22, 21, 22, 22, 21, 22, 21, 22, 22, 21, 22, 
1898
 22, 21, 22, 22, 21, 22 ]
1899
gap> Lcm(last);
1900
462
1901
gap> u2nu18^462; # This is an element of order 2*3*7*11 = 462.
1902
IdentityMapping( Integers )
1903
gap> List([Comm(u2,nu^20),Comm(u2,nu^25),Comm(u2,nu^30)],Order);
1904
[ 29, 9, 15 ]
1905

1906

1907
1908
We observe that our commutators have various different orders, and that the
1909
prime factors of these orders are not all very small.
1910
1911
Enter AssignGlobals(LoadRCWAExamples().CollatzlikePerms); in order to assign
1912
the global variables defined in this section.
1913
1914
1915
7.11 An infinite subgroup of CT(GF(2)[x]) with many torsion elements
1916
1917
In this section, we have a look at the following subgroup of CT(GF(2)[x]):
1918
1919
 Example 
1920

1921
gap> x := Indeterminate(GF(2));; SetName(x,"x");
1922
gap> R := PolynomialRing(GF(2),1);
1923
GF(2)[x]
1924
gap> a := ClassTransposition(0,x,1,x);;
1925
gap> b := ClassTransposition(0,x^2+1,1,x^2+1);;
1926
gap> c := ClassTransposition(1,x,0,x^2+x);;
1927
gap> G := Group(a,b,c);
1928
<rcwa group over GF(2)[x] with 3 generators>
1929
gap> Display(G);
1930

1931
Rcwa group over GF(2)[x], generated by
1932

1933
[
1934
Rcwa permutation of GF(2)[x]: P -> P + Z(2)^0
1935

1936
Rcwa permutation of GF(2)[x] with modulus x^2+1, of order 2
1937

1938
 /
1939
 | P + 1 if P in 0(x^2+1) U 1(x^2+1)
1940
 P |-> < P if P in x(x^2+1) U x+1(x^2+1)
1941
 |
1942
 \
1943

1944

1945
Rcwa permutation of GF(2)[x] with modulus x^2+x, of order 2
1946

1947
 /
1948
 | (x+1)*P + x+1 if P in 1(x)
1949
 P |-> < (P + x+1)/(x+1) if P in 0(x^2+x)
1950
 | P if P in x(x^2+x)
1951
 \
1952

1953
]
1954

1955

1956
1957
We can easily find 2 normal subgroups of G:
1958
1959
 Example 
1960

1961
gap> N1 := Subgroup(G,[a*b,a*c]);
1962
<rcwa group over GF(2)[x] with 2 generators>
1963
gap> IsNormal(G,N1);
1964
true
1965
gap> Index(G,N1);
1966
2
1967
gap> G/N1;
1968
Group([ (1,2), (1,2), (1,2) ])
1969
gap> N2 := Subgroup(G,[a*b*c,a*c]);;
1970
gap> IsNormal(G,N2);
1971
true
1972
gap> IsSubgroup(N1,N2);
1973
false
1974

1975

1976
1977
Products of even numbers of generators of G may have infinite order. For
1978
example, we have
1979
1980
 Example 
1981

1982
gap> Order(a*b);
1983
2
1984
gap> Order(a*c);
1985
infinity
1986
gap> Order(b*c);
1987
infinity
1988

1989

1990
1991
We would like to have a look at orders of products of odd numbers of
1992
generators. In order to restrict our considerations to essentially different
1993
products (as far as we can easily do this), we use the following auxiliary
1994
function:
1995
1996
 GAP code 
1997

1998
NormedWords := function ( F, lng )
1999

2000
 local words, gens, tuples, w;
2001

2002
 gens := GeneratorsOfGroup(F);
2003
 tuples := EnumeratorOfTuples([1..3],lng);
2004
 words := [];
2005

2006
 for w in tuples do
2007
 if (w[1] = 1 or not 1 in w)
2008
 and PositionSublist(w,[1,1]) = fail
2009
 and PositionSublist(w,[2,2]) = fail
2010
 and PositionSublist(w,[3,3]) = fail
2011
 and PositionSublist(w,[2,1]) = fail
2012
 and w[1] < w[lng]
2013
 and w{[1,lng]} <> [1,2]
2014
 and (w{[1..3]} = [1,2,3] or PositionSublist(w,[1,2,3]) = fail)
2015
 then Add(words,w); fi;
2016
 od;
2017

2018
 words := List(words,word->Product(List(word,i->gens[i])));
2019
 return words;
2020
end;
2021

2022

2023
2024
Now let's compute the possible orders of products of 3, 5, 7 or 9
2025
generators:
2026
2027
 Example 
2028

2029
gap> F := FreeGroup("a","b","c");;
2030
gap> phi := EpimorphismByGenerators(F,G);
2031
[ a, b, c ] -> 
2032
[ ClassTransposition(0,x,1,x), ClassTransposition(0,x^2+1,1,x^2+1), 
2033
 ClassTransposition(1,x,0,x^2+x) ]
2034
gap> B3 := NormedWords(F,3);
2035
[ a*b*c ]
2036
gap> B3 := List(B3,g->g^phi);
2037
[ <rcwa permutation of GF(2)[x] with modulus x^3+x> ]
2038
gap> List(B3,Order);
2039
[ 20 ]
2040
gap> B5 := NormedWords(F,5);
2041
[ a*b*c*a*c, a*b*c*b*c ]
2042
gap> B5 := List(B5,g->g^phi);
2043
[ <rcwa permutation of GF(2)[x] with modulus x^3+x>, 
2044
 <rcwa permutation of GF(2)[x] with modulus x^4+x^3+x^2+x> ]
2045
gap> List(B5,Order);
2046
[ 12, 12 ]
2047
gap> B7 := NormedWords(F,7);
2048
[ a*b*c*a*c*a*c, a*b*c*a*c*b*c, a*b*c*b*c*a*c, a*b*c*b*c*b*c ]
2049
gap> B7 := List(B7,g->g^phi);
2050
[ <rcwa permutation of GF(2)[x] with modulus x^4+x^3+x^2+x>, 
2051
 <rcwa permutation of GF(2)[x] with modulus x^5+x>, 
2052
 <rcwa permutation of GF(2)[x] with modulus x^4+x^3+x^2+x>, 
2053
 <rcwa permutation of GF(2)[x] with modulus x^5+x> ]
2054
gap> List(B7,Order);
2055
[ 12, 12, 12, 30 ]
2056
gap> B9 := NormedWords(F,9);
2057
[ a*b*c*a*b*c*a*b*c, a*b*c*a*c*a*c*a*c, a*b*c*a*c*a*c*b*c, a*b*c*a*c*b*c*a*c, 
2058
 a*b*c*a*c*b*c*b*c, a*b*c*b*c*a*c*a*c, a*b*c*b*c*a*c*b*c, a*b*c*b*c*b*c*a*c, 
2059
 a*b*c*b*c*b*c*b*c ]
2060
gap> B9 := List(B9,g->g^phi);;
2061
gap> List(B9,Order);
2062
[ 20, 4, 30, 12, 42, 30, 4, 42, 12 ]
2063

2064

2065
2066
Enter AssignGlobals(LoadRCWAExamples().OddNumberOfGens_FiniteOrder); in
2067
order to assign the global variables defined in this section.
2068
2069
2070
7.12 An abelian rcwa group over a polynomial ring
2071
2072
We enter a 2-generated abelian wild rcwa group over GF(4)[x]:
2073
2074
 Example 
2075

2076
gap> x := Indeterminate(GF(4),1);; SetName(x,"x");
2077
gap> R := PolynomialRing(GF(4),1);
2078
GF(2^2)[x]
2079
gap> e := One(GF(4));;
2080
gap> p := x^2 + x + e;; q := x^2 + e;;
2081
gap> r := x^2 + x + Z(4);; s := x^2 + x + Z(4)^2;;
2082
gap> cg := List( AllResidues(R,x^2), pol -> [ p, p * pol mod q, q ] );;
2083
gap> ch := List( AllResidues(R,x^2), pol -> [ r, r * pol mod s, s ] );;
2084
gap> g := RcwaMapping( R, q, cg );
2085
<rcwa mapping of GF(2^2)[x] with modulus x^2+1>
2086
gap> h := RcwaMapping( R, s, ch );
2087
<rcwa mapping of GF(2^2)[x] with modulus x^2+x+Z(2^2)^2>
2088
gap> List([g,h],IsTame);
2089
[ false, false ]
2090
gap> G := Group(g,h);
2091
<rcwa group over GF(2^2)[x] with 2 generators>
2092
gap> IsAbelian(G);
2093
true
2094
gap> IsTame(G);
2095
false
2096

2097

2098
2099
It is easy to see that all orbits on GF(4)[x] under the action of G are
2100
finite.
2101
2102
Now we compute the action of the group G on one of its orbits, and make some
2103
statistics of the orbits of G containing polynomials of degree less than 4:
2104
2105
 Example 
2106

2107
gap> orb := Orbit(G,x^5);
2108
[ x^5, x^5+x^4+x^2+1, x^5+x^3+x^2+Z(2^2)*x+Z(2)^0, x^5+x^3, 
2109
 x^5+x^4+x^3+x^2+Z(2^2)^2*x+Z(2^2)^2, x^5+x, x^5+x^4+x^3, 
2110
 x^5+x^2+Z(2^2)^2*x, x^5+x^4+x^2+x, x^5+x^3+x^2+Z(2^2)^2*x+Z(2)^0, 
2111
 x^5+x^4+Z(2^2)*x+Z(2^2), x^5+x^3+x, x^5+x^4+x^3+x^2+Z(2^2)*x+Z(2^2), 
2112
 x^5+x^4+x^3+x+1, x^5+x^2+Z(2^2)*x, x^5+x^4+Z(2^2)^2*x+Z(2^2)^2 ]
2113
gap> H := Action(G,orb);
2114
Group([ (1,2,4,7,6,9,12,14)(3,5,8,11,10,13,15,16), 
2115
 (1,3,6,10)(2,5,9,13)(4,8,12,15)(7,11,14,16) ])
2116
gap> IsAbelian(H); # check ...
2117
true
2118
gap> IsCyclic(H); # H, and therefore also G, is not cyclic
2119
false
2120
gap> Exponent(H);
2121
8
2122
gap> Collected(List(ShortOrbits(G,AllResidues(R,x^4),100),Length));
2123
[ [ 1, 4 ], [ 2, 6 ], [ 4, 12 ], [ 8, 24 ] ]
2124

2125

2126
2127
Changing the generators a little changes the structure of the group and its
2128
action on the underlying ring a lot:
2129
2130
 Example 
2131

2132
gap> cg[1][2] := cg[1][2] + (x^2 + e) * p * q;;
2133
gap> ch[7][2] := ch[7][2] + x * r * s;;
2134
gap> g := RcwaMapping( R, q, cg );; h := RcwaMapping( R, s, ch );;
2135
gap> G := Group(g,h);
2136
<rcwa group over GF(2^2)[x] with 2 generators>
2137
gap> IsAbelian(G);
2138
false
2139
gap> Support(G);
2140
GF(2^2)[x] \ [ 1, Z(2^2), Z(2^2)^2 ]
2141
gap> orb := Orbit(G,Zero(R));;
2142
gap> Length(orb);
2143
87
2144
gap> StructureDescription(Action(G,orb));
2145
"A87"
2146
gap> Collected(List(orb,DegreeOfLaurentPolynomial));
2147
[ [ -infinity, 1 ], [ 1, 2 ], [ 2, 4 ], [ 3, 16 ], [ 4, 64 ] ]
2148
gap> S := AllResidues(R,x^6);;
2149
gap> orbs := ShortOrbits(G,S,-1:finite);;
2150
gap> List(orbs,Length);
2151
[ 87, 1, 1, 1, 2, 2, 2, 2, 2, 4, 4, 4, 20, 4, 12, 4, 20, 4, 4, 12, 8, 8, 
2152
 48, 48, 16, 8, 8, 56, 8, 88, 8, 8, 8, 400, 16, 48, 16, 16, 16, 80, 16, 
2153
 16, 16, 96, 32, 192, 32, 16, 16, 416, 16, 48, 16, 16, 880, 16, 16, 16, 
2154
 16, 16, 16, 16, 16, 16, 848, 16, 16, 32, 16, 16, 16, 16, 16, 16, 16 ]
2155
gap> Position(last,880);
2156
55
2157
gap> Set(orbs[55],DegreeOfLaurentPolynomial); # all elm's have same degree
2158
[ 5 ]
2159
gap> H := Action(G,orbs[55]);;
2160
gap> IsPrimitive(H,MovedPoints(H));
2161
false
2162
gap> List(Blocks(H,MovedPoints(H)),Length);
2163
[ 110, 110, 110, 110, 110, 110, 110, 110 ]
2164

2165

2166
2167
Enter AssignGlobals(LoadRCWAExamples().AbelianGroupOverPolynomialRing); in
2168
order to assign the global variables defined in this section.
2169
2170
2171
7.13 Checking for solvability
2172
2173
Presently there is no general method available for testing wild rcwa groups
2174
for solvability. However, sometimes the question for solvability can be
2175
answered anyway. In the example below, the idea is to find a subgroup U
2176
which acts on a finite set S of integers, and which induces on S a
2177
non-solvable finite permutation group:
2178
2179
 Example 
2180

2181
gap> a := RcwaMapping([[3,0,2],[3, 1,4],[3,0,2],[3,-1,4]]);;
2182
gap> b := RcwaMapping([[3,0,2],[3,13,4],[3,0,2],[3,-1,4]]);;
2183
gap> G := Group(a,b);;
2184
gap> ShortOrbits(Group(Comm(a,b)),[-10..10],100);
2185
[ [ -10 ], [ -9 ], [ -30, -21, -14, -13, -11, -8 ], [ -7 ], [ -6 ], 
2186
 [ -12, -5, -4, -3, -2, 1 ], [ -1 ], [ 0 ], [ 2 ], [ 3 ], 
2187
 [ 4, 5, 6, 7, 10, 15 ], [ 8 ], [ 9 ] ]
2188
gap> S := [ 4, 5, 6, 7, 10, 15 ];;
2189
gap> Cycle(Comm(a,b),4);
2190
[ 4, 7, 10, 15, 5, 6 ]
2191
gap> elm := RepresentativeAction(G,S,Permuted(S,(1,4)),OnTuples);
2192
<rcwa permutation of Z with modulus 81>
2193
gap> List(S,n->n^elm);
2194
[ 7, 5, 6, 4, 10, 15 ]
2195
gap> U := Group(Comm(a,b),elm);
2196
<rcwa group over Z with 2 generators>
2197
gap> Action(U,S);
2198
Group([ (1,4,5,6,2,3), (1,4) ])
2199
gap> IsNaturalSymmetricGroup(last);
2200
true
2201

2202

2203
2204
Thus the subgroup U induces on S a natural symmetric group of degree 6.
2205
Therefore the group G is not solvable. We conclude this example by factoring
2206
the group element elm into generators:
2207
2208
 Example 
2209

2210
gap> F := FreeGroup("a","b");
2211
<free group on the generators [ a, b ]>
2212
gap> RepresentativeActionPreImage(G,S,Permuted(S,(1,4)),OnTuples,F);
2213
a^-2*b^-2*a*b*a^-1*b*a*b^-2*a
2214
gap> a^-2*b^-2*a*b*a^-1*b*a*b^-2*a = elm;
2215
true
2216

2217

2218
2219
Enter AssignGlobals(LoadRCWAExamples().CheckingForSolvability); in order to
2220
assign the global variables defined in this section.
2221
2222
2223
7.14 Some examples over (semi)localizations of the integers
2224
2225
We start with something one can observe when trying to transfer an rcwa
2226
mapping from the ring of integers to one of its localizations:
2227
2228
 Example 
2229

2230
gap> a := RcwaMapping([[3,0,2],[3,1,4],[3,0,2],[3,-1,4]]);;
2231
gap> IsBijective(a);
2232
true
2233
gap> a2 := LocalizedRcwaMapping(a,2);
2234
<rcwa mapping of Z_( 2 ) with modulus 4>
2235
gap> IsSurjective(a2); # As expected
2236
true
2237
gap> IsInjective(a2); # Why not??
2238
false
2239
gap> 0^a2;
2240
0
2241
gap> (1/3)^a2; # That's the reason!
2242
0
2243

2244

2245
2246
The above can also be explained easily by pointing out that the modulus of
2247
the inverse of a is 3, and that 3 is a unit of ℤ_(2). Moving to ℤ_(2,3)
2248
solves this problem:
2249
2250
 Example 
2251

2252
gap> a23 := SemilocalizedRcwaMapping(a,[2,3]);
2253
<rcwa mapping of Z_( 2, 3 ) with modulus 4>
2254
gap> IsBijective(a23);
2255
true
2256

2257

2258
2259
We get additional finite cycles, e.g.:
2260
2261
 Example 
2262

2263
gap> List(ShortOrbits(Group(a23),[0..50]/5,50),orb->Cycle(a23,orb[1]));
2264
[ [ 0 ], [ 1/5, 2/5, 3/5 ], 
2265
 [ 4/5, 6/5, 9/5, 8/5, 12/5, 18/5, 27/5, 19/5, 13/5, 11/5, 7/5 ], 
2266
 [ 1 ], [ 2, 3 ], [ 14/5, 21/5, 17/5 ], 
2267
 [ 16/5, 24/5, 36/5, 54/5, 81/5, 62/5, 93/5, 71/5, 52/5, 78/5, 117/5, 
2268
 89/5, 68/5, 102/5, 153/5, 116/5, 174/5, 261/5, 197/5, 149/5, 
2269
 113/5, 86/5, 129/5, 98/5, 147/5, 109/5, 83/5, 61/5, 47/5, 34/5, 
2270
 51/5, 37/5, 29/5, 23/5 ], [ 4, 6, 9, 7, 5 ] ]
2271
gap> List(last,Length);
2272
[ 1, 3, 11, 1, 2, 3, 34, 5 ]
2273
gap> List(ShortOrbits(Group(a23),[0..50]/7,50),orb->Cycle(a23,orb[1]));
2274
[ [ 0 ], [ -1/7, 1/7 ], [ 2/7, 3/7, 4/7, 6/7, 9/7, 5/7 ], [ 1 ], 
2275
 [ 2, 3 ], [ 4, 6, 9, 7, 5 ] ]
2276
gap> List(last,Length);
2277
[ 1, 2, 6, 1, 2, 5 ]
2278

2279

2280
2281
However the structure of a group with prime set P remains invariant under
2282
the transfer from ℤ to ℤ_(P).
2283
2284
Transferring a non-invertible rcwa mapping from the ring of integers to some
2285
of its (semi)localizations can also turn it into an invertible one:
2286
2287
 Example 
2288

2289
gap> v := RcwaMapping([[6,0,1],[1,-7,2],[6,0,1],[1,-1,1],
2290
>  [6,0,1],[1, 1,2],[6,0,1],[1,-1,1]]);;
2291
gap> Display(v);
2292

2293
Rcwa mapping of Z with modulus 8
2294

2295
 /
2296
 | 6n if n in 0(2)
2297
 | n-1 if n in 3(4)
2298
 n |-> < (n-7)/2 if n in 1(8)
2299
 | (n+1)/2 if n in 5(8)
2300
 |
2301
 \
2302

2303
gap> IsInjective(v);
2304
true
2305
gap> IsSurjective(v);
2306
false
2307
gap> Image(v);
2308
Z \ 4(12) U 8(12)
2309
gap> Difference(Integers,last);
2310
4(12) U 8(12)
2311
gap> v2 := LocalizedRcwaMapping(v,2);
2312
<rcwa mapping of Z_( 2 ) with modulus 8>
2313
gap> IsBijective(v2);
2314
true
2315
gap> Display(v2^-1);
2316

2317
Rcwa permutation of Z_( 2 ) with modulus 4
2318

2319
 /
2320
 | 1/3 n / 2 if n in 0(4)
2321
 | 2 n + 7 if n in 1(4)
2322
 n |-> < n + 1 if n in 2(4)
2323
 | 2 n - 1 if n in 3(4)
2324
 |
2325
 \
2326

2327
gap> S := ResidueClass(Z_pi(2),2,0);; l := [S];;
2328
gap> for i in [1..10] do Add(l,l[Length(l)]^v2); od;
2329
gap> l; # Visibly v2 is wild ...
2330
[ 0(2), 0(4), 0(8), 0(16), 0(32), 0(64), 0(128), 0(256), 0(512),
2331
 0(1024), 0(2048) ]
2332
gap> w2 := RcwaMapping(Z_pi(2),[[1,0,2],[2,-1,1],[1,1,1],[2,-1,1]]);;
2333
gap> v2w2 := Comm(v2,w2);; v2w2^-1;;
2334
gap> Display(v2w2);
2335

2336
Rcwa permutation of Z_( 2 ) with modulus 8
2337

2338
 /
2339
 | 3 n if n in 2(4)
2340
 | n + 4 if n in 1(8)
2341
 n |-> < n - 4 if n in 5(8)
2342
 | n if n in 0(4) U 3(4)
2343
 |
2344
 \
2345

2346

2347
2348
Again, viewed as an rcwa mapping of the integers the commutator given at the
2349
end of the example would not be surjective.
2350
2351
Enter AssignGlobals(LoadRCWAExamples().Semilocals); in order to assign the
2352
global variables defined in this section.
2353
2354
2355
7.15 Twisting 257-cycles into an rcwa mapping with modulus 32
2356
2357
We define an rcwa mapping x of order 257 with modulus 32. The easiest way to
2358
construct such a mapping is to prescribe a transition graph and then to
2359
assign suitable affine mappings to its vertices.
2360
2361
 Example 
2362

2363
gap> x_257 := RcwaMapping(
2364
>  [[ 16, 2, 1], [ 16, 18, 1], [ 1, 16, 1], [ 16, 18, 1],
2365
>  [ 1, 16, 1], [ 16, 18, 1], [ 1, 16, 1], [ 16, 18, 1],
2366
>  [ 1, 16, 1], [ 16, 18, 1], [ 1, 16, 1], [ 16, 18, 1],
2367
>  [ 1, 16, 1], [ 16, 18, 1], [ 1, 16, 1], [ 16, 18, 1],
2368
>  [ 1, 0, 16], [ 16, 18, 1], [ 1,-14, 1], [ 16, 18, 1],
2369
>  [ 1,-14, 1], [ 16, 18, 1], [ 1,-14, 1], [ 16, 18, 1],
2370
>  [ 1,-14, 1], [ 16, 18, 1], [ 1,-14, 1], [ 16, 18, 1],
2371
>  [ 1,-14, 1], [ 16, 18, 1], [ 1,-14, 1], [ 1,-31, 1]]);;
2372
gap> Order(x_257);; Display(x_257:CycleNotation:=false);
2373

2374
Rcwa permutation of Z with modulus 32, of order 257
2375

2376
 /
2377
 | 16n+18 if n in 1(2) \ 31(32)
2378
 | n+16 if n in 2(32) U 4(32) U 6(32) U 8(32) U 10(32) U 
2379
 | 12(32) U 14(32)
2380
 | n-14 if n in 18(32) U 20(32) U 22(32) U 24(32) U 26(32) U 
2381
 n |-> < 28(32) U 30(32)
2382
 | 16n+2 if n in 0(32)
2383
 | n/16 if n in 16(32)
2384
 | n-31 if n in 31(32)
2385
 |
2386
 \
2387

2388
gap> Display(x_257);
2389

2390
Rcwa permutation of Z with modulus 32, of order 257
2391

2392
( 0(32), 2(512), 18(512), 4(512), 20(512), 6(512), 22(512), 
2393
 8(512), 24(512), 10(512), 26(512), 12(512), 28(512), 14(512), 
2394
 30(512), 16(512), 1(32), 34(512), 50(512), 36(512), 52(512), 
2395
 38(512), 54(512), 40(512), 56(512), 42(512), 58(512), 44(512), 
2396
 60(512), 46(512), 62(512), 48(512), 3(32), 66(512), 82(512), 
2397
 68(512), 84(512), 70(512), 86(512), 72(512), 88(512), 74(512), 
2398
 90(512), 76(512), 92(512), 78(512), 94(512), 80(512), 5(32), 
2399
 98(512), 114(512), 100(512), 116(512), 102(512), 118(512), 
2400
 104(512), 120(512), 106(512), 122(512), 108(512), 124(512), 
2401
 110(512), 126(512), 112(512), 7(32), 130(512), 146(512), 
2402
 132(512), 148(512), 134(512), 150(512), 136(512), 152(512), 
2403
 138(512), 154(512), 140(512), 156(512), 142(512), 158(512), 
2404
 144(512), 9(32), 162(512), 178(512), 164(512), 180(512), 
2405
 166(512), 182(512), 168(512), 184(512), 170(512), 186(512), 
2406
 172(512), 188(512), 174(512), 190(512), 176(512), 11(32), 
2407
 194(512), 210(512), 196(512), 212(512), 198(512), 214(512), 
2408
 200(512), 216(512), 202(512), 218(512), 204(512), 220(512), 
2409
 206(512), 222(512), 208(512), 13(32), 226(512), 242(512), 
2410
 228(512), 244(512), 230(512), 246(512), 232(512), 248(512), 
2411
 234(512), 250(512), 236(512), 252(512), 238(512), 254(512), 
2412
 240(512), 15(32), 258(512), 274(512), 260(512), 276(512), 
2413
 262(512), 278(512), 264(512), 280(512), 266(512), 282(512), 
2414
 268(512), 284(512), 270(512), 286(512), 272(512), 17(32), 
2415
 290(512), 306(512), 292(512), 308(512), 294(512), 310(512), 
2416
 296(512), 312(512), 298(512), 314(512), 300(512), 316(512), 
2417
 302(512), 318(512), 304(512), 19(32), 322(512), 338(512), 
2418
 324(512), 340(512), 326(512), 342(512), 328(512), 344(512), 
2419
 330(512), 346(512), 332(512), 348(512), 334(512), 350(512), 
2420
 336(512), 21(32), 354(512), 370(512), 356(512), 372(512), 
2421
 358(512), 374(512), 360(512), 376(512), 362(512), 378(512), 
2422
 364(512), 380(512), 366(512), 382(512), 368(512), 23(32), 
2423
 386(512), 402(512), 388(512), 404(512), 390(512), 406(512), 
2424
 392(512), 408(512), 394(512), 410(512), 396(512), 412(512), 
2425
 398(512), 414(512), 400(512), 25(32), 418(512), 434(512), 
2426
 420(512), 436(512), 422(512), 438(512), 424(512), 440(512), 
2427
 426(512), 442(512), 428(512), 444(512), 430(512), 446(512), 
2428
 432(512), 27(32), 450(512), 466(512), 452(512), 468(512), 
2429
 454(512), 470(512), 456(512), 472(512), 458(512), 474(512), 
2430
 460(512), 476(512), 462(512), 478(512), 464(512), 29(32), 
2431
 482(512), 498(512), 484(512), 500(512), 486(512), 502(512), 
2432
 488(512), 504(512), 490(512), 506(512), 492(512), 508(512), 
2433
 494(512), 510(512), 496(512), 31(32) )
2434

2435
gap> Length(Cycle(x_257,0));
2436
257
2437

2438

2439
2440
Enter AssignGlobals(LoadRCWAExamples().LongCyclesOfPrimeLength); in order to
2441
assign the global variables defined in this section.
2442
2443
2444
7.16 The behaviour of the moduli of powers
2445
2446
We give some examples of how the series of the moduli of powers of a given
2447
rcwa mapping of the integers can look like.
2448
2449
 Example 
2450

2451
gap> a := RcwaMapping([[3,0,2],[3, 1,4],[3,0,2],[3,-1,4]]);;
2452
gap> List([0..4],i->Modulus(a^i));
2453
[ 1, 4, 16, 64, 256 ]
2454
gap> e1 := RcwaMapping([[1,4,1],[2,0,1],[1,0,2],[2,0,1]]);;
2455
gap> e2 := RcwaMapping([[1,4,1],[2,0,1],[1,0,2],[1,0,1],
2456
>  [1,4,1],[2,0,1],[1,0,1],[1,0,1]]);;
2457
gap> List([e1,e2],Order);
2458
[ infinity, infinity ]
2459
gap> List([1..20],i->Modulus(e1^i));
2460
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 ]
2461
gap> List([1..20],i->Modulus(e2^i));
2462
[ 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4 ]
2463
gap> Display(e2);
2464

2465
Rcwa permutation of Z with modulus 8, of order infinity
2466

2467
 /
2468
 | n+4 if n in 0(4)
2469
 | 2n if n in 1(4)
2470
 n |-> < n/2 if n in 2(8)
2471
 | n if n in 3(4) U 6(8)
2472
 |
2473
 \
2474

2475
gap> e2^2 = Restriction(RcwaMapping([[1,2,1]]),RcwaMapping([[4,0,1]]));
2476
true
2477
gap> g:=RcwaMapping([[2,2,1],[1, 4,1],[1,0,2],[2,2,1],[1,-4,1],[1,-2,1]]);;
2478
gap> h:=RcwaMapping([[2,2,1],[1,-2,1],[1,0,2],[2,2,1],[1,-1,1],[1, 1,1]]);;
2479
gap> List([0..7],i->Modulus(g^i));
2480
[ 1, 6, 12, 12, 12, 12, 6, 1 ]
2481
gap> List([1..18],i->Modulus((g^3*h)^i));
2482
[ 12, 6, 12, 12, 12, 6, 12, 6, 12, 12, 12, 6, 12, 6, 12, 12, 12, 6 ]
2483
gap> u := RcwaMapping([[3,0,5],[9,1,5],[3,-1,5],[9,-2,5],[9,4,5]]);;
2484
gap> List([0..3],i->Modulus(u^i));
2485
[ 1, 5, 25, 125 ]
2486
gap> v6 := RcwaMapping([[-1,2,1],[1,-1,1],[1,-1,1]]);;
2487
gap> List([0..6],i->Modulus(v6^i));
2488
[ 1, 3, 3, 3, 3, 3, 1 ]
2489
gap> w8 := RcwaMapping([[-1,3,1],[1,-1,1],[1,-1,1],[1,-1,1]]);;
2490
gap> List([0..8],i->Modulus(w8^i));
2491
[ 1, 4, 4, 4, 4, 4, 4, 4, 1 ]
2492
gap> z := RcwaMapping([[2,1,1],[1, 1,1],[2,-1,1],[2, -2,1],
2493
>  [1,6,2],[1, 1,1],[1,-6,2],[2, 5,1],
2494
>  [1,6,2],[1, 1,1],[1, 1,1],[2, -5,1],
2495
>  [1,0,1],[1,-4,1],[1, 0,1],[2,-10,1]]);;
2496
gap> IsBijective(z);
2497
true
2498
gap> List([0..25],i->Modulus(z^i));
2499
[ 1, 16, 32, 64, 64, 128, 128, 128, 128, 128, 128, 256, 256, 256, 256, 
2500
 256, 256, 512, 512, 512, 512, 512, 512, 1024, 1024, 1024 ]
2501

2502

2503
2504
Enter AssignGlobals(LoadRCWAExamples().ModuliOfPowers); in order to assign
2505
the global variables defined in this section.
2506
2507
2508
7.17 Images and preimages under the Collatz mapping
2509
2510
We have a look at the images of the residue class 1(2) under powers of the
2511
Collatz mapping.
2512
2513
 Example 
2514

2515
gap> T := RcwaMapping([[1,0,2],[3,1,2]]);;
2516
gap> S0 := ResidueClass(Integers,2,1);;
2517
gap> S1 := S0^T;
2518
2(3)
2519
gap> S2 := S1^T;
2520
1(3) U 8(9)
2521
gap> S3 := S2^T;
2522
2(3) U 4(9)
2523
gap> S4 := S3^T;
2524
Z \ 0(3) U 5(9)
2525
gap> S5 := S4^T;
2526
Z \ 0(3) U 7(9)
2527
gap> S6 := S5^T;
2528
Z \ 0(3)
2529
gap> S7 := S6^T;
2530
Z \ 0(3)
2531

2532

2533
2534
Thus the image gets stable after applying the mapping T for the 6th time.
2535
Hence T^6 maps the residue class 1(2) surjectively onto the union of the
2536
residue classes 1(3) and 2(3), which T stabilizes setwise. Now we would like
2537
to determine the preimages of 1(3) and 2(3) in 1(2) under T^6. The residue
2538
class 1(2) has to be the disjoint union of these sets.
2539
2540
 Example 
2541

2542
gap> U := Intersection(PreImage(T^6,ResidueClass(Integers,3,1)),S0);
2543
<union of 11 residue classes (mod 64)>
2544
gap> V := Intersection(PreImage(T^6,ResidueClass(Integers,3,2)),S0);
2545
<union of 21 residue classes (mod 64)>
2546
gap> AsUnionOfFewClasses(U);
2547
[ 1(64), 5(64), 7(64), 9(64), 21(64), 23(64), 29(64), 31(64), 49(64), 
2548
 51(64), 59(64) ]
2549
gap> AsUnionOfFewClasses(V);
2550
[ 3(32), 11(32), 13(32), 15(32), 25(32), 17(64), 19(64), 27(64), 33(64), 
2551
 37(64), 39(64), 41(64), 53(64), 55(64), 61(64), 63(64) ]
2552
gap> Union(U,V) = S0 and Intersection(U,V) = []; # consistency check
2553
true
2554

2555

2556
2557
The images of the residue class 0(3) under powers of T look as follows:
2558
2559
 Example 
2560

2561
gap> S0 := ResidueClass(Integers,3,0);
2562
0(3)
2563
gap> S1 := S0^T;
2564
0(3) U 5(9)
2565
gap> S2 := S1^T;
2566
0(3) U 5(9) U 7(9) U 8(27)
2567
gap> S3 := S2^T;
2568
<union of 20 residue classes (mod 27) (6 classes)>
2569
gap> S4 := S3^T;
2570
<union of 73 residue classes (mod 81)>
2571
gap> S5 := S4^T;
2572
Z \ 10(81) U 37(81)
2573
gap> S6 := S5^T;
2574
Integers
2575
gap> S7 := S6^T;
2576
Integers
2577

2578

2579
2580
Thus every integer is the image of a multiple of 3 under T^6. This means
2581
that it would be sufficient to prove the 3n+1 conjecture for multiples of 3.
2582
We can obtain the corresponding result for multiples of 5 as follows:
2583
2584
 Example 
2585

2586
gap> S := [ResidueClass(Integers,5,0)];
2587
[ 0(5) ]
2588
gap> for i in [1..12] do Add(S,S[i]^T); od;
2589
gap> for s in S do View(s); Print("\n"); od;
2590
0(5)
2591
0(5) U 8(15)
2592
0(5) U 4(15) U 8(15)
2593
0(5) U 2(15) U 4(15) U 8(15) U 29(45)
2594
<union of 73 residue classes (mod 135)>
2595
<union of 244 residue classes (mod 405)>
2596
<union of 784 residue classes (mod 1215)>
2597
<union of 824 residue classes (mod 1215)>
2598
<union of 2593 residue classes (mod 3645)>
2599
<union of 2647 residue classes (mod 3645)>
2600
<union of 2665 residue classes (mod 3645)>
2601
<union of 2671 residue classes (mod 3645)>
2602
1(3) U 2(3) U 0(15)
2603
gap> Union(S[13],ResidueClass(Integers,3,0));
2604
Integers
2605
gap>  List(S,Si->Float(Density(Si)));
2606
[ 0.2, 0.266667, 0.333333, 0.422222, 0.540741, 0.602469, 0.645267, 
2607
 0.678189, 0.711385, 0.7262, 0.731139, 0.732785, 0.733333 ]
2608

2609

2610
2611
Enter AssignGlobals(LoadRCWAExamples().CollatzMapping); in order to assign
2612
the global variables defined in this section.
2613
2614
2615
7.18 An extension of the Collatz mapping T to a permutation of ℤ^2
2616
2617
The Collatz mapping T is surjective, but not injective:
2618
2619
 Example 
2620

2621
gap> T := RcwaMapping([[1,0,2],[3,1,2]]);;
2622
gap> Display(T);
2623

2624
Rcwa mapping of Z with modulus 2
2625

2626
 /
2627
 | n/2 if n in 0(2)
2628
 n |-> < (3n+1)/2 if n in 1(2)
2629
 |
2630
 \
2631

2632
gap> IsInjective(T); IsSurjective(T);
2633
false
2634
true
2635
gap> PreImages(T,2);
2636
[ 1, 4 ]
2637

2638

2639
2640
Often, dealing with rcwa permutations is easier. Indeed the Collatz
2641
mapping T can be extended in natural ways to permutations of ℤ^2. For
2642
example, the following permutation acts on the second coordinate just
2643
like T:
2644
2645
 Example 
2646

2647
gap> Sigma_T := RcwaMapping( Integers^2, [[1,0],[0,6]],
2648
>  [[[[2,0],[0,1]],[0,0],2],
2649
>  [[[4,0],[0,3]],[2,1],2],
2650
>  [[[2,0],[0,1]],[0,0],2],
2651
>  [[[4,0],[0,3]],[2,1],2],
2652
>  [[[4,0],[0,1]],[0,0],2],
2653
>  [[[4,0],[0,3]],[2,1],2]] );
2654
<rcwa mapping of Z^2 with modulus (1,0)Z+(0,6)Z>
2655
gap> IsBijective(Sigma_T);
2656
true
2657
gap> Display(Sigma_T);
2658

2659
Rcwa permutation of Z^2 with modulus (1,0)Z+(0,6)Z
2660

2661
 /
2662
 | (2m+1,(3n+1)/2) if (m,n) in (0,1)+(1,0)Z+(0,2)Z
2663
 | (m,n/2) if (m,n) in (0,0)+(1,0)Z+(0,6)Z U 
2664
 (m,n) |-> < (0,2)+(1,0)Z+(0,6)Z
2665
 | (2m,n/2) if (m,n) in (0,4)+(1,0)Z+(0,6)Z
2666
 |
2667
 \
2668

2669
gap> Display(Sigma_T^-1);
2670

2671
Rcwa permutation of Z^2 with modulus (2,0)Z+(0,3)Z
2672

2673
 /
2674
 | (m,2n) if (m,n) in (0,0)+(1,0)Z+(0,3)Z U 
2675
 | (0,1)+(1,0)Z+(0,3)Z
2676
 (m,n) |-> < (m/2,2n) if (m,n) in (0,2)+(2,0)Z+(0,3)Z
2677
 | ((m-1)/2,(2n-1)/3) if (m,n) in (1,2)+(2,0)Z+(0,3)Z
2678
 |
2679
 \
2680

2681

2682
2683
Now, the 3n+1 conjecture is equivalent to the assertion that the line n=4 is
2684
a set of representatives for the cycles of Sigma_T on the half plane n > 0.
2685
2686
Let's have a look at a part of a cycle of Sigma_T:
2687
2688
 Example 
2689

2690
gap> Trajectory(Sigma_T,[0,27],75);
2691
[ [ 0, 27 ], [ 1, 41 ], [ 3, 62 ], [ 3, 31 ], [ 7, 47 ], [ 15, 71 ], 
2692
 [ 31, 107 ], [ 63, 161 ], [ 127, 242 ], [ 127, 121 ], [ 255, 182 ], 
2693
 [ 255, 91 ], [ 511, 137 ], [ 1023, 206 ], [ 1023, 103 ], 
2694
 [ 2047, 155 ], [ 4095, 233 ], [ 8191, 350 ], [ 8191, 175 ], 
2695
 [ 16383, 263 ], [ 32767, 395 ], [ 65535, 593 ], [ 131071, 890 ], 
2696
 [ 131071, 445 ], [ 262143, 668 ], [ 262143, 334 ], [ 524286, 167 ], 
2697
 [ 1048573, 251 ], [ 2097147, 377 ], [ 4194295, 566 ], [ 4194295, 283 ], 
2698
 [ 8388591, 425 ], [ 16777183, 638 ], [ 16777183, 319 ], 
2699
 [ 33554367, 479 ], [ 67108735, 719 ], [ 134217471, 1079 ], 
2700
 [ 268434943, 1619 ], [ 536869887, 2429 ], [ 1073739775, 3644 ], 
2701
 [ 1073739775, 1822 ], [ 2147479550, 911 ], [ 4294959101, 1367 ], 
2702
 [ 8589918203, 2051 ], [ 17179836407, 3077 ], [ 34359672815, 4616 ], 
2703
 [ 34359672815, 2308 ], [ 68719345630, 1154 ], [ 68719345630, 577 ], 
2704
 [ 137438691261, 866 ], [ 137438691261, 433 ], [ 274877382523, 650 ], 
2705
 [ 274877382523, 325 ], [ 549754765047, 488 ], [ 549754765047, 244 ], 
2706
 [ 1099509530094, 122 ], [ 1099509530094, 61 ], [ 2199019060189, 92 ], 
2707
 [ 2199019060189, 46 ], [ 4398038120378, 23 ], [ 8796076240757, 35 ], 
2708
 [ 17592152481515, 53 ], [ 35184304963031, 80 ], [ 35184304963031, 40 ], 
2709
 [ 70368609926062, 20 ], [ 70368609926062, 10 ], [ 140737219852124, 5 ], 
2710
 [ 281474439704249, 8 ], [ 281474439704249, 4 ], [ 562948879408498, 2 ], 
2711
 [ 562948879408498, 1 ], [ 1125897758816997, 2 ], 
2712
 [ 1125897758816997, 1 ], [ 2251795517633995, 2 ], 
2713
 [ 2251795517633995, 1 ] ]
2714
gap> Trajectory(Sigma_T^-1,[0,27],20);
2715
[ [ 0, 27 ], [ 0, 54 ], [ 0, 108 ], [ 0, 216 ], [ 0, 432 ], [ 0, 864 ], 
2716
 [ 0, 1728 ], [ 0, 3456 ], [ 0, 6912 ], [ 0, 13824 ], [ 0, 27648 ], 
2717
 [ 0, 55296 ], [ 0, 110592 ], [ 0, 221184 ], [ 0, 442368 ], 
2718
 [ 0, 884736 ], [ 0, 1769472 ], [ 0, 3538944 ], [ 0, 7077888 ], 
2719
 [ 0, 14155776 ] ]
2720

2721

2722
2723
While it seems easy to make conjectures regarding the behaviour of cycles of
2724
Sigma_T, obtaining results on it is apparently hard. We observe however that
2725
Sigma_T can be written as a product of two permutations of ℤ^2 whose cycles
2726
can be described easily:
2727
2728
 Example 
2729

2730
gap> a := RcwaMapping(Integers^2,[[1,0],[0,2]],[[[[4,0],[0,1]],[0, 0],2],
2731
>  [[[4,0],[0,1]],[2,-1],2]]);
2732
<rcwa mapping of Z^2 with modulus (1,0)Z+(0,2)Z>
2733
gap> b := a^-1*Sigma_T;
2734
<rcwa permutation of Z^2 with modulus (2,0)Z+(0,3)Z>
2735
gap> Display(a);
2736

2737
Rcwa permutation of Z^2 with modulus (1,0)Z+(0,2)Z
2738

2739
 /
2740
 | (2m,n/2) if (m,n) in (0,0)+(1,0)Z+(0,2)Z
2741
 (m,n) |-> < (2m+1,(n-1)/2) if (m,n) in (0,1)+(1,0)Z+(0,2)Z
2742
 |
2743
 \
2744

2745
gap> Display(b);
2746

2747
Rcwa permutation of Z^2 with modulus (2,0)Z+(0,3)Z
2748

2749
 /
2750
 | (m,3n+2) if (m,n) in (1,0)+(2,0)Z+(0,1)Z
2751
 | (m/2,n) if (m,n) in (0,0)+(2,0)Z+(0,3)Z U 
2752
 (m,n) |-> < (0,1)+(2,0)Z+(0,3)Z
2753
 | (m,n) if (m,n) in (0,2)+(2,0)Z+(0,3)Z
2754
 |
2755
 \
2756

2757

2758
2759
It is easy to see that both a and b have infinite order. The cycles of a
2760
have roughly hyperbolic shape and run, so to speak, from (0,± ∞) to (± ∞,0).
2761
A given cycle contains only finitely many points both of whose coordinates
2762
are nonzero. The fixed points of a are (0,0) and (-1,-1). We have a look at
2763
an example of a cycle of a:
2764
2765
 Example 
2766

2767
gap> Trajectory(a,[1000,1000],15);
2768
[ [ 1000, 1000 ], [ 2000, 500 ], [ 4000, 250 ], [ 8000, 125 ], 
2769
 [ 16001, 62 ], [ 32002, 31 ], [ 64005, 15 ], [ 128011, 7 ], 
2770
 [ 256023, 3 ], [ 512047, 1 ], [ 1024095, 0 ], [ 2048190, 0 ], 
2771
 [ 4096380, 0 ], [ 8192760, 0 ], [ 16385520, 0 ] ]
2772
gap> Trajectory(a^-1,[1000,1000],15);
2773
[ [ 1000, 1000 ], [ 500, 2000 ], [ 250, 4000 ], [ 125, 8000 ], 
2774
 [ 62, 16001 ], [ 31, 32002 ], [ 15, 64005 ], [ 7, 128011 ], 
2775
 [ 3, 256023 ], [ 1, 512047 ], [ 0, 1024095 ], [ 0, 2048190 ], 
2776
 [ 0, 4096380 ], [ 0, 8192760 ], [ 0, 16385520 ] ]
2777

2778

2779
2780
It is left as an easy exercise to the reader to find out how the cycles of b
2781
look like.
2782
2783
Enter AssignGlobals(LoadRCWAExamples().ZxZ); in order to assign the global
2784
variables defined in this section.
2785
2786
2787
7.19 Finite quotients of Grigorchuk groups
2788
2789
In this section, we show how to construct finite quotients of the two
2790
infinite periodic groups introduced by Rostislav Grigorchuk in [Gri80] with
2791
the help of RCWA. The first of these, nowadays known as Grigorchuk group, is
2792
investigated in an example given on the GAP website -- see
2793
http://www.gap-system.org/Doc/Examples/grigorchuk.html. The RCWA package
2794
permits a simpler and more elegant construction of the finite quotients of
2795
this group: The function TopElement given on the mentioned webpage gets
2796
unnecessary, and the function SequenceElement can be simplified as follows:
2797
2798

2799

2800
SequenceElement := function ( r, level )
2801

2802
 return Permutation(Product(Filtered([1..level-1],k->k mod 3 <> r),
2803
 k->ClassTransposition( 2^(k-1)-1,2^(k+1),
2804
 2^k+2^(k-1)-1,2^(k+1))),
2805
 [0..2^level-1]);
2806
end;
2807

2808

2809
2810
The actual constructors for the generators are modified as follows:
2811
2812

2813

2814
a := level -> Permutation(ClassTransposition(0,2,1,2),[0..2^level-1]);
2815
b := level -> SequenceElement(0,level);
2816
c := level -> SequenceElement(2,level);
2817
d := level -> SequenceElement(1,level);
2818

2819

2820
2821
All computations given on the webpage can now be done just as with the
2822
original construction of the quotients of the Grigorchuk group. In the
2823
sequel, we construct finite quotients of the second group introduced
2824
in [Gri80]:
2825
2826
 Example 
2827

2828
gap> FourCycle := RcwaMapping((4,5,6,7),[4..7]);
2829
( 0(4), 1(4), 2(4), 3(4) )
2830
gap> GrigorchukGroup2Generator := function ( level )
2831
>  if level = 1 then return FourCycle; else
2832
>  return Restriction(FourCycle, RcwaMapping([[4,1,1]]))
2833
>  * Restriction(FourCycle, RcwaMapping([[4,3,1]]))
2834
>  * Restriction(GrigorchukGroup2Generator(level-1),
2835
>  RcwaMapping([[4,0,1]]));
2836
>  fi;
2837
>  end;;
2838
gap> GrigorchukGroup2 := level -> Group(FourCycle,
2839
>  GrigorchukGroup2Generator(level));;
2840

2841

2842
2843
We can do similar things as shown in the example on the GAP webpage for the
2844
first Grigorchuk group:
2845
2846
 Example 
2847

2848
gap> G := List([1..4],lev->GrigorchukGroup2(lev)); # The first 4 quotients.
2849
[ <rcwa group over Z with 2 generators>, 
2850
 <rcwa group over Z with 2 generators>, 
2851
 <rcwa group over Z with 2 generators>, 
2852
 <rcwa group over Z with 2 generators> ]
2853
gap> H := List([1..4],lev->Action(G[lev],[0..4^lev-1])); # Isom. perm.-gps.
2854
[ Group([ (1,2,3,4), (1,2,3,4) ]), 
2855
 Group([ (1,2,3,4)(5,6,7,8)(9,10,11,12)(13,14,15,16), 
2856
 (1,5,9,13)(2,6,10,14)(4,8,12,16) ]), 
2857
 <permutation group with 2 generators>, 
2858
 <permutation group with 2 generators> ]
2859
gap> List(H,Size);
2860
[ 4, 1024, 4294967296, 1329227995784915872903807060280344576 ]
2861
gap> List(last,n->Collected(Factors(n)));
2862
[ [ [ 2, 2 ] ], [ [ 2, 10 ] ], [ [ 2, 32 ] ], [ [ 2, 120 ] ] ]
2863
gap> List(H,NilpotencyClassOfGroup); 
2864
[ 1, 6, 14, 40 ]
2865

2866

2867
2868
Enter AssignGlobals(LoadRCWAExamples().GrigorchukQuotients); in order to
2869
assign the global variables defined in this section.
2870
2871
2872
7.20 Forward orbits of a monoid with 2 generators
2873
2874
The 3n+1 conjecture asserts that the forward orbit of any positive integer
2875
under the Collatz mapping T contains 1. In contrast, it seems likely that
2876
most trajectories of the two mappings
2877
2878
/
2879
| n/2 if n even,
2880
T_5+/-: Z -> Z, n |-> <
2881
| (5n +/- 1)/2 if n odd
2882
\
2883
2884
diverge. However we can show by means of computation that the forward orbit
2885
of any positive integer under the action of the monoid generated by the two
2886
mappings T_5^- and T_5^+ indeed contains 1. First of all, we enter the
2887
generators:
2888
2889
 Example 
2890

2891
gap> T5m := RcwaMapping([[1,0,2],[5,-1,2]]);;
2892
gap> T5p := RcwaMapping([[1,0,2],[5, 1,2]]);;
2893

2894

2895
2896
We look for a number k such that for any residue class r(2^k) there is a
2897
product f of k mappings T_5^± whose restriction to r(2^k) is given by n ↦
2898
(an+b)/c where c>a:
2899
2900
 Example 
2901

2902
gap> k := 1;;
2903
gap> repeat
2904
>  maps := List(Tuples([T5m,T5p],k),Product);
2905
>  decr := List(maps,DecreasingOn);
2906
>  decreasable := Union(decr);
2907
>  Print(k,": "); View(decreasable); Print("\n");
2908
>  k := k + 1;
2909
>  until decreasable = Integers;
2910
1: 0(2)
2911
2: 0(4)
2912
3: Z \ 1(8) U 7(8)
2913
4: 0(4) U 3(16) U 6(16) U 10(16) U 13(16)
2914
5: Z \ 7(32) U 25(32)
2915
6: <union of 48 residue classes (mod 64)>
2916
7: Integers
2917

2918

2919
2920
Thus k=7 serves our purposes. To be sure that for any positive integer n our
2921
monoid contains a mapping f such that n^f<n, we still need to check this
2922
condition for small n. Since in case c>a we have (an+b)/c ≥ n if only if n ≤
2923
b/(c-a), we only need to check those n which are not larger than the largest
2924
coefficient b_r(m) occurring in any of the products under consideration:
2925
2926
 Example 
2927

2928
gap> maxb := Maximum(List(maps,f->Maximum(List(Coefficients(f),t->t[2]))));
2929
25999
2930
gap> small := Filtered([1..maxb],n->ForAll(maps,f->n^f>=n));
2931
[ 1, 7, 9, 11 ]
2932

2933

2934
2935
This means that except of 1, only for n ∈ {7,9,11} there is no product of 7
2936
mappings T_5^± which maps n to a smaller integer. We check that also the
2937
forward orbits of these three integers contain 1 by successively computing
2938
preimages of 1:
2939
2940
 Example 
2941

2942
gap> S := [1];; k := 0;;
2943
gap> repeat
2944
>  S := Union(S,PreImage(T5m,S),PreImage(T5p,S));
2945
>  k := k+1;
2946
>  until IsSubset(S,small);
2947
gap> k;
2948
17
2949

2950

2951
2952
Enter AssignGlobals(LoadRCWAExamples().CollatzMapping); in order to assign
2953
the global variables defined in this section.
2954
2955
2956
7.21 The free group of rank 2 and the modular group PSL(2,ℤ)
2957
2958
The free group of rank 2 embeds into RCWA(ℤ) -- in fact it embeds even in
2959
the subgroup which is generated by all class transpositions. An explicit
2960
embedding can be constructed by transferring the construction of the
2961
so-called Schottky groups (cf. [dlH00], page 27) from PSL(2,ℂ) to RCWA(ℤ)
2962
(we use the notation from the cited book):
2963
2964
 Example 
2965

2966
gap> D := AllResidueClassesModulo(4);
2967
[ 0(4), 1(4), 2(4), 3(4) ]
2968
gap> gamma1 := RepresentativeAction(RCWA(Integers),
2969
>  Difference(Integers,D[1]),D[2]);;
2970
gap> gamma2 := RepresentativeAction(RCWA(Integers),
2971
>  Difference(Integers,D[3]),D[4]);;
2972
gap> F2 := Group(gamma1,gamma2);
2973
<rcwa group over Z with 2 generators>
2974

2975

2976
2977
We can do some checks:
2978
2979
 Example 
2980

2981
gap> X1 := Union(D{[1,2]});; X2 := Union(D{[3,4]});;
2982
gap>  IsSubset(X1,X2^gamma1) and IsSubset(X1,X2^(gamma1^-1))
2983
>  and IsSubset(X2,X1^gamma2) and IsSubset(X2,X1^(gamma2^-1));
2984
true
2985

2986

2987
2988
The generators are products of 3 class transpositions, each:
2989
2990
 Example 
2991

2992
gap> Factorization(gamma1);
2993
[ ( 0(2), 1(2) ), ( 3(4), 5(8) ), ( 0(2), 1(8) ) ]
2994
gap> Factorization(gamma2);
2995
[ ( 0(2), 1(2) ), ( 1(4), 7(8) ), ( 0(2), 3(8) ) ]
2996

2997

2998
2999
The above construction is used by IsomorphismRcwaGroup (3.1-1) to embed free
3000
groups of any rank ≥ 2.
3001
3002
We give another only slightly different representation of the free group of
3003
rank 2. We verify that it really is one by applying the so-called
3004
Table-Tennis Lemma (see e.g. [dlH00], Section II.B.) to the infinite cyclic
3005
groups generated by the two generators and to the same two sets X1 and X2 as
3006
above:
3007
3008
 Example 
3009

3010
gap> r1 := ClassTransposition(0,2,1,2)*ClassTransposition(0,2,1,4);;
3011
gap> r2 := ClassTransposition(0,2,1,2)*ClassTransposition(0,2,3,4);;
3012
gap> F2 := Group(r1^2,r2^2);;
3013
gap> List(GeneratorsOfGroup(F2),IsTame);
3014
[ false, false ]
3015
gap>  IsSubset(X1,X2^F2.1) and IsSubset(X1,X2^(F2.1^-1))
3016
>  and IsSubset(X2,X1^F2.2) and IsSubset(X2,X1^(F2.2^-1));
3017
true
3018
gap> [Sources(r1),Sinks(r1),Loops(r1)]; # compare with X1
3019
[ [ 0(4) ], [ 1(4) ], [ 0(4), 1(4) ] ]
3020
gap> [Sources(r2),Sinks(r2),Loops(r2)]; # compare with X2
3021
[ [ 2(4) ], [ 3(4) ], [ 2(4), 3(4) ] ]
3022
gap>  IsSubset(X1,Union(Sinks(r1))) and IsSubset(X1,Union(Sinks(r1^-1)))
3023
>  and IsSubset(X2,Union(Sinks(r2))) and IsSubset(X2,Union(Sinks(r2^-1)));
3024
true
3025
gap> IsSubset(Union(Sinks(r1)),X2^F2.1) and
3026
>  IsSubset(Union(Sinks(r1^-1)),X2^(F2.1^-1));
3027
true
3028
gap> IsSubset(Union(Sinks(r2)),X1^F2.2) and
3029
>  IsSubset(Union(Sinks(r2^-1)),X1^(F2.2^-1));
3030
true
3031

3032

3033
3034
Drawing the transition graphs of r1 and r2 for modulus 4 may help to
3035
understand what is actually done in this calculation. It is easy to see that
3036
the group generated by r1 and r2 is not free:
3037
3038
 Example 
3039

3040
gap> Order(r1/r2);
3041
3
3042

3043

3044
3045
The modular group PSL(2,ℤ) embeds into CT(ℤ) as well. We give an embedding,
3046
and check that it really is one by applying the Table Tennis Lemma as above:
3047
3048
 Example 
3049

3050
gap> PSL2Z := 
3051
>  Group(ClassTransposition(0,3,1,3) * ClassTransposition(0,3,2,3),
3052
>  ClassTransposition(1,3,0,6) * ClassTransposition(2,3,3,6));;
3053
gap> List(GeneratorsOfGroup(PSL2Z),Order);
3054
[ 3, 2 ]
3055
gap> X1 := Difference(Integers,ResidueClass(0,3));
3056
Z \ 0(3)
3057
gap> X2 := ResidueClass(0,3);
3058
0(3)
3059
gap> IsSubset(X1,X2^PSL2Z.1) and IsSubset(X1,X2^(PSL2Z.1^2));
3060
true
3061
gap> IsSubset(X2,X1^PSL2Z.2);
3062
true
3063

3064

3065
3066
A slightly different representation of PSL(2,ℤ) can be obtained by using
3067
RCWA's general method for IsomorphismRcwaGroup for free products of finite
3068
groups:
3069
3070
 Example 
3071

3072
gap> G := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(3),
3073
>  CyclicGroup(2))));
3074
<wild rcwa group over Z with 2 generators>
3075
gap> List(GeneratorsOfGroup(G),Factorization);
3076
[ [ ( 0(4), 2(4) ), ( 1(2), 0(4) ) ], [ ( 0(2), 1(2) ) ] ]
3077

3078

3079
3080
Enter AssignGlobals(LoadRCWAExamples().F2_PSL2Z); in order to assign the
3081
global variables defined in this section.
3082
3083
3084