A
**
bag
**
or
**
multiset
**
is a collection of object whose
members need not be distinct (unlike a
*
set
*
, whose members are
distinct).

So the bag [
*
a
*
,
*
b
*
,
*
c
*
,
*
c
*
]
is the same as the bag [
*
c
*
,
*
a
*
,
*
b
*
,
*
c
*
]
but distinct from the bag [
*
a
*
,
*
b
*
,
*
c
*
].
Contrast this with the set {
*
a
*
,
*
b
*
,
*
c
*
,
*
c
*
},
which is the same as the set {
*
c
*
,
*
a
*
,
*
b
*
,
*
c
*
},
and is also the same as the set {
*
a
*
,
*
b
*
,
*
c
*
}.

The number of repetitions of each member is the
*
multiplicity
*
of
that member. For the bag [
*
a
*
,
*
b
*
,
*
c
*
,
*
c
*
],
the multiplicity of
*
a
*
and of
*
b
*
is 1, and the multiplicity
of
*
c
*
is 2.