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

edit

Natural combinatoric numberings

edit
  1. 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.
  2. The k-permutations similarly use the factorial number system because there are   of them.
  3. 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.
  4. The multinomial selections may be treated by combining the combination technique with a mixed radix system based on  .
  5. 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:

  1. 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?
  2. What natural ordering/numbering is natural for the multinomials with indistinguishable sets? --Tardis (talk) 03:47, 29 June 2014 (UTC)[reply]
  1.  
  2. Usually, some sort of lexicographical or antilexicographical order is used. — Arthur Rubin (talk) 15:08, 2 July 2014 (UTC)[reply]
  1. That's not a useful factorization for this purpose: many of the terms are not integers.
  2. How do you (efficiently/simply) compute the indices for such an order with (some) indistinguishable elements? --Tardis (talk) 06:35, 3 July 2014 (UTC)[reply]
  1.  , where b(p,n,k) is the number of "borrows" when subtracting k from n in base p. (Well, you wanted a factorization....)
  2. 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)[reply]