scphfCA: Making CA from SCPHF

View source: R/scphfCA.R

scphfCAR Documentation

Making CA from SCPHF

Description

according to the process outlined in Sherwood, Martirosyan and Colbourn (2006) (non-reduced permutation vectors).

Usage

scphfCA(t, k, v, start0 = TRUE, ...)

SMC(cphf, q, t, type="2006", ...)

N_scphfCA(t, k, v)

k_scphfCA(t, N, v)

Arguments

t

integer: target strength

k

integer: requested number of columns

v

integer: number of levels, must be a prime power

start0

logical: should the levels of the output array start with 0 (otherwise with 1)?

...

currently not used

cphf

matrix, which is a covering perfect hash family (CPHF)

q

integer: number of levels, prime power

type

string: "2006" refers to the original implementation by Sherwood, Martirosyan and Colbourn (2006), which uses non-default Galois fields for q=8,9;
string "2009" refers to SCPHFs from Walker and Colbourn (2009) which also uses non-default Galois fields for q=8,9, and uses a different one for type="2006" for q=9;
anything else uses the built-in Galois fields of package lhs

N

integer: affordable run size

Value

Function scphfCA returns a matrix of class ca with attributes, which is a covering array of strength 3 or 4.
The function SMC returns a matrix with entries in 0,...,q-1, which is a covering array of strength t, if a valid cphf for strength t is provided; the function is not primarily meant for direct use, but is the workhorse behind scphfCA. It can be used with user-provided CPHFs.

Functions N_scphfCA and k_scphfCA return the required run size or the achievable number of columns, respectively.

Details

Function scphfCA implements CAs from the Sherwood et al. (2006) construction for length t-1 h-tuples to create length v^t permutation vectors for v levels and strength t. The workhorse function SMC uses a stored covering perfect hash family of a specific form (SCPHF). The built-in SCPHFs are from Sherwood et al. (2006) and from Lanus as provided in the Dwyer (2024) GitHub repository (see SMC_SCPHFs and CL_SCPHFs). Users who want to use their own SCPHF can implement it with the function SMC; large cases can take a long time to construct.
The construction relies on a Galois field GF(v). The SCPHFs from Sherwood et al. (2006) for v=8 or v=9 require a different Galois field than otherwise used in this package (created with internal function mygf); the type argument of function SMC can be used for requesting those (type="2006") or the default ones (type="2018").
The data frame SCPHFcat holds the overview information on which constructions are implemented.

References

Sherwood, Martirosyan and Colbourn (2006), Walker II and Colbourn (2009), Colbourn and Lanus (2018), Colbourn, Lanus and Sarkar (2018), Dwyer (2024)

Examples

# applying the construction for small SCPHF from the Sherwood et al. (2006) paper

# strength 3
head(SCPHFcat[which(SCPHFcat$v==4),])
## the SCPHF for the first row (type 2006)
SMC_SCPHFs[["3"]][["4"]][["16"]]
D <- scphfCA(3,16,4)
dim(D)
coverage(D,3)
eCAN(3,16,4)   ## size matches eCAN

## the SCPHF for the third row (type 2018)
CL_SCPHFs[["3"]][["4"]][["55"]]
D <- scphfCA(3,55,4)
dim(D)
coverage(D,3, parallel=2) ## about 8 seconds
caverify::ca_verify(D, 3)
Ns(3,55,4)   ## best implemented

# strength 4
Ns(4, 10, 3)  ## best possible



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