# The Cyclically Resolvable Steiner Triple Systems of Order 57
## 3 Construction
void P19 Constr(int n) //choose the n-th block of P19  {  for(int i=1; i<=28; i++)if(!TakenOrb19[i]) //at most 1 block from orbit  {  for(int j=1; j<=19; j++) //19 blocks in an orbit  {  if(Block190K(019[i][j],n))  {  PutBlock19(019[i][j],n);  if(n==17) //P19 is completed  {  //construct classes from class orbits of length 3:  if(OKP19()) if(NewRes(1)) P3 Constr(20);  }  else P19 Constr(n+3); //choose the n+3 rd block of P19  TakeBlock19(019[i][j],n);  }  }  }  } } If \(n=17\) the class \(P_{19}\) is ready after PutBlock19 has added the last three blocks. In this case 19 out of all 28 parallel classes have already been constructed. Then OKP19 checksif the constructed \(P_{19}\) contains exactly 4 blocks from orbits under \(G_{19}\) which are parallel classes. If this is true, NewRes establishes if the current solution for \(P_{19}\) is not equivalent to a previously obtained lexicographically smaller one. If the solution is new, P3 Constr(20) is called. void P3 Constr(int nn)  {  int n=nn;  for(int i=1; i<=28; i++) if(!TakenOrb19[i])  {  if(OXOrb19(i,n))  {  PutOrb19(i,n);  n+=3;  }  }  if(n!=28) ErrorStop();  WriteRes();  }  
P3 Constr chooses the remaining base parallel classes \(P_{3_{1}}\), \(P_{3_{2}}\) and \(P_{3_{3}}\) (with class orbits of length 3). Each of them contains the blocks of one orbit under \(G_{19}\). That is why having constructed \(P_{19}\), the remaining 9 classes of the resolution are defined, i.e. these are the 9 block orbits under \(G_{19}\) which do not have blocks in the constructed \(P_{19}\). That is why P3 Constr uses TakenOrb19 to see which these 9 orbits are, checks once again by OKOrb19 if they are parallel classes and by PutOrb19 adds them to the resolution together with the other two parallel classes of their class orbits and makes changes to TakenOrb19. Finally WriteRes is called to write the resolution in a file. This way the construction of all point-cyclic KTS(57)s is completed in 5 h on a 3.2 GHz Intel-i9 PC. The second algorithm (\(A_{2}\)) constructs one by one the 28 parallel classes of the resolution, without taking in account the results from Section 2.3, but using only the more general fact that a parallel class contains either whole block orbits under \(G_{3}\), or whole block orbits under \(G_{19}\). The current parallel class is constructed from orbits under one of these subgroups in all possible ways, and all parallel classes from its class orbit are added to the resolution before the construction of the next parallel class starts. In particular, the construction is organized by the function ResConstr which does not use Corollary 1 to reduce the number of the considered designs. After reading the design, initializing the necessary variables and finding the necessary block orbits, it calls ChooseBlock to look for possible point-cyclic resolutions. void ResConstr(void)  {  for(ints s=1; s<=2353310; s++)  {  ReadDes();  FindOrbits();  ChooseBlock(1,1,1);  }  }  
Two global arrays are used in ChooseBlock. TakenBlock is one-dimensional and TakenBlock[i] is true if block \(i\) has already been added to the resolution. The array clLencontains all possible lengths of parallel class orbits, namely \(clLen[1]=19\) and \(clLen[2]=3\), and \(maxlencl=2\). void ChooseBlock(int n, int cl, int lencl) { for(int j=1; j<=532; j++) if (!TakenBlock[j]) //all blocks are 532  { if(BlockOK(j, n, cl, clLen[lencl]))  { all=PutBlock(j,n,cl,clLen[lencl]);  if(all==19) if(NewRes(cl))  {  PutClassOrb();  if(cl+clLen[lencl]-1==28) WriteRes(); //all parallel classes are 28  else ChooseBlock(1, cl+clLen[lencl], 1);  TakeClassOrb();  }  else ChooseBlock(all+1, cl, lencl);  TakeBlock(j,n,cl,clLen[lencl]);  }  }  if(n==1) if(lencl<maxlencl) ChooseBlock(1,cl,lencl+1);//next class length } ChooseBlock(n,cl,lencl) chooses in all possible ways the \(n\)-th block of the \(cl\)-th parallel class with class orbit of length \(clLen[lencl]\). If \(n=1\) and \(lencl<maxlencl\) after finishing the search, ChooseBlock(n,cl,lencl+1) is called.