Multiset
High school
Consider a set, in which each element appears only once. A multiset is like a set, except that an element can appear more than once.
Undergraduate
A multiset is a collection in which order does not matter but repetition does. Formally, a function from a set to the positive integers that gives the multiplicity of each element.
Examples
Examples
-
$\setdef{1, 2, 2}$
Elementary
As a multiset, it differs from $\setdef{1, 2}$.
-
The roots of $(x - 1)^2$ counted with multiplicity
High school
The roots of $(x - 1)^2$ counted with multiplicity form a multiset, in which the root $1$ appears twice.
Non-examples
Things that may be mistaken for examples.
- $(1, 2, 2)$ High school
Distinctions involving this term
- Types of collections: Mathematics has several kinds of “a bunch of things,” which differ in whether order and repetition matter. A set ignores order and repetition. A multiset keeps repetition. A sequence keeps order and repetition. “Collection” is informal, and “group” is a technical term for a set with an operation.