ODbasedCA: Ordered design based constructions by Cohen Colbourn and Ling...

View source: R/ODbasedCA.R

ODbasedCAR Documentation

Ordered design based constructions by Cohen Colbourn and Ling (CCL)

Description

Functions to construct a strength 3 CA with k columns at v levels based on the "ordered design (CCL)" construction by Cohen, Colbourn and Ling (2003)

Usage

ODbasedCA(t, k, v, ...)

N_ODbasedCA(t, k, v, nconstant=NULL, ...)

k_ODbasedCA(t, N, v, ...)

Arguments

t

integer, strength of the CA

k

integer, number of columns of the CA; k <= v

v

integer, number of levels of the CA; v >= k, and v-1 must be a prime power

...

currently not used

N

integer, affordable run size

nconstant

NULL for the default; otherwise 1 or 2, for the number of constant rows in the ingredient CA (default matches the available ingredients)

Value

Function ODbasedCA returns a strength t CA in N_ODbasedCA(t, k, v) runs and k columns. k_ODbasedCA(t, N, v) returns the maximum number of columns that can be achieved with N runs when requesting strength t at v levels.

Details

The function ODbasedCA implements constructions according to Cohen, Colbourn and Ling (2003); the run size is more explicitly stated in Cohen, Colbourn and Ling (2008).

The construction works in three steps: It creates an ordered design of strength 3 for all triples with three distinct levels. It then uses choose(v,2) copies of the best strength 3 CA in k 2-level columns (called "ingredient CA" below) for covering all triples with at most two distinct levels at a time.

The ingredient CA always has at least one constant row, and in a few cases two (at present for k<=8 and k=12).
Each of its choose(v,2) copies is used for one of the choose(v,2) pairs of distinct levels. If the ingredient CA has two constant rows, the run size can be optimized by omitting both from all copies of the ingredient CA (i.e., by initially not covering (most) triples with all elements the same) and by adding all v constant rows in the end (the function actually leaves them all in and removes duplicates in the end).

If the ingredient CA has only a single constant row, this row can be omitted entirely without adding any constant rows in the end, by making sure that each of the v levels occurs at least once in the role of 0 and in the role of 1 in the ingredient CA (this is achieved by swapping 0 and v-1 in that respective pair).

This package knows how to obtain the best available ingredient CAs, so the run size of the output object matches the Colbourn table entries (which have at least k=10). For k=12, the arrays are even smaller than the Colbourn table entries (which do not reflect the benefit from having two constant elements in the ingredient CA).

Function N_ODbasedCA per default calculates the run size for an ingredient with two constant rows for k<=6 and k=12, and with one constant row for all other cases. The argument nconstant can be set to 1 or 2 in order to inspect the respective non-default case.

Function k_ODbasedCA calculates the maximum k for a given run size. The upper limit for k is always v, so that this is less interesting than for other constructions.

References

Cohen, Colbourn and Ling (2003, 2008)

Examples

D <- ODbasedCA(3, 8, 8)
coverage(D, 3)
dim(D)
N_ODbasedCA(3, 8, 8)
## not using a 12 run design with 2 constant row
## would imply 20 more rows
N_ODbasedCA(3, 8, 8, nconstant=1)
k_ODbasedCA(3, 630, 8) ## pessimistic, assumes nconstant=1
k_ODbasedCA(3, 650, 8) ## assumes nconstant=1

D <- ODbasedCA(3, 12, 14)
coverage(D, 3)
dim(D)
N_ODbasedCA(3, 12, 14)
N_ODbasedCA(3, 12, 14, nconstant=1)
eCAN(3, 12, 14) ## based on one constant row,
                ## although two are in the best-known CA(15,3,12,2)


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