A GAP package for generating uniformly distributed random generalised 2-designs with block size 3 with the following core features:
- Interface with the DESIGN Package to generate the proper and improper designs;
- Implementation of Jacobson and Matthews' Markov chain for sampling the designs;
- Mathematica integration for creating and analysing pair graphs;
- Algorithms for finding alternating trails;
There are also some extras included for the advanced user. These include exporting to different file types (JSON etc.) and testing various types of designs.
GNU GENERAL PUBLIC LICENSE, Version 3
- GRAPE Package
- DESIGN Package
- JSONGAP Package
- JSONGAP depends on the Strings Package
To initialise the DesignMC Package, put the Strings folder in the pkg directory of your GAP root and in GAP type:
gap> LoadPackage("DesignMC");
Alternatively, you can download the source to any/folder/you/like/DesignMC and then run GAP with
gap -l 'path/to/your/GAP4r5r5/bin/;any/folder/you/like/;'
The DESIGN package is able to construct generalised t-designs, but due to its generality, the code required to do so is often cumbersome. As we are working strictly with squares, factorisations and triple systems of block size 3, the DesignMC package is able to considerably simplify the construction experience by abstracting the appropriate functions from the DESIGN Package.
n
Positive integer
Record
Returns the cyclic Latin square of order n.
gap> square:=QuickLatinSquare(4);
rec( blocks := [ [ 1, 5, 9 ], [ 1, 6, 10 ], [ 1, 7, 11 ], [ 1, 8, 12 ],
[ 2, 5, 10 ], [ 2, 6, 11 ], [ 2, 7, 12 ], [ 2, 8, 9 ], [ 3, 5, 11 ],
[ 3, 6, 12 ], [ 3, 7, 9 ], [ 3, 8, 10 ], [ 4, 5, 12 ], [ 4, 6, 9 ],
[ 4, 7, 10 ], [ 4, 8, 11 ] ], improper := false, isBlockDesign := true,
k := [ 1, 1, 1 ], negatives := [ ],
tSubsetStructure := rec( lambdas := [ 1, 0 ] ), v := 12,
vType := [ 4, 4, 4 ] )
input
Recordinput.v
List A tuple of positive integers
input.lambdas
List A tuple of positive integers for the lambda values RC, RS and CS (in that order).isoLevel
0, 1, 2: See DESIGN Documentation.requiredAutSubgroup
Group: See DESIGN Documentation.isoGroup
Group See DESIGN Documentation.show_output
Boolean Set totrue
for verbose mode.improper
Boolean Set totrue
if you only want improper designs.
List
Returns a square with the specified parameters.
gap> input:=rec(v:=[4,4,4], lambdas:=[2,2,2], isoLevel:=0, improper:=true);;
gap> ProduceSquare(input);
[ rec(
autSubgroup := Group(
[ (1,5)(2,6)(3,7)(4,8), (1,9,5)(2,12,6)(3,10,7)(4,11,8) ]),
blockNumbers := [ 33 ], blockSizes := [ 3 ],
blocks := [ [ 1, 5, 10 ], [ 1, 5, 10 ], [ 1, 5, 11 ], [ 1, 6, 12 ],
[ 1, 6, 12 ], [ 1, 7, 9 ], [ 1, 7, 9 ], [ 1, 8, 9 ], [ 1, 8, 11 ],
[ 2, 5, 12 ], [ 2, 5, 12 ], [ 2, 6, 9 ], [ 2, 6, 9 ], [ 2, 7, 11 ],
[ 2, 7, 11 ], [ 2, 8, 10 ], [ 2, 8, 10 ], [ 3, 5, 9 ], [ 3, 5, 9 ],
[ 3, 6, 11 ], [ 3, 6, 11 ], [ 3, 7, 10 ], [ 3, 7, 10 ],
[ 3, 8, 12 ], [ 3, 8, 12 ], [ 4, 5, 9 ], [ 4, 5, 11 ],
[ 4, 6, 10 ], [ 4, 6, 10 ], [ 4, 7, 12 ], [ 4, 7, 12 ],
[ 4, 8, 9 ], [ 4, 8, 11 ] ], improper := true, isBinary := true,
isBlockDesign := true, isSimple := false, k := [ 1, 1, 1 ],
negatives := [ [ 1, 5, 9 ] ],
tSubsetStructure :=
rec( lambdas := [ 2, 0, 3 ],
partition :=
[
[ [ 1, 6 ], [ 1, 7 ], [ 1, 8 ], [ 1, 10 ], [ 1, 11 ], [ 1, 12 ],
[ 2, 5 ], [ 2, 6 ], [ 2, 7 ], [ 2, 8 ], [ 2, 9 ],
[ 2, 10 ], [ 2, 11 ], [ 2, 12 ], [ 3, 5 ], [ 3, 6 ],
[ 3, 7 ], [ 3, 8 ], [ 3, 9 ], [ 3, 10 ], [ 3, 11 ],
[ 3, 12 ], [ 4, 5 ], [ 4, 6 ], [ 4, 7 ], [ 4, 8 ],
[ 4, 9 ], [ 4, 10 ], [ 4, 11 ], [ 4, 12 ], [ 5, 10 ],
[ 5, 11 ], [ 5, 12 ], [ 6, 9 ], [ 6, 10 ], [ 6, 11 ],
[ 6, 12 ], [ 7, 9 ], [ 7, 10 ], [ 7, 11 ], [ 7, 12 ],
[ 8, 9 ], [ 8, 10 ], [ 8, 11 ], [ 8, 12 ] ],
[ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 2, 3 ], [ 2, 4 ], [ 3, 4 ],
[ 5, 6 ], [ 5, 7 ], [ 5, 8 ], [ 6, 7 ], [ 6, 8 ], [ 7, 8 ],
[ 9, 10 ], [ 9, 11 ], [ 9, 12 ], [ 10, 11 ], [ 10, 12 ],
[ 11, 12 ] ], [ [ 1, 5 ], [ 1, 9 ], [ 5, 9 ] ] ], t := 2 ),
v := 12, vType := [ 4, 4, 4 ] ) ]
- Generating uniformly distributed random latin squares, M. Jacobson and P. Matthews, 1998
- The DESIGN package for GAP, L. Soicher, 2011
- The GRAPE package for GAP, L. Soicher, 2012
- Generating Uniformly Distributed Random 2-Designs with Block Size 3, A. Drizen, 2012