|
RANDOM K-SET OF N-SETName:
k-sets of the original n-set. This command generates a single random k-set. The output is an array of size k that identifies the elements included in the k-set.
where <k> is a number or parameter that specifies the size of the k-set; and <y> is a variable where the random k-set is saved. This command must be preceeded with the command
LET K = 3 LET Y = RANDOM K-SET OF N-SET FOR I = 1 1 K
The SEED command can be used to specify a seed for the random number generator.
LET N = 8 LET K = 3 LET Y = RANDOM K-SET OF N-SET FOR I = 1 1 K PRINT Y
Date created: 1/12/2009 |