Wikipedia:Reference desk/Archives/Mathematics/2014 June 29
Mathematics desk | ||
---|---|---|
< June 28 | << May | June | Jul >> | Current desk > |
Welcome to the Wikipedia Mathematics Reference Desk Archives |
---|
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
June 29
editNatural combinatoric numberings
edit- The k-selections (from an ordered set of size n) in lexicographic order have a very convenient representation in base n because there are of them.
- The k-permutations similarly use the factorial number system because there are of them.
- The combinations are harder because does not(?) have a simple expression as a product of integers, but they have something almost as convenient (and still lexicographic) from the Pascal's triangle identity : you assign the first indices to the combinations that involve the first element, and so recursively among the sets with and without it.
- The multinomial selections may be treated by combining the combination technique with a mixed radix system based on .
- The multinomials may easily be extended to the case where some subset of s elements are taken to be indistinguishable by dividing by — or even . (Not so for the k-permutations or combinations with , since not all of the indistinguishable elements are involved in each pattern.)
Questions, with a mind to writing code to interconvert between (subsets of) these arrangements and their indices:
- Is my statement about factoring correct? (Of course it has a factorization! I mean a convenient one for this purpose.) Is there a better ordering (lexicographic or no) for combinations?
- What natural ordering/numbering is natural for the multinomials with indistinguishable sets? --Tardis (talk) 03:47, 29 June 2014 (UTC)
- Usually, some sort of lexicographical or antilexicographical order is used. — Arthur Rubin (talk) 15:08, 2 July 2014 (UTC)
- That's not a useful factorization for this purpose: many of the terms are not integers.
- How do you (efficiently/simply) compute the indices for such an order with (some) indistinguishable elements? --Tardis (talk) 06:35, 3 July 2014 (UTC)
- , where b(p,n,k) is the number of "borrows" when subtracting k from n in base p. (Well, you wanted a factorization....)
- The method varies. If you choose to order lexicographically by the sequence of which set each element is in, you can index by using:
- .
- If you choose to order lexicographically by the first set, then you use:
- .
- If some elements are indistinguishable, you do the same thing, but specify that the "indistinguishable" elements are in order. Please give an example of what you are trying to do, and I'll see if I can find a simple counting method
- — Arthur Rubin (talk) 07:17, 5 July 2014 (UTC)