projectionBose: Function to create a strength 2 CA by projection of a Bose OA

View source: R/ProjectionBose.R

projBoseCAR Documentation

Function to create a strength 2 CA by projection of a Bose OA

Description

A strength 2 CA with q^2-c runs with q+1 (q-c)-level columns and c s-level columns is created from a q-level Bose array arranged as SCA

Usage

projBoseCA(k, v, fixNA=TRUE, ...)

projectionBose(q, c=1, s=q-c, fixNA=FALSE, ...)

N_projectionBose(k, v, cmax=Inf, ...)

k_projectionBose(N, v, cmax=Inf, ...)

Arguments

k

requested number of columns

v

number of levels

fixNA

logical; if FALSE, keeps flexible values; if TRUE, flexible values are arbitrarily fixed.

...

currently not used

q

a prime power

c

an integer number, 0 <= c <= q-2; for c=0, the unchanged array created by SCA_Bose is returned.

s

an integer number; for c > 1, 2 <= s <= q-c;
for c=1, 2 <= s <= q+1;
for c=0, s is irrelevant.

N

maximum acceptable number of runs

cmax

the maximum number permitted for c; setting cmax prevents ridiculous values of N for cases for which k and v are too far apart

Value

projBoseCA returns a covering array in k columns at v levels each with v constant rows, if this is reasonably possible by projection of a strength 2 Bose OA, which should be the case whenever v<k and k-v not larger than seven and v+(k-v-1)/2 a prime power.

projectionBose returns a (q^2-c x q+1+c matrix with the first q+1 columns in q-c levels (labeled from 0 to q-c-1) and the last c columns in s levels (labeled from 0 to s-1) that is a covering array of strength 2.
N_projectionBose and k_projectionBose return a named vector with elements N, k, kmax, v, q and c.

References

Colbourn (2008, Theorem 2.3 and Corollary 2.2), Torres-Jimenez et al. (2019, Fig. 25)

Examples

# create a CA(24,2,7,4)
projectionBose(5)  ## four constant rows, some flexible values
projectionBose(5, fixNA=TRUE) ## flexible values arbitrarily filled
projectionBose(5, c=2, s=2) ## 6 3-level columns (3=5-2), two 2-level columns

# create a CA(48,2,9,6)
dim(D <- projectionBose(7))
coverage(D, 2)
eCAN(2,9,6) ## two runs difference

# create a CA(63,2,9,7)
dim(projBoseCA(9,7))
eCAN(2, 9, 7)  ## four runs difference

# create a CA(166,2,15,12)
dim(projBoseCA(15,12))
eCAN(2, 15, 12)  ## optimal

# querying k or N
N_projectionBose(k=21, v=15)
k_projectionBose(N=357, v=15)
eCAN(2, 21, 15) ## the above design is the basis
eCAK(2, 357, 15) ## four more columns

# the mixed level construction of Stevens, Ling and Mendelssohn (2002)
# Thm 2.6, yields a CA(q^2-1, 2, q+2, (q-1)^(q+1) (q+1)^1),
# e.g., a CA(24, 2, 7, 4^6 6^1)
# as quoted also in Colbourn 2008
D <- projectionBose(5, 1, 6)  ## q=5, c=1, s=
D
coverage(D, 2)


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