From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
WikiProject Mathematics (Rated C-class, Mid-importance)
WikiProject Mathematics
This article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of Mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Mathematics rating:
C Class
Mid Importance
 Field:  Discrete mathematics

Why stop at finite cardinals?[edit]

Formally multisets can be defined, within set theory, as partial functions that map elements to positive natural numbers.

Stupid question, but why stop at finite cardinals? Why can't a multiset be defined as a map from a (normal) set into Card? Why can't elements "occur infinitely many times" as members?
Would be a different concept. Charles Matthews 13:36, 4 Apr 2005 (UTC)
The reason I ask is the following: at the article graph, they say a multigraph is a graph where the edge set is a multiset. This doesn't jive with the category way of thinking of a directed multigraph as a precategory, where with a precategory, there is no restriction on the number of morphisms from one object to another, conceivably, there could be infinitely many distinct such morphisms. So, in this case, "multiset" as defined here isn't broad enough a concept to use for defining "multigraph" (or directed multigraph).
Whether elements of a multiset can have infinite multiplicities varies among the sources that discuss multisets. Brualdi (Introductory Combinatorics, 3rd. ed. 1999, p. 51) and Chen & Koh (Principles and Techniques in Combinatorics, 1992, pp. 34-37) explicitly allow infinite repetition. Other authors do not, e.g. Bogart (Introductory Combinatorics, 3rd. ed. 2000, p. 93). -- Cornazano 01:38, 7 October 2007 (UTC)
Blizard's article (Multiset Theory, now listed in the references) indicates that there is an exposition of multisets by J. L. Hickman that defines multisets as cardinal-valued functions in ZFC; I'm trying to get a copy of the article to read.
Disallowing cardinal repetition numbers seems to create a problem in the following case: Let (in this notation, i is the multiplicity of x). Now, consider the union . Normally, the multiplicity of x in M should be the maximum multiplicity associated with x in the sets Mi. However, in this case, the multiplicity of x is unbounded in the sets of which we are taking the union. Blizard (1998, p. 48) generally defines the multiplicity of an element x in a union of multisets to be the maximum multiplicity of x among those multisets, but takes the somewhat bizarre step of defining the multiplicity in the case of to be the minimum multiplicity in order to avoid having to deal with infinite multiplicities. -- Cornazano 02:10, 9 October 2007 (UTC)
Allowing infinite multiplicities is not as innocent as it may seem, since arithmetic on cardinals is quite different than that on natural numbers. For instance one loses the cancellation property for multiset addition. Marc van Leeuwen (talk) 08:52, 23 January 2010 (UTC)
The article should mention that some definitions of multiset do allow infinite cardinalities, citing one more of the sources above. Noting that this has difficulties would be appropriate.FrankTAW (talk) 13:26, 17 March 2011 (UTC)
On another note, why partial function and not just a function? Surely, 1 is a positive natural number. -- Fropuff 16:23, 2005 May 27 (UTC)
For it to be a function, every element would need to be mapped to a "positive natural number"; in other words, this particular formulation can't support a multiplicity of zero. An equivalent formulation would be ... as functions that map elements to natural numbers. -- Cornazano 01:43, 7 October 2007 (UTC)

References, size and set constructor notation?[edit]

I've been writing a paper which uses the concept of multiset. It fits very well to the problem, that is why.

First, I think I need a reference for the multiset in which all of these defs are given for curious readers. I just remembered that there is not much focus on multisets in computer science, and I am looking for a good reference for that. So, references would be appreciated.

Secondly, can I use to denote the size of multiset ?

Third, I want to adapt the set constructor notation for defining certain multisets. Should I be talking explicitly about the representation , e.g. or are there other ways of defining multisets?

--Exa 23:12, 13 November 2005 (UTC)

First, Multiset#References is all there is. Second, yes, |A| is very much used for the cardinality of a set A, for which this is the generalization. Third, see Family (mathematics)#Notation. Bo Jacoby 13:55, 22 December 2006 (UTC).

polynomial notation[edit]

The article says:

The infinite multiset of finite multisets of elements from the multiset x2 is

Why is the infinite multiset of finite multisets of elements from the multiset {x, x} different from the infinite multiset of finite multisets of elements from the multiset {x}? Michael Hardy 23:45, 21 February 2006 (UTC)

Oh -- I see: it said

"the infinite multiset of finite multisets"

and NOT

"the infinite set of finite multisets"

OK, as Emily Litella would say....

Michael Hardy 23:47, 21 February 2006 (UTC)

Thanks for your improvements. I agree that the text is tricky. I will think about how to make it clearer. Bo Jacoby 07:18, 22 February 2006 (UTC)

Definition where A is fixed and m(x) can equal zero[edit]

My supervisor suggested that A should be a fixed universe of elements and m be a function which can take zero values. This mean e.g. that a subset of (A,m) would be (A,n) where n(x) <= m(x) for all x. Is there a reference for the way Wikipedia currently defines multisets? -- Gmatht 01:09, 17 April 2006 (UTC)

As the two definitions lead to the same concept, it doesn't really matter which one to chose. But the concept of an element of a multiset in one definition is element of the set, and in the other definition element of the set with nonzero multiplicity. The latter statement seems more complicated to me, but your supervisor may like it. Also the idea of a fixed universe of elements either limits the definition (because a larger fixed universe extends the definition), or makes matematicians talk unintelligibly about category theory for several minutes. Bo Jacoby 20:02, 17 April 2006 (UTC)

size, length or cardinality[edit]

The article defines "the size or length of the multiset (A, m)". The word "length" is not commonly used in this sense, to the best of my knowledge. The article set uses the word cardinality. Bo Jacoby 10:04, 24 July 2006 (UTC)

Multiset coefficient wrong in example?[edit]

In the example it shows the multiset coefficient as:

I think that should instead be:

Since it's been this way since the original author added it over two years ago, it seems I must be wrong, but it sure doesn't look correct to me. —Doug Bell talkcontrib 06:23, 9 November 2006 (UTC)

Nevermind, I see where I was confused. The article, as I suspected, is correct. —Doug Bell talkcontrib 06:43, 9 November 2006 (UTC)

Union and join in Operations section are not well-defined[edit]

In the Operations section, the union and join of two multisets and are defined. These definitions are only properly defined if the underlying sets and are equal. Namely, only then and are defined for all .

Take for example the definition of the union: where . According to the definition of multisets, is a function , while is a function and is a function . Now in case , is only properly defined for , since only then both and are defined.

To correct this, function can be defined as follows:


Similar changes also need to be made for the join operations. However, I am not really fond of this verbose definition. Does someone have a better solution?

eboy 12:17, 22 December 2006 (UTC)

Right. The idea 'Talk:Multiset#Definition_where_A_is_fixed_and_m.28x.29_can_equal_zero' would have solved it. This is tricky business. I'll give it some thought. Bo Jacoby 13:41, 22 December 2006 (UTC).

Please comment on this sketch for a solution:

Let A be any set. The set indicator function, 1A, assumes values 0 and 1, where 1A(x)=1 iff x is an element of A, and 1A(x)=0 iff x is not an element of A. (Technically 1A depends on some superset X, but it really doesn't matter which one). A set indicator function 1A identifies the set A. The set indicator functions for intersection and union are:
A multiset indicator function 1A assumes nonnegative integer values 0, 1, 2, etc. The value 1A(x) is called the multiplicity of x, indicating how many times x is considered element of the multiset A defined by 1A. The underlying set is {x | 1A(x)>0}. The cardinality of the multiset is .

Bo Jacoby 00:00, 25 December 2006 (UTC).

The technical term for size of a (multi)set is cardinality. I have changed it. Bo Jacoby 22:11, 25 December 2006 (UTC).

Today I added a subsection on multiplicity function to the article. Your comments are welcome. It remains to clean up the repetitions introduced. Bo Jacoby 12:26, 26 December 2006 (UTC).

Sorry I didn't reply earlier. Thanks for the changes, Bo Jacoby. I do, however see some problems with the current presentation of the material. According to the first section, the multiplicity function is a function , whereas in the second section it is a function , where is some superset of . The problems I see here are as follows:
  • It looks a bit awkward to first formally define multiplicity (in the first section), and then to change that definition again in the following section.
  • Mixing the new definition of multiplicity with the formal definition of multisets is dangerous. From a multiset with and , the set can easily be derived: . This means we should always take care that and match: may never occur. So here it seems better to me to get rid of alltogether.
In summary, in my eyes there are two different ways of defining multisets:
  1. as a pair where ;
  2. as the characteristic function .
Both have their own advantages and disadvantages. For example, an advantage of 1. over 2. is that you don't need to know the universe where is in; an advantage of 2. over 1. is that the definitions of multiset operations are much cleaner.
eboy 14:44, 8 January 2007 (UTC)

Thank you for your comment. I completely agree with your analysis: 'It would be nice to have a unified approach, but none of the two methods is preferable in all cases'. The lazy solution is to leave the problem to the editors of indicator function, where the same problem shows up in the simpler context of sets. The indicator function of a set, say {1,2,4}, depends strictly speaking not only on the set itself, but also on the 'context' superset (say the integers Z or the reals R), because any function depends on it's domain. So the notation 1{1,2,4} is strictly speaking ambiguous. However this formal dependence on the superset is uninteresting. Any old superset will do, and if it happens to be too narrow, just replace it by a wider one, setting 1{1,2,4} (x)=0 for x outside the set {1,2,4}. It would be nice to have a universal superset, but we are warned that this construction leads to inconsistencies in the logic, Russell's paradox and all that. Perhaps the present state of set theory is immature and unsatisfactory, since it leaves this problem to us. I am not qualified to improve set theory, so I think I must leave the problem unsolved. Bo Jacoby 23:09, 1 February 2007 (UTC).

multisubset and corresponding sets[edit]

If A is a set, can I have B--a multisubset of A? e.g. A={x,y,z}, B={x,x,x,y,y}. What about sets with corresponding multisets? e.g. C={x,y} is the set corresponding to the multiset B. B then could also be a multiset corresponding to a subset of A. —The preceding unsigned comment was added by (talk) 07:06, 1 February 2007 (UTC).

You are right. So I introduced the concept of a multiset with elements taken from a set. It is not the same thing as a submultiset of a multiset. Bo Jacoby 08:40, 2 February 2007 (UTC).
I believe the concept being addressed here is related to the concept of the support of a multiset. In this example, B is what is known as a multset over A. Given the set , the extension listed for B arises formally as the multiset with the function defined by . The support of B is , i. e., the subset of A with non-zero multiplicity in B. This definition of the support of a multiset is given by Syropoulos (2001, p. 349). -- Cornazano 03:26, 9 October 2007 (UTC)

Alternative Definition for Multi sets[edit]

The notion of the function m---being a a set of tuples mapping elements of the underlying set onto natural numbers seems to make having the underlying set identified separately redundant. Can we just have:

A multi-set is a set X of tuples (x,m). Where m is a natural number. Y={x|(x,m)\in X} is the underlying set...? InformationSpace 01:43, 12 February 2007 (UTC)

If I'm understanding the suggestion correctly, it is actually somewhat different from the standard definition as a function, in that it does not guarantee that a given x appears in only a single tuple in the set X. If we consider a set , then we meet the definition with tuples. However, (multi)set differences pose a problem: what is ? First off, it is not well defined, and secondly it may collapse an element out of the set. The two possible results are or . Part of what we're dealing with is the fact that every function is a relation (can be represented as tuples), but not every relation is a function. -- Cornazano 03:41, 9 October 2007 (UTC)

Thanks for your comment. Unfortunately, I can't see how this would simplify the definition of the multiset union (and join). The best way I can define this operation it using your definition of multisets is as follows:

where is defined as follows:

But maybe someone has an idea how to improve this definition.

BTW Since Wikipedia is not meant for original research, we need to make sure the formal definition we use is already used in the literature and provide a reference to this literature. eboy 14:54, 13 February 2007 (UTC)

I think the trick to simplifying this is to define so that is in any multiset. BTW I do like your idea of extending so that it works for the tuple and the element of the underlying set. Point taken about original research. Doesn't mean we can't discuss it though! --InformationSpace 02:44, 2 March 2007 (UTC)

I've just been looking at how Fuzzy sets are defined---Fuzzy sets are sets of tuples just as I suggest for multisets above. Should fuzzy sets be defined as multisets are, with an indicator function with a range or should multisets be defined as fuzzy sets are!? InformationSpace 03:12, 16 March 2007 (UTC).

That is nice. A set, specified by a function assuming values 0 and 1 only, is generalized to multiset by extending the range to nonnegative integers, and to fuzzy set by extending the range to the unit interval [0,1]. Bo Jacoby 07:49, 16 March 2007 (UTC).
Mmmm... seems nice and neat to me! You can also have fuzzy-multisets where m just maps to reals. Sets, multisets, fuzzy-sets, fuzzy-multisets (and whatever...) can all be collections. Collections are objects that have certain operators defined (element, subset, union,...) Theres some heavy-duty mathematical house cleaning for you! Must publish first I guess... InformationSpace 01:01, 19 March 2007 (UTC)
Fuzzy multisets are discussed in Syropoulos (2001), as are hybrid sets. A hybrid set is like a multiset, except that the indicator function can be negative. In other words, a hybrid set H over a set A is defined as a pair where is a function. -- Cornazano 03:50, 9 October 2007 (UTC)

--Bo Jacoby 20:07, 10 May 2007 (UTC)== indexed families and multisets ==

"An indexed family, , where i is in some index-set, defines the multiset ." There are a number of problems with this statement. 1 - indexed families do not appear in the definition of multisets, so an indexed family cannot "define" a multiset. 2 - is a tuple, not a set or a multiset. 3 - it is not even clear how is a multiset. Some ammendment/clarification is required here. Otherwise, I shall remove this.InformationSpace 06:30, 4 May 2007 (UTC)

  1. An indexed family does not define the concept of a multiset, but it does define a specific multiset.
  2. Correct. is a tuple. Every tuple is an indexed family. Every tuple defines a multiset of values.
  3. is a multiset in the sense that if an element occurs in the list once or several times, then this element is member of the multiset that number of times. For example {1, 1, 2, 3, 3} is a multiset represented by the indexed family a defined by a1=1, a2=1, a3=2, a4=3, a5=3. Bo Jacoby 20:07, 10 May 2007 (UTC).

No, I still think this is wrong. Either an indexed family is a multiset or there is an isomorphic mapping (not defined or described in the article) from to some multiset . cannot be a definition of a multiset. InformationSpace 04:42, 12 July 2007 (UTC)

The multiset {1,1,2} can be represented by the tuple (1,1,2) or alternatively by another tuple such as (1,2,1). The tuples (1,1,2) and (1,2,1) differ, but the multisets {1,1,2} and {1,2,1} are equal. A function f maps tuples to finite multisets: f((1,1,2)) = f((1,2,1)) = {1,1,2} . So the tuple (1,1,2) is not the same thing as the multiset {1,1,2}, but the tuple (1,1,2) defines the multiset {1,1,2}. A finite multiset is a tuple modulo order. Am I clear? Bo Jacoby 11:02, 17 July 2007 (UTC).

More clarity please[edit]

I'm a chemist with a deep fascination for all sciences, Mathematics is one of those. But despite my enthusiasm, I couldn't really understand what this article attempted to explain until I independently "discovered" a recursive algorithm (using sums) to find what only now I know is called Multiset Coefficient. I was looking for the number of different combinations of numbers you can obtain by rolling n k-faced dice (ndk in roleplayer's notation). I tried on paper different approaches until I found an "amazing pattern" which I couldn't find a way to describe mathematically. Then suspecting I rediscovered the wheel for the n-th time, I took a look at this article and tried the Multiset Coefficient formula... and the results were the same. Then I understood what a Multiset Coefficient was.

That's not the way things should be :-/ the works of mathematicians should be clearly understandable for all people, at least for all reasonably educated and willing people.

Is there somebody out there with enough knowledge in mathematics willing to work with me to make the article (and the family to which it belongs) more understandable for the layman?. Thank you for reading Pentalis 05:48, 8 July 2007 (UTC) Edit: errk, now I realize those were Binomial Coefficients instead of Multinomial... now I'm twice as confused -_- *reading the other article* Pentalis 06:02, 8 July 2007 (UTC)

I'll be glad to join you in improving the article. As there are many types of 'layman', the task of making the article understandable to the layman is not well defined, but nevertheless, your experience and enthusiasm is likely to be an asset. Bo Jacoby 17:42, 8 July 2007 (UTC).

Proposed changes, review and criticism[edit]

I didn't feel the introduction was clear, summarizing and introductory enough, but I felt it was better to rewrite it than review it. My first step in improving the article was creating this proposed new introduction, hoping it illustrates what I think could be improved in it.

Please, highlight any mistake of concepts or misleading statements, so then it can be added into the article

In mathematics, a multiset (or bag) is a generalization of a set, where its members can have more than one membership.

The total number of elements in a multiset, including repeated memberships, is represented in its cardinality, and the number of times they belong to the set is represented in their multiplicity, i.e. in the multiset {a, a, b, b, b, c} the multiplicities of the members a, b, and c are respectively 2, 3, and 1, and the cardinality of the multiset is 6.

In multisets, as in sets, the order of elements does not matter; in contrast to tuples, where order is important. The following list displays the difference between the three concepts, note how a multiset can also be considered an unordered tuple:

  • The tuples (a, b) and (b, a) are not equal, because in tuples order is important; and the tuples (a, a) and (a) are not equal either, because in tuples and multisets multiplicity is considered.
  • The multisets {a, b} and {b, a} are equal, because in multisets order is unimportant; but the multisets {a, a} and {a} are not equal, as they have different multiplicities.
  • The sets {a, b} and {b, a} are equal, like the multisets {a, b} and {b, a}; but the sets {a, a} and {a} are equal, unlike the multisets {a, a} and {a}, this is because in sets, the concept of multiplicity does not exist, or in other words all objects, no matter how many times they belong to the set, still count as one.

Pentalis 10:16, 10 July 2007 (UTC)

Well done, Pentalis. Suggestions for clarity:
  • In mathematics, a multiset (or bag) is a generalization of a set. A member of a multiset can have more than one membership, while each member of a set has only one membership.
  • The total number of elements in a multiset, including repeated memberships, is the cardinality of the multiset, and the number of times an element belong to the multiset is the multiplicity of that member. i.e. in the multiset {a, a, b, b, b, c} the multiplicities of the members a, b, and c are respectively 2, 3, and 1, and the cardinality of the multiset is 6.
  • ... but the multisets {a, a} and {a} are not equal, as they have different cardinalities.
Bo Jacoby 20:42, 10 July 2007 (UTC).

To whom can we attribute Multisets?[edit]

Nobody? When were they invented/introduced? InformationSpace 03:57, 11 July 2007 (UTC)

Good question. Google "multiset" and follow the links! Bo Jacoby 08:37, 11 July 2007 (UTC).
We know that it dates at least as far back as 1977, when multisets are discussed in Brualdi's Introductory Combinatorics (first edition). I haven't ever had cause to do an article search for it, which means there are probably references that predate Brualdi's use of the term. -- Cornazano 01:57, 7 October 2007 (UTC)
I have added a bit on this topic. --Goochelaar 09:33, 7 October 2007 (UTC)
I added an additional reference on the early use of multisets. -- Cornazano 22:19, 7 October 2007 (UTC)

Correspondence between sets and multisets with all multiplicities = 1[edit]

The article states that "A multiset is a set if the multiplicity of every element is one." This is not strictly true, since the multiset includes as part of its structure a function that does not exist in the structure of a set. It is possible to identify a set S with a multiset (S, m) where m(x) = 1 for all x, in the sense that there is a bijection between (the category of?) sets and multisets whose multiplicity function is the constant function 1.

My question, as a relatively new contributor, is whether this distinction is this too specific for inclusion in a general encyclopedia article. Any thoughts? -- Cornazano 14:19, 7 October 2007 (UTC)

Since every ordered pair (A, B) := {{A}, {A, B}} is a set (consisting of two sets) every multiset is also a set. Therefor the statement "A multiset is a set if the multiplicity of every element is one." is strictly true but it does not state anything new ;-) -- (talk) 18:18, 10 January 2008 (UTC)
I agree that this is technically correct, but only in the sense that we can say that an integer is a set, and a real number is a set, and a field is a set, and a vector space is a set, etc. We don't normally make statements like that, even if they are strictly true and don't add anything new. Nearly all of mathematics can be coded in set theory. I still find the statement misleading for several reasons, and think it needs to be changed.
First, our formal systems typically treat sets as a primitive notion (e.g., in ZFC) and multisets are being formally defined here in terms of that primitive notion. The only exception that I know of to this is Blizard's article, where he develops a first-order theory of multisets where mset is a primitive notion; however, a first-order theory of multisets does not formalize a multiset in terms of set theory.
Second, we define operations for multisets (such as ) that do not apply to sets but do apply to multisets. Claiming that a multiset where all multiplcities are 1 is a set can be easily misconstrued--either to mean that the exclusively multiset operations don't apply, or that the multiset operations should apply to sets.
Third, there is a clear distinction in the literature between the categories of and (see, e.g. the article by Syropoulos). Are there any sources that formalize the theory of multisets and claim that these particular multisets are actually sets? Cornazano (talk) 18:11, 5 May 2008 (UTC)
As User:Cornazano pointed out, a multiset with all multiplicities equal to 1 is not technically the set of its members, because of the additional structure, the multiplicity function. (The fact that they are sets just because ordered pairs are sets is not interesting, since all mathematical structures are sets.) However, there is the natural function F: MSet -> Set from multisets to sets where all the multiplicities are just "forgotten". Then one can accurately state that for any multiset X with all multiplicities equal to 1, we have that the multiset (F(X), 1) where 1 is the constant function F(X) → N taking only the value 1, satisfies (F(X), 1) = X. This implies that if we wish we can harmlessly identify such multisets with their underlying set, by simply defining a set to be a multiset with all multiplicities equal to 1. This is analogous to how the product of cartesian powers YK × YL is identified with the cartesian power YK+L.Daqu (talk) 20:36, 28 November 2014 (UTC)

Alternate uses of the term multiset?[edit]

In addition to the mathematical object discussed in this article, multiset can also refer to a component of the C++ Standard Template Library, and as a software application (see, e.g.,, and numerous references from a Google search on multiset). There are currently no Wikipedia articles on either of these uses, so I don't think a disambiguation is needed at this point. A question: should these alternate uses be acknowledged at the beginning of the article in some form? -- Cornazano 14:41, 7 October 2007 (UTC)

Codomain of the multiplicity function[edit]

At the moment, it appears that the article is inconsistent in regards to the codomain of the multiplicity function. Under Formal definition, the codomain is taken to be the positive integers ("m : AN is a function from A to the set N = {1, 2, 3, ...}"). Under Multiplicity function, the codomain is taken to be the non-negative integers ("Now generalize the concept of set indicator function by releasing the constraint that the values are 0 and 1 only and allow the values 2, 3, 4 and so on."). This should probably be updated so that it is consistent, and supported with sources in the literature.

I don't have Stanley or Knuth ready to hand, but Bogart specifies the codomain as the non-negative integers (Kenneth P. Bogart (2000), Introductory Combinatorics, 3rd. ed., p. 93). Other sources explicitly annex the symbol $\infty$ to the codomain, allowing for unlimited repetition (see the earlier discussion of Why stop at finite cardinals? for references; I haven't yet found any sources that extend the codomain to all cardinals). Which source(s) limit the codomain to positive integers? Which sources extend it beyond natural numbers? -- Cornazano 15:18, 7 October 2007 (UTC)


There seems to be an alternative way of writing for the braces (Introduction of Can anybody verify that? —Preceding unsigned comment added by (talk) 11:41, 2 December 2007 (UTC)

Fourth kind[edit]



FALSE, TRUE -> multiset

TRUE, TRUE -> tuple

What about TRUE, FALSE... The order is important, but it is unimportant whether a member is repeatedly inside this collection. Does this thing have a name? --Abdull (talk) 17:02, 2 February 2008 (UTC)

The thing (a,b,a)=(a,b) because repetition is unimported, and likewise (a,b,a)=(b,a), but (a,b)≠(b,a) because order is important. So the new concept leads to a contradiction. Bo Jacoby (talk) 21:45, 3 February 2008 (UTC).
Unless it means sequential repetition is unimportant, where (a,a,b)=(a,b,b)=(a,b) but (a,b,a)≠(a,b). This concept may have some use with coding theory. Fuzzy (talk) 16:10, 18 March 2008 (UTC)

fooled by n and k convention[edit]

On closer inspection, it seems the n and k used in the multiset article are reversed from the usage in the stars and bars (probability) article. The difference in convention appears to have fooled User:Sisodia in the case of the latter, and fooled me in the case of the former. Btyner (talk) 02:30, 16 March 2008 (UTC)

What about set difference?[edit]

Discussing about relational algebra, I came about the definition of difference for a multiset. Now this article defines intersection, union, sum (join) etc, but what about difference? Two different definitions seem plausible to me:

  • A - B is the multiset containing all elements from A that do not occur in B
  • A - B is the multiset where the multiplicity of each element is given by

I don't have the necessary background to check which definition is used (or even makes sense), or if the set difference has any meaning at all for multisets. Also, for normal sets, difference is often defined as . Since the complement of a multiset does not make sense (at least to me) this is problematic... Jonas Wagner (I'll get a username soon :-)), last edited 23 April 2008

The second definition makes the most sense to me, but we really need an authoritative reference - if the references don't agree, we need to discuss a few prominent definitions. Dcoetzee 20:41, 21 April 2008 (UTC)
The second definition of the difference of two multisets (also called the relative complement or, in at least one case, the removal of one multiset from another) is what I've encountered in the literature. Syropoulos uses the notation to denote the relative complement of in ; Hickman and Blizard both use . Cornazano (talk) 16:02, 4 May 2008 (UTC)
Regarding the references, we can't effectively discuss their differences until we discuss the different definitions of multiset. In particular, some definitions (e.g., Hickman, planetmath) allow the multiplicity of an element to be an infinite cardinal. The operation is not well defined for arbitrary cardinals, so their definition of the relative complement necessarily differs from that given here. However, it does give the same results for finite multiplicities. Cornazano (talk) 16:19, 4 May 2008 (UTC)


Reading this article, I disagree strongly with some notations used (meaning both that I don't recognise notation I have encountered in the literature, and I don't like the notation used here). My strongest feelings are about notation like . By standard mathematical conventions, that is a set, and equal to , so one cannot also have it designate a multiset. Although one would not usually write the same element multiple times in the same set, it may happen that some elements "happen to be" equal, and the interpretation of pruning repetitions in this case is universally accepted, and often important. For instance the set of cosets will usually be defined as , with each coset appearing many times in different guises. But even if one would say an explicitly written set designates a multiset if some entries are repeated, this would leave it impossible to distinguish between a finite set and the corresponding finite multiset (in which multiplicities are at most 1). See the current description of the multiset in the section Formal definition to see the kind of confusion this ambiguity can lead to. In fact many of this article's formulas are quite ambiguous due to this matter.

It is true that I know no precedent in the literature; authors discussing multisets seem to avoid the question of writing them down explicitly. Stanley, in Enumerative Combinaotrics 1, page 15, says that could be written as , which causes obvious confusion if a and b should be numbers. In fact on the next page he writes a multiset rather than so maybe one should not take this as too authoratative a reference on notation. Personally I think a valid notation is to double the braces (restricting spacing to avoid another ambiguity): . (Does anybody know about blackboard bold braces?).

Another shock for me is using angles for "multiset coefficients" (somehow an awkward echo of the term "binomial coefficient") as in , since that notation is already used for Eulerian numbers! Here I am sure there is a more frequently used convention, which is to double the parentheses of binomial coefficients, as . I'm pretty suer these are used freely in the literature nowadays.

Finally I was also surprised to read at Indexed family#Notation that denotes a set but denotes a multiset (while not really ambiguous, this is confusing, and certainly many using the second notation are not aware of this interpretation). It should come as no surprise that I would prefer writing the multiset as . Marc van Leeuwen (talk) 13:08, 8 June 2008 (UTC)

Thanks for the comment. Feel free to improve.

  1. As the multiset coefficient is easily expressed in terms of a binomial coefficient the notation is not necessary except intermediately.
  2. As a multiset of numbers is easily expressed by a cumulant generating function, a notation is not necessary except intermediately. Multisets of elements that are not numbers are less commonly used.
  3. When it is not necessary to distinguish between a multiset where all multiplicities are one, and the set of the same elements, then there is no reason to invent a special notation for multisets.

Bo Jacoby (talk) 00:31, 9 June 2008 (UTC).

The first two points I do not agree with. While indeed the multiset numbers can be expressed in terms of binomial coefficients, and vice versa, this does not mean either one should be sacrificed. The situation is similar with sines and cosines, which can also be expressed in terms of each other, but doing so systematically would make it impossible to express certain symmetries, or certain formulas in a symmetric way. (By the way, I can't get myself to say multiset coefficient, which terminology is a bastard of "binomial coefficient" that is bound to create tremendous confusion with the legitimate descendant "multinomial coefficient". The only way I can see multiset numbers as coefficients of anything related to multisets is tautologically as coefficients of multiset-generating functions; like that we could start calling Catalan numbers "Catalan coefficients" as well.) As for cumulant-generating functions, they seem to be a rather specialised notion related to random variables, it would seem silly to force anyone talking about multisets of numbers, say the roots of a polynomial, to use them. Marc van Leeuwen (talk) 13:30, 23 January 2010 (UTC)

Welcome back Marc!

  1. While the name "binomial coefficient" and the notation is well established during centuries, I agree that "multiset coefficient" is a bastard, and the expression doesn't seem to deserve a special notation. The special notation is not equally well established in the literature. This is unlike sin and cos which historically evolved in parallel.
  2. The cumulant generating function is known as the logarithm of the Partition function (statistical mechanics) which is not "rather specialized". When the roots of a polynomial are nonreal complex numbers, I agree that a generalization is called for.

Bo Jacoby (talk) 16:29, 23 January 2010 (UTC).

Absent agreement on what the notation should be, adding proposed notations for multisets and sub-multisets and elements of multisets would be helpful. If I'm referring to multisets, I can explain the meaning of a notation. But if I just invent my own new notation it only adds to the confusion. (Jay Gourley (talk) 19:36, 6 February 2016 (UTC))

Relative complement[edit]

I undid an edit concerning relative complement A\B because the edit assumed that B is a subset of A, which is not necessarily the case. Bo Jacoby (talk) 21:48, 26 July 2009 (UTC).

Join = sum ???[edit]

I was baffled that this article uses the term "join" for the multiset sum. This is totally inconsistent with the use of the terms join and meet in poset theory (more precisely in lattices), where these two operations are idempotent. If any operation on multisets is to be called join, it should definitely be the one currently called "union" (taking maxima of multiplicities). For instance, to compute the join of two positive integers in the lattice defined by divisibility (i.e., to compute their least common multiple), one can take the union of their multisets of prime factors and multiply those. In fact "join" is better that "union", since the latter term is in some (combinatorial) contexts implicitly taken to mean "disjoint union" (in the sense of attaching distinguishing marks in case of equality, to avoid undercounting), which would correspond to multiset sum in the context of multisets. That is a minor point, but using "join" for multiset sum is intolerable. In fact I'm going to edit it away right now; if anyone disagrees, please provide a strong argument why this term should be used. Marc van Leeuwen (talk) 15:07, 23 January 2010 (UTC)

Clarity of Introduction[edit]

I came here to find out what a bag / multiset is. I read it, and heard a big *woosh* over my head.

I believe the problem is this introduction:

In mathematics, a multiset (or bag) is a generalization of a set. While each member of a set has only one membership, a member of a multiset can have more than one membership (meaning that there may be multiple instances of a member in a multiset, not that a single member instance may appear simultaneously in several multisets).

This does not say anything in a clear and concise manner. The second sentence even has a much longer part in parenthesis that tries to explain the same thing again. This is generally a sign that there is a problem with clarity, not to mention brevity.

I cannot fix this myself, because I still don't know what a multiset is.

Zackzing (talk) 08:28, 13 December 2010 (UTC)

I believe I see your point. Before modifying the article itself, what do you (or other editors) think of something along the lines of the following?
In mathematics, a multiset (or bag) is a generalization of a set. Informally, while for an ordinary set each element either is or is not a member of the set, in a multiset a same element may appear more than once.
Later in the article more details are given, both intuitively and formally, but perhaps this could work to give a first idea. Opinions? Goochelaar (talk) 10:36, 13 December 2010 (UTC)
I believe that is better. But I wonder if we can do it even more briefer.
In mathematics, a multiset is a generalization of a set. While a set contains only unique elements, a multiset can contain duplicate elements.
I am not going for rigour, but just for the quickest way of saying it. I am not sure even the first sentence is necessary. I noticed the computer science version is rather good:
A variation of the set is the multiset or bag, which is the same as a set data structure, but allows repeated values.
The difference here is that it is in an article already on set. But either way, I think yours is good as is, or maybe made slightly shorter. Zackzing (talk) 06:31, 14 December 2010 (UTC)
Zackzing (talk) 06:31, 14 December 2010 (UTC)
I agree that the second sentence, as written, was extremely hard to decipher; I'm modifying now in line with the suggestions made here. --Joel B. Lewis (talk) 23:13, 17 July 2011 (UTC)

Infinite multiplicity again[edit]

Article currently says:

Within set theory, a multiset may be formally defined as a 2-tuple(A, m) where A is some set and m : A → N≥1 is a function from A to the set N≥1 = {1, 2, 3, ...} of positive natural numbers. The set A is called the underlying set of elements.

As stated, this excludes the (rather natural) possibility of elements with infinite multiplicity.

I see that this was the very first complaint on this talk page, and references were even given, but nothing seems to have been done about it. This strikes me as rather serious. If you're allowing infinite sets, then I can't see much point in disallowing infinite multiplicities too. --Trovatore (talk) 01:54, 19 April 2012 (UTC)

"If you're allowing infinite sets ..." In fact it looks to me like everything in the article is about finite multisets (i.e., this is an article about combinatorics, with a little bit of set theoretic exposition thrown in to help make it less comprehensible ;) ). One could write an article about multisets including infinite ones, but it seems like in that case it would still be good to have an article like this one about only the finite aspects. --Joel B. Lewis (talk) 03:37, 19 April 2012 (UTC)
Well, there's nothing in the article that says it's about finite multisets, and set theory is really not that interesting/useful until you get to infinite sets, except as you say to make things less comprehensible. It's true that only one example comes to mind where I came across multisets in set theory itself, but still, the most natural notion of multiset does not seem to be restricted to the finite case. --Trovatore (talk) 03:53, 19 April 2012 (UTC)

Further on infinite versus finite[edit]

An IP editor and ‎Marc van Leeuwen just went back and forth on some changes w.r.t. the finite versus infinite problem. Right now, the article is entirely about finite multisets (though it doesn't say this in the intro) except for the section "formal definition" which allows infinite multisets (the set A can be infinite, even though the multiplicities are currently restricted to be finite). This is obviously untenable. I suggest that the intro and formal definition be rewritten to make it unambiguously clear that this article is about finite multisets. This will leave a bunch of material (some added by the IP editor then removed, some in the "formal definition" section) homeless; this material should be put into a new section somewhere that discusses the issue of infinite multisets (of both sorts: infinite base sets and infinite multiplicities). Are there any thoughts or objections? --Joel B. Lewis (talk) 15:30, 19 June 2012 (UTC)

I don't quite agree that the article is entirely about finite multisets. In fact very little is said that excludes infinite multisets (but with finite multiplicities), neither in the intro, overview, formal definition, nor multiplicity function sections (the one occurrence of a parenthesised (finite) is the only exception, and this is merely to avoid the (solvable) problem of defining the sum of an infinite collection of natural numbers, indexed by a set, as a cardinal number). But it is true that nothing is explicitly said about infinite multisets, no examples of them are given, some parts just do not apply to the infinite case (counting multisets), and the (anyway ambiguous) notation using braces with possibly repeated elements between them is not suited to write down infinite multisets (not really different from the situation for the same notation for ordinary sets). Anyway I want to stress that recent edits are only about the finite/infinite multiplicity question, which is an entirely different issue. However, if not much useful is being said about infinite multisets (and I'd love to see good practical examples of their use), then a fortiori the utility of allowing infinite multiplicities is not being made evident. Marc van Leeuwen (talk) 11:59, 21 June 2012 (UTC)
It may be the case that infinite multisets are simply not much discussed in the literature, and it is not the task of wikipedia editors to fill in the gap. You may think of the normal distribution as an infinite multiset of outcomes, but that is (at least to me) confusing and not helpful. A binomial distribution with rational probability parameter can be modelled as a finite multiset, and the normal distribution is a limiting case of binomial distributions. So the bridge leading from finite multisets of numbers to infinite multisets of numbers is the cumulant generating function. Bo Jacoby (talk) 07:37, 23 June 2012 (UTC).

Applications section[edit]

Wouldn't a simple application be, say, the roots of ? In set notation it's {−4, +1}, but multisets allow you to show multiplicity of roots, like {−4, +1, +1}. — Preceding unsigned comment added by (talk) 20:53, 7 July 2014 (UTC)


{1,1,1,3}\{1,1,2}= {1,3} was it? --Peiffers (talk) 16:21, 14 July 2014 (UTC)

Sure. According to talk section 'What about set difference?'

--Ernsts (talk) 19:38, 4 December 2017 (UTC)

Cite the use of square brackets[edit]

For non-mathematics and introductory text, to avoid confusion with set notation in the same text, is usual to adopt square brackets notation: A={1,2} is a set, B=[1,2,2] is a multiset.

See full notation here. --Krauss (talk)

Cite relationship with frequency concept in Statistics[edit]

Multiplicity and frequency are the same. To model a name/frequency table of statistics, we use the cartesian product Name X Name_frency... As multiplicity, same semantic in with the same product of sets modeling it. --Krauss (talk)

Interesting elementary formula[edit]

It can be easily proven that . I think this formula should be included in the article. Aside from its intrinsic interest, it comes handy when studying dimensions of some subspaces of vector spaces and/or problems related to polynomials.

Example 1: If we consider a polynomial of degree d in n variables along with all its first k-derivatives, this formula computes, from the number of derivatives of order i for each i, the total number of polynomials arising in the system.

Example 2: Since the homogeneous polynomials of degree i in n variables over a field form a subspace of dimension , this formula shows that is isomorphic to , what can also be inferred from the homogeneization process.

What do you think?

Jose Brox (talk) 10:49, 21 August 2018 (UTC)

Dedekind source[edit]

A correspondent mathematician questions the whole concept of multisets, basically saying it is poorly defined. He therefore cannot believe Dedekind would have had anything to do with them (Reference 11). Does anybody here happen to know the page number where Dedekind describes/uses multisets in his book?

Failing that, is there some authoritative source which defines this concept, preferably a book on set theory? It seems that discrete maths does not count for my correspondent; it is probably not real maths ;-) KarlFrei (talk) 16:59, 11 December 2018 (UTC)

The definition in the article of a multiset being a pair of a set and a function of this set to positive integers is perfectly accurate, and cannot be qualified as poor. For an authoritative source, Knuth's book (reference 2 of the article) is the best possible reference. This book is sufficiently important to have an article in Wikipedia, and has often been qualified as the "Bible of discrete mathematics". Your correspondent is free to consider that some part of mathematics is not really mathematics, but this is clearly not the opinion of American Mathematical Society, which includes discrete mathematics in its subject classification. I guess that your correspondent consider as not "counting" everything that they does not know ;-) D.Lazard (talk) 19:03, 11 December 2018 (UTC)