home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math
- Path: sparky!uunet!pipex!warwick!pavo.csi.cam.ac.uk!camcus!gjm11
- From: gjm11@cus.cam.ac.uk (G.J. McCaughan)
- Subject: Re: Permutation problem
- Message-ID: <1992Sep4.230042.23738@infodev.cam.ac.uk>
- Sender: news@infodev.cam.ac.uk (USENET news)
- Nntp-Posting-Host: bootes.cus.cam.ac.uk
- Organization: U of Cambridge, England
- References: <Bu14Ep.IEE@matilda.vut.edu.au>
- Date: Fri, 4 Sep 1992 23:00:42 GMT
- Lines: 35
-
- In article <Bu14Ep.IEE@matilda.vut.edu.au>, kcj@matilda.vut.edu.au (Kate) writes:
-
- > Can someone tell me the formula for getting the number
- > of permutations of any group of numbers that add up to a certain number. e.g.
- > how many permutations of length 5 add up to 20?
-
- Erm, what is a "permutation" in this context? Do you mean: how many strings
- of numbers, no two of which are the same, add up to [whatever]?
-
- If so...
-
- These permutations come in "families" of size r! where r is the length of the
- strings (because rearranging a permutation leaves it a permutation and doesn't
- change what it adds up to). Dividing out by that, we want to know how many ways
- there are to chop 20 up into 5 different parts, where we aren't bothered about
- what order they come in.
-
- This is the same as the number of ways to chop 10 = 20-(0+1+2+3+4) into 5 parts,
- where they needn't be different and we don't care what order they come in. (We
- can convert one type of "partition" into the other by subtracting 0 from the
- smallest part, 1 from the next-smallest, and so on.)
-
- I don't think there's a terribly nice general formula. If you write p(n,r)
- for the number of ways to split n into r parts, where they don't have to be
- all different, then ... um ... either the smallest part is 1 [p(n-1,r-1) of
- these] or it's not and all the parts are at least 2 [p(n-r,r) of these].
- So p(n,r) = p(n-1,r-1) + p(n-r,r), and you can use this (plus trivial things
- about what happens when n or r is 0) to evaluate p(n,r) if n,r are small.
- There's probably a rather more efficient way for large n...
-
- Certainly p(n) [the sum of all the p(n,r)] is not very well understood. There
- are recurrences, and estimates for large n, and a very few congruence relations;
- and there *is* a formula that calculates it, but it's Very Strange and has
- things like Bessel functions in it; but there's an awful lot that is not really
- understood at all.
-