Information About

Multiset





FORMAL DEFINITION


Within from ''A'' to the set N of ( Positive ) Natural Number s. The set ''A'' is called the ''underlying set of elements''. For each ''a'' in ''A'' the ''multiplicity'' (that is, number of occurrences) of ''a'' is the number ''m''(''a'').

It is common to write the function ''m'' as a set of Ordered Pairs { (''a'', ''m''(''a'')) : ''a'' ∈ ''A'' } — indeed, this is the set-theoretic definition of the function ''m''. For example,
  • the multiset written as { ''a'', ''b'', ''b'' } is defined as { (''a'', 1), (''b'', 2) },

  • likewise { ''a'', ''a'', ''b'' } is defined as { (''a'', 2), (''b'', 1) }, and

  • the multiset { ''a'', ''b'' } is defined as { (''a'', 1), (''b'', 1) }.

  • an Indexed Family (mathematics) , ( ''ai'' ), where ''i'' is in some index-set, defines the multiset { ''ai'' } , (provided no element occurs more than a finite number of times in the family. Even in an infinite multiset the multiplicities must be finite numbers).


If the set ''A'' is Finite , the ''size'' or ''length'' of the multiset (''A'', ''m'') is the sum of all multiplicities for each element of ''A'':
  :<math>A \sum_{a\in A}1</math>