TOPICS
Search

k-Subset


A k-subset is a subset of a set on n elements containing exactly k elements. The number of k-subsets on n elements is therefore given by the binomial coefficient (n; k). For example, there are (3; 2)=3 2-subsets of {1,2,3}, namely {1,2}, {1,3}, and {2,3}.

The k-subsets of a list can be enumerated in the Wolfram Language as Subsets[list, {k}].

The total number of distinct k-subsets on a set of n elements (i.e., the number of subsets) is given by

 sum_(k=0)^n(n; k)=2^n.

See also

Binomial Coefficient, Combination, p-System, Pairwise, Permutation, Subset

Explore with Wolfram|Alpha

References

Nijenhuis, A. and Wilf, H. Combinatorial Algorithms for Computers and Calculators, 2nd ed. New York: Academic Press, 1978.Skiena, S. "Generating k-Subsets." §1.5.5 in Implementing Discrete Mathematics: Combinatorics and Graph Theory with Mathematica. Reading, MA: Addison-Wesley, pp. 44-46, 1990.

Referenced on Wolfram|Alpha

k-Subset

Cite this as:

Weisstein, Eric W. "k-Subset." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/k-Subset.html

Subject classifications