OA_EXECUTABLES
Orthogonal Array Programs


OA_EXECUTABLES is a collection of executable C programs which create, manipulate, and test orthogonal arrays (OA's).

Related Data and Programs:

These main programs all require routines from the OA library, where information may also be found explaining orthogonal arrays.

Some sample orthogonal arrays are available in the OA dataset collection.

Author:

Art Owen,
Department of Statistics,
Sequoia Hall,
Stanford CA 94305.

Reference:

  1. S. Addelman and O. Kempthorne,
    Some Main-Effect Plans and Orthogonal Arrays of Strength Two,
    Annals of Mathematical Statistics,
    Volume 32, pages 1167-1176, 1961.
  2. J D Alanen and D E Knuth,
    Sankhya, Series A,
    Volume 26, pages 305-328, 1964.
  3. R C Bose,
    Sankhya,
    Volume 3, pages 323-338, 1938.
  4. R C Bose and K A Bush,
    Orthogonal Arrays of Strength Two and Three,
    Annals of Mathematical Statistics,
    Volume 23, pages 508-524, 1952.
  5. K A Bush,
    Annals of Mathematical Statistics,
    Volume 23, pages 426-434, 1952.
  6. Aloke Dey,
    Orthogonal Fractional Factorial Designs,
    Halsted Press, 1985.
  7. J Friedman,
    Multivariate Adaptive Regression Splines.
    Annals of Statistics,
    Volume 19, pages 1-141, 1991.
  8. M D McKay, W J Conover, R J Beckman,
    A Comparison of Three Methods for Selecting Values of Input Variables in the Analysis of Output From a Computer Code,
    Technometrics,
    Volume 21, pages 239-245, 1979.
  9. A B Owen,
    A central limit theorem for Latin hypercube sampling,
    Journal of the Royal Statistical Society, Series B,
    Volume 51, Number 2, pages 541-551, 1992.
  10. A B Owen,
    Orthogonal Arrays for Computer Experiments, Integration and Visualization,
    Statistica Sinica,
    Volume 2, Number 2, pages 439-452, 1992.
  11. A B Owen,
    Lattice Sampling Revisited: Monte Carlo Variance of Means Over Randomized Orthogonal Arrays,
    Annals of Statistics,
    Volume 22, Number 2, pages 930-945, 1994.
  12. H D Patterson,
    The Errors of Lattice Sampling,
    Journal of the Royal Statistical Society, Series B,
    Volume 16, pages 140-149, 1954.
  13. R Plackett and J Burman,
    The Design of Optimum Multifactorial Experiments,
    Biometrika,
    Volume 33, pages 305-325, 1946.
  14. D Raghavarao,
    Construction and Combinatorial Problems in Design of Experiments,
    Wiley, 1971.
  15. M. Stein,
    Large-Sample Properties of Simulations using Latin Hypercube Sampling,
    Technometrics,
    Volume 29, pages 143-151, 1987.
  16. A copy of the original source code oa.c, and sample orthogonal arrays are available from http://lib.stat.cmu.edu/index.php STATLIB.


BOSE

The bose program produces OA( q^2, k, q, 2 ), for k <= q+1, where q is a power of a prime. The program needs to know q and k, in that order. The values can be placed on the command line or in standard input (that is, typed in interactively). If only one number appears on the command line, it is taken to be q, and k is taken to be q+1, the maximum possible k.

Usage:

  1. bose 5 | oarand
  2. bose 8 | oarand
  3. bose 101 10 | oarand
These commands produce
  1. OA ( 25, 6, 5, 2 )
  2. OA ( 64, 9, 8, 2 )
  3. OA ( 10201, 10, 101, 2 )
The trailing call to oarand is added simply to randomize the levels of the array. The oarand program is discussed elsewhere in this document.

Files you may copy include:


BUSH

The bush program produces OA( q^3, k, q, 3 ), for k <= q+1, q is a power of a prime. The program needs to know q and k, in that order. The values can be placed on the command line or in standard input (that is, typed in interactively). If only one number appears on the command line, it is taken to be q, and k is taken to be q+1, the maximum possible k.

Usage:

  1. bush 4 | oarand
  2. bush 7 4 | oarand
These commands produce
  1. OA ( 64, 5, 4, 3 )
  2. OA ( 343, 4, 7, 3 )
Compared to the Bose arrays, the strength increases from 2 to 3, the number of runs increases from q^2 to q^3. The trailing call to oarand is added simply to randomize the levels of the array. The oarand program is discussed elsewhere in this document. This construction is the most commonly used special case of busht given below.


BUSHT

The busht program is a version of the bush program that produces orthogonal arrays of any strength t. In particular, it produces OA( q^t, k, q, t ), for k <= q+1, q is a power of a prime. The program needs to know t, q and k, in that order. The values can be placed on the command line or in standard input (that is, typed in interactively). If only two numbers appear on the command line, they are taken to be t and q, and k is taken to be q+1.

Usage:

  1. busht 4 8 | oarand
  2. busht 4 8 5 | oarand
These commands produce
  1. OA ( 4096, 9, 8, 4 )
  2. OA ( 4096, 5, 8, 4 )
The oarand program is discussed elsewhere in this document.

Files you may copy include:


BOSEBUSH

The bosebush program produces orthogonal arrays of strength 2. In particular, it produces OA( 2*q^2, k, q, 2 ), for k <= 2*q+1, and q is a power of 2. The program needs to know q and k, in that order. The values can be placed on the command line or in standard input (that is, typed in interactively). If only one number appears on the command line, it is taken to be q, and k is taken to be 2*q. 2q columns can be constructed without a coincidence defect. Setting k=2q+1 leads to an array with the coincidence defect, and some triples of columns contain duplicate rows. (The lack of a coincidence defect has been verified for q = 2, 4, 8, 16, 32 and k = 2q.)

Usage:

  1. bosebush 8 | oarand
  2. bosebush 16 11 | oarand
These commands produce
  1. OA ( 128, 16, 8, 2 )
  2. OA ( 512, 11, 16, 2 )
The oarand program is discussed elsewhere in this document.

Files you may copy include:


BOSEBUSHL

The bosebushl program produces OA( lambda*q^2, k, q, 2 ), with k <= lambda*q+1, for prime powers q and lambda > 1. Both q and lambda must be powers of the same prime. The program needs to know lambda, q and k, in that order. They can be placed on the command line or in standard input. If two numbers appear on the command line they are taken to be lambda and q respectively, and k is set to lambda*q.

Usage:

  1. bosebushl 3 9 | oarand
  2. bosebushl 9 3 | oarand
  3. bosebushl 11 11 | oarand
  4. bosebushl 4 8 | oarand
These commands produce
  1. OA ( 243, 27, 9, 2 )
  2. OA ( 81, 27, 3, 2 )
  3. OA ( 1331, 121, 11, 2 )
  4. OA ( 256, 32, 8, 2 )
The oarand program is discussed elsewhere in this document.

Coincidences are harder to understand with these designs. For example "bosebushl 3 9" does lead to a number of triple coincidences, that is pairs of rows in which 3 columns agree, but no quadruple coincidences. "bosebush 3 9 28" produces an extra column that figures in some quadruple coincidences.

The arrays produced by this program are not always the largest possible. The article by Bose and Bush describes ways of adjoining some extra columns.

When k <= lambda*q, the program produces an array that is "completely resolvable". What this means is that the rows of the array may be split into lambda*q consecutive nonoverlapping sets of rows each of which is OA( q,k,q,1 ).

Files you may copy include:


ADDELKEMP

The addelkemp program produces OA( 2q^2, k, q, 2 ), k <= 2q+1, for odd prime powers q. Even prime powers may be produced using bosebush. The program needs to know q and k, in that order. They can be placed on the command line or in standard input. If one number appears on the command line it is taken to be q, and k is set to 2q. 2q columns can be constructed without a coincidence defect. Setting k=2q+1 leads to an array with the coincidence defect. Some triples of columns contain duplicate rows. (The lack of a coincidence defect has been verified for q = 2, 3, 4, 5, 7, 9, 11, 13, 17, 19, 23, 25 and k=2q.)

Usage:

  1. addelkemp 9 | oarand
  2. addelkemp 25 10 | oarand
These commands produce
  1. OA ( 162, 18, 9, 2 )
  2. OA ( 1250, 10, 25, 2 )
The oarand program is discussed elsewhere in this document.

This construction should work for all prime powers q, but it failed to do so for even powers greater than 4. This may have been a programming error, or it may have stemmed from misunderstanding of the description of the algorithm. The program rejects requests with q=2^r for r>2. The Bose Bush construction handles these cases.

The description of the construction for odd prime powers calls for some arithmetic involving the number 4. In Galois fields with 3^r elements, there is no 4. Replacing 4 by 1 for these fields works when q = 3, 9, 27 (brute force verification).

Files you may copy include:


ADDELKEMP3

The addelkemp3 program produces OA( 2*q^3, k, q, 2 ), k <= 2q^2+2q+1, for prime powers q. q may be an odd prime power, or q may be 2 or 4. This construction is based on the paper by Addelman and Kempthorne, with n = 3. The program needs to know q and k, in that order. They can be placed on the command line or in standard input. If one number appears on the command line it is taken to be q and k is set to 2*q^2+2*q+1

Usage:

  1. addelkemp3 3 | oarand
  2. addelkemp3 9 | oarand
  3. addelkemp3 11 250 | oarand
These commands produce
  1. OA ( 54, 25, 3, 2 )
  2. OA ( 1458, 181, 9, 2 )
  3. OA ( 2662, 250, 11, 2 )
The oarand program is discussed elsewhere in this document.

Coincidences are much harder to understand with these designs. For example "addelkemp3 3 9" does lead to a number of triple coincidences, that is pairs of rows in which 3 columns agree, but no quadruple coincidences. "addelkemp 3 9 28" produces an extra column that figures in some quadruple coincidences.

As for addelkemp above, 4 is replaced by 1 in fields that do not have an element 4. Also powers of 2 larger than 4 are not allowed, as described above for addelkemp.

Files you may copy include:


OARAND

The oarand program reads an orthogonal array from standard input, permutes the symbols in each column and prints the array to standard output. The permutations are uniformly distributed (all q! permutations have the same probability) and all columns are permuted independently.

Input is described above under OA input conventions, with exceptions noted below to allow passing a random seed. If oarand is called twice with the same input array, the same permuted output will result both times, unless different seeds are given.

If the command line consists of 4 or more integers the last four integers are taken to be a random seed. The random number generator is a version of the Marsaglia-Zaman random number generator, transliterated into C from FORTRAN. The seed must be four integers between 1 and 168 inclusive, with not all values equal to 1.

If one prefers some other random number generator one can replace runif() in runif.c. In that case it is also likely to be necessary to change how the seed is read in oarand.c.

Usage:

  1. bose 9 | oarand
  2. bose 9 | oarand 9 81 10
  3. bose 9 | oarand 9 81 10 22
  4. bose 9 | oarand 9 81 10 11 22 33 44
  5. bose 17 8 | oarand 17 289 8
  6. bose 17 8 | oarand 17 289 8
These commands produce randomized versions of bose arrays
  1. OA ( 81, 10, 9, 2 ) (the first four commands)
  2. OA ( 289, 8, 17, 2 ) (the last three )

The first and second runs use the default seeds. The third run uses 9 81 10 22 as seeds, figuring out the dimension of the array by reading it. If the integers 9 81 10 were meant to be dimensions they aren't being used that way. The fourth run one passes the seed information 11 22 33 44 to the random number generator.

Note that

        bose 9 | oarand | oarand
      
doesn't get an array independent of the one produced by one pass through oarand. What it produces is an array with a particular random permutation applied twice. Any symbols that are unchanged by the permutation in oarand will be unchanged by applying it twice.

Files you may copy include:


OADIMEN

The oadimen program attempts to count the number of rows columns and symbols in an orthogonal array.

The required form of the file or stream containing the orthogonal array is described above OA input conventions.

Usage:

  1. bosebush 4 | oadimen
produces the output
        The array has 32 rows, 8 columns and appears
        to have 4 symbols, since the largest symbol is 3.
      

Files you may copy include:

You can go up one level to the C source codes.


Last revised on 31 August 2005.