Name of Program: ArrangeToCycles Purpose: Convert a permuttion in one form, arrangement of natural numbers 1,2,...,N, into another form, cycles NN = fixed maximum size of arrays all entries in arrays reset to zero initially Input N = length of arrangement = largest natural number in the arrangement (N B[1], 2 --> B[2], ..., J --> B[J], ... , N --> B[N] Permutation as function.) HB = index of first object in a cycle, In array C[I]: Trivial cycles of one object (fixed points of the permutation), not in array C[0]=-1 All non-trivial cycles located consecutively in array and separated by entries -2, -1 -1 code for '(' before each cycle, -2 code for ')' after each cycle, 0 code for end of data HC index for first object in a cycle Before first object in each cycle , -1 = C[HC-1] After last object in cycle, -2 After all data, 0 In array FX[H]: starting with index H=1, all fixed points = trivial cycles of a single object (if any)