Cython functions for combinatorial designs

Cython functions for combinatorial designs

This module implements the design methods that need to be somewhat efficient.

Functions

sage.combinat.designs.designs_pyx.is_orthogonal_array(OA, k, n, t=2, verbose=False, terminology='OA')

Check that the integer matrix OA is an OA(k,n,t).

See orthogonal_array() for a definition.

INPUT:

  • OA – the Orthogonal Array to be tested
  • k,n,t (integers) – only implemented for t=2.
  • verbose (boolean) – whether to display some information when OA is not an orthogonal array OA(k,n).
  • terminology (string) – how to phrase the information when verbose = True. Possible values are "OA", "MOLS".

EXAMPLES:

sage: from sage.combinat.designs.designs_pyx import is_orthogonal_array
sage: OA = designs.orthogonal_array(8,9)
sage: is_orthogonal_array(OA,8,9)
True
sage: is_orthogonal_array(OA,8,10)
False
sage: OA[4][3] = 1
sage: is_orthogonal_array(OA,8,9)
False
sage: is_orthogonal_array(OA,8,9,verbose=True)
Columns 0 and 3 are not orthogonal
False
sage: is_orthogonal_array(OA,8,9,verbose=True,terminology="MOLS")
Squares 0 and 3 are not orthogonal
False

TESTS:

sage: is_orthogonal_array(OA,8,9,t=3)
Traceback (most recent call last):
...
NotImplementedError: only implemented for t=2
sage: is_orthogonal_array([[3]*8],8,9,verbose=True)
The number of rows is 1 instead of 9^2=81
False
sage: is_orthogonal_array([[3]*8],8,9,verbose=True,terminology="MOLS")
All squares do not have dimension n^2=9^2
False
sage: is_orthogonal_array([[3]*7],8,9,verbose=True)
Some row does not have length 8
False
sage: is_orthogonal_array([[3]*7],8,9,verbose=True,terminology="MOLS")
The number of squares is not 6
False

Up to relabelling, there is a unique OA(3,2). So their number is just the cardinality of the relabeling group which is S_2^3 \times S_3 and has cardinality 48:

sage: from itertools import product
sage: n = 0
sage: for a in product(product((0,1), repeat=3), repeat=4):
....:     if is_orthogonal_array(a,3,2):
....:          n += 1
sage: n
48

Table Of Contents

Previous topic

External Representations of Block Designs

Next topic

Knutson-Tao Puzzles

This Page