CS_CK: Function to create a strength 4, 5, or 6 CA for 2-level...

View source: R/CS_CK.R

CS_CKR Documentation

Function to create a strength 4, 5, or 6 CA for 2-level columns based on Colbourn-Keri cover starters

Description

A strength 4, 5, or 6 CA in k 2-level columns is created from a starter vector of length k or k-1. It has 2k or 2(k-1) runs. The construction uses cyclic permutations and is based on Colbourn and Keri (2009).

Usage

CS_CK(k, t=4, v=2, starter=NULL, method=NULL, start0=TRUE, ...)

N_CS_CK(t, k, v=2)

k_CS_CK(t, N, v=2)

Arguments

k

the number of columns of the output CA

t

strength of the output CA, can be 4, 5, or 6

v

the number of levels of the output CA (always 2)

starter

NULL for automatic choice (recommended), or a vector of length at least k-1;
if a vector is provided, it is the users responsibility to ensure the desired properties of the result; the specification of a value for t has no effect whatsoever in that case

method

NULL, or the specification of how to process a custom starter vector; if non-NULL, can be either a number from 1, 2, 3 or a character string from "CS_CK1", "CS_CK2", "CS_CK3";
method is ignored, unless starter is specified, in which case it is required

start0

logical; if TRUE, values of the output CA start at 0, otherwise at 1; values of the starter must always start at 0

...

currently not used

N

affordable run size

Details

The function implements the designs provided in Colbourn and Keri (2009). The method numbers refer to the lemmata in that paper: Methods 1 and 3 yield N=2*k, method 2 yields N=2*(k-1); the starter vector has length k for method 1 and length k-1 for methods 2 and 3. Method 3 always yields designs with the last two rows constant.

Besides methods 1, 2 and 3, the function also provides constructions for t=4,5 by derivation from strengths 5 and 6, respectively (method derive in the data.frame object ColbournKeriCombis, that provides an overview of the constructions). The cover starters for strength 4 are in the object ColbournKeriStarters, the cover starters for higher strengths are calculated with the internal function cycvec (that is also used for the cyclotomy constructions of function cyc).

Value

CS_CK returns a matrix of class ca with attributes. The built-in starters allow to obtain two constant rows for all three methods, whereas the third method guarantees two constant rows in the result in general (at the bottom).
The "derive" construction does not permit two constant rows.

References

Colbourn and Keri (2009)

Examples

eCAN(4,21,2)  ## this is the best construction, it uses method 1
Ns(4,21,2)
D <- CS_CK(21)  ## strength 4 is the default
dim(D)
# coverage(D, 4)

Ns(4, 40, 2)
dim(CS_CK(40)) ## almost as good as best
## construction was derived, stems from a strength 5 CA made with method 3

Ns(6, 430, 2)
dim(CS_CK(430, t=6)) ## best, uses method 2
## closely related to the Paley type construction by Colbourn

## a few Colbourn Keri-related entries in the Colbourn tables apparently lack
## a postop suffix (status: June 2025)
eCAN(5, 359, 2)
eCAN(6, 360, 2)
## deriving the 720 run design yields 360 runs
## the 359 runs of the Colbourn tables must be the result of a postop step
Ns(5, 35, 2)
Ns(5, 359, 2)
Ns(5, 503, 2)  ##  from deriving 504 columns in 1008 runs


CAs documentation built on Nov. 29, 2026, 1:06 a.m.