Representing multisets

109 Views Asked by At

Multisets are like sets, but the "elements" can have multiplicities. An example is $M = \{ a,a, a, b,c,b,c \}$. We can present the multiset by giving the multiplicities for each set element. Can we represent the multiset with just a function? Say your symbol set is $A$, and you have an "indexing set" $C$ and a function $f: C \rightarrow A$. Then the multiplicity of element $a \in A$ is the cardinality of the preimage of $f$ at element $a$. Thus a category of multisets can have functions as objects.