Multiset — Definition, Formula & Examples
A multiset is a collection of objects where the same element can appear more than once. Unlike an ordinary set, a multiset tracks how many times each element occurs.
A multiset over a ground set is a pair where is a function assigning a non-negative integer multiplicity to each element of . The cardinality of the multiset is .
Key Formula
Where:
- = Number of distinct element types in the ground set
- = Number of elements chosen (the size of the multiset)
How It Works
In standard set notation, simplifies to because sets ignore duplicates. A multiset preserves duplicates, so is distinct from . The number of times an element appears is called its multiplicity. Multisets are often written with double braces or square brackets to distinguish them from ordinary sets, though conventions vary by author. In combinatorics, choosing items from types with repetition allowed is equivalent to counting -element multisets drawn from an -element set.
Worked Example
Problem: How many ways can you choose 4 scoops of ice cream from 3 flavors (chocolate, vanilla, strawberry) if you may repeat flavors?
Identify the parameters: There are flavors and you choose scoops with repetition allowed, so you are counting 4-element multisets from a 3-element set.
Apply the multiset coefficient formula: Substitute into the formula for the number of multisets of size from types.
Compute: Evaluate the binomial coefficient.
Answer: There are 15 possible multisets, meaning 15 ways to choose 4 scoops from 3 flavors when repetition is allowed.
Why It Matters
Multisets appear whenever you model selections with repetition, such as distributing identical objects into distinct bins or counting monomials of a given degree. The multiset coefficient (also called "stars and bars") is a standard tool in combinatorics and probability courses, and it arises in areas like inventory problems and polynomial algebra.
Common Mistakes
Mistake: Using (ordinary combination) when repetition is allowed.
Correction: When elements can repeat, use the multiset coefficient instead. The ordinary combination only counts subsets without repetition.
