# Accessing Brute Force Sieve, # a master program to run the BruteForceSieve procedure # Version 1.1 # Ken W. Smith # Begun in May 2006, # Last modified May 14, 2006. # Place this file, and the files # DifSets.txt, # Lift.txt, # BruteForceSieve_DS.txt # in the same directory as the GAP application. Then run this program. # To run this program, insert the following Read statement # gap> Read("AccessingBFS.txt"); # at gap cursor. Read("DifSets.txt"); Read("Lift.txt"); Read("BruteForceSieve_DS.txt"); WriteFile := "BFS_DS_expand.txt"; WriteFile2 := "BFS_DS_out.txt"; PrintTo( WriteFile, "Brute Force Sieve\n\n"); PrintTo( WriteFile2, "Brute Force Sieve\n\n"); ############################################################ # Set up parameters here: (v1, k, lambda) are design # # parameters; [v, cn] are group parameters. # # max_chain_holes is the maximum value allowed for # # the difference between the best possible chain length # # and the true chain length of a particular group. # ############################################################ threshold := 500000; printflag := 1; SearchSet := [ 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 230, 231]; v:=36;v1:=36;k:=15;lambda:=6;max_chain_holes:=2;SearchSet:=[6,7,8,10,11,12,13,14]; v:=96;v1:=96;k:=20;lambda:=4;max_chain_holes:=2;SearchSet:=[205]; Starttime00:=Runtime(); chain_choice := 1; multiplier := v1/v; for cn in SearchSet do Starttime0 := Runtime(); ############################################################ # Print header Print("\n**************************************************\n"); Print("* Working on Small Group [", v, ", ", cn, "]... *\n"); Print( "**************************************************\n"); AppendTo(WriteFile, "\nWorking on Small Group [", v, ", ", cn, "]... \n"); AppendTo(WriteFile2, "\nWorking on Small Group [", v, ", ", cn, "]... \n"); ############################################################ max_chain_list := MaxChains( SubgroupIncidenceMatrix(v,cn) ); chain := max_chain_list[ chain_choice ]; # Let's try to improve our choice of chains: g := SmallGroup(v,cn); ns := NormalSubgroups(g); for c in max_chain_list do if Size( ns[c[2]] )=2 then chain := ShallowCopy(c); fi;od; for c in max_chain_list do if Size( ns[c[3]] )=4 then chain := ShallowCopy(c); fi;od; for c in max_chain_list do if Size( ns[c[4]] )=8 then chain := ShallowCopy(c); fi;od; # for c in max_chain_list do if Size( ns[c[5]] )=16 then chain := ShallowCopy(c); fi;od; # for c in max_chain_list do if Size( ns[c[6]] )=32 then chain := ShallowCopy(c); fi;od; chain_size := Size(chain); # The complexity of this program depends on the length of the # the normal subgroup chain. We'd like it to be as long as # possible. 'max_chain_holes', normally set to zero, # determines the number of gaps allowed in the subgroup chain. # The best possible is when the chain length is the same as # the number of factors of v. if chain_size + max_chain_holes >= Size(Factors(v))+1 then Print("chain size is ", chain_size,"\nchain is: ", chain,"\n"); ############################################################ # BruteForceSieve( [v,cn], [v1,k,lambda], chain, threshold, printflag, WriteFile ) # ############################################################ PostSolution := BruteForceSieve_DS([v,cn], [v1,k,lambda], chain, threshold, printflag, WriteFile); ############################################################ # Print results Print("There are ", Size(PostSolution), " difference sets: \n", PostSolution,"\n"); AppendTo( WriteFile, "There are ", Size(PostSolution), " difference sets: \n", PostSolution,"\n"); AppendTo( WriteFile2, "There are ", Size(PostSolution), " difference sets: \n", PostSolution,"\n"); fi; # if Size(chain) ... Print("Run time for this group was ", QuoInt( Runtime()-Starttime0, 60000 ), " mins. \n"); od; # for cn in SearchSet... Print("Run time for the entire search was ", QuoInt( Runtime()-Starttime00, 60000 ), " mins. \n");