Free Forum # 3 multiset
In mathematics a multiset (also called a pocket or bag, in the original) differs from a set in which each member of it has an associated multiplicity (a natural number) indicating how often the item is a member of the group, for example, in the multiset {a, a, b, b, b, c}, the multiplicities members a, b and c are 2, 3 and 1, respectively. Formal definition
In set theory, a multiset is defined as the pair (A, m) where A is a set and m: A → N is an application of A to N (positive integers). A is called the underlying set of elements. For each to A, the multiplicity of a is the number m (a).
is common to write the function m as a set of ordered pairs {(a, m (a)): a ∈ A}. Since this is, without doubt, the definition (using set theory) of the function m. For example:
• The multiset written as {a, b, b} is defined as {(a, 1), (b, 2)}
• The next {a, a, b}, in turn, is defined as {(a, 2), (b, 1)}, and
• Finally, the multiset {a, b} is defined as {( a, 1), (b, 1)}.
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:
A submulticonjunto (B, n) of the multiset (A, m) is a subset B ⊆ A and an application n: B → N such that n (a) ≤ m (a).
1. Specific example of how it is applied on a multiset data structure
2. What language do you think you can give a multiset?
0 comments:
Post a Comment