| subsetMatrix | R Documentation |
Produces a matrix whose rows indicate what subsets of a set are included in which other subsets.
subsetMatrix(n)
n |
integer containing the number of elements in the set. |
This function returns a matrix, with each row and column corresponding to a
subset of a hypothetical set of size n, ordered lexographically. The
entry in row i, column j corresponds to whether or not the
subset associated with i is a superset of that associated with
j.
A 1 or -1 indicates that i is a superset of j, with the sign
referring to the number of fewer elements in j. 0 indicates that
i is not a superset of j.
An integer matrix of dimension 2^n by 2^n.
The inverse of the output matrix is just abs(subsetMatrix(n)).
Robin Evans
combinations, powerSet, designMatrix.
subsetMatrix(3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.