| Author |
Message |
Wout Blommers

Joined: Sep 07, 2003 Posts: 4529 Location: The Hague - The Netherlands
Audio files: 123
G2 patch files: 12
|
Posted: Sun Jul 06, 2008 1:05 am Post subject:
Maybe someone knows? Subject description: A question of a very good friend of ours... |
 |
|
Someone from the old [NM]list asked the following:
(for those who once were there they'll recognize the ending of the mail
Hi,
I'm working on something and remember how nice and friendly you guys out
here used to be. My brain is getting old. Maybe one of you will remember
about stuff like this and help me out.
Does anyone know or recollect a function or formula that sums over all
the possible permutations available to a given set of objects?
Take, say, the group of 6 objects: A, B, C, D, E, F.
I already know that you can order them in the various chains
A-B-C-D-E-F, B-C-A-D-E-F and so on and so forth and I already know that
this total is 6! or 6 x 5 x 4 x 3 x 2 x 1 or 720.
I also know that if you want all the triples, then it's 6P3 which is
6!/(6-3)! which is 6!/3! which is 6 x 5 x 4 so giving 120 chains such as
B-D-F, C-E-B and so forth.
So that now makes 120 plus 720 possibilities for this group.
When you've gone through every single possibility and collected up all
singles, doubles, triples, quartets, quintuples and sextets, you get
1,237 total possible groupings.
What I cannot remember is if there is a simple and elegant way to
compute ALL possible permutations in that way for any arbitrary group of
size n.
I want to represent and compute the totality of nPr as r varies from 1
to n for any n.
This kind of thing plays a part in error-checking, in probability theory
and in all sorts of great stuff like that, so I'm pretty sure that one
of you out there will know -- if anyone is still listening these days.
It's just that I've forgotten way too many things to work it out from
first principles these days ... and nor can I find a reference that
tells me this. If someone can indicate a way to find out, I would be
obliged. And ... do please keep it simple. My days are filled with
feeding bunny rabbits and other such high-level stuff these days!!
Thanks.
With every good wish to one and all, and I hope things are good with all
of you,
(K)-(B)
Wout |
|
|
Back to top
|
|
 |
BobTheDog

Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
|
|
Back to top
|
|
 |
Wout Blommers

Joined: Sep 07, 2003 Posts: 4529 Location: The Hague - The Netherlands
Audio files: 123
G2 patch files: 12
|
Posted: Sun Jul 06, 2008 7:01 am Post subject:
|
 |
|
Well, I really love the guy, so here's his answer to Bob's post...
Must be "Hi Bob", of course! | Quote: | http://bytes.com/forum/thread514194.html helps partly. But it assures me that I am on the right path.
We need two things: (a) an algorithm for determining the sum of all the
factorials for any r; and (b) an algorithm for determining the sum of
all the combinations at that same r.
Or to put it another way, what that first person who spoke up is
effectively saying is that we need to compute the number of orderings at
each given r as r ranges from 1 to n; and that we then need to add to
that the number of combinations and we will have the number of permutations.
But that is not really saying anything because the formula for the
number of combinations is already known to be [n!/(n-r)! x r!]. Even I
can remember that much!!
An algorithm certainly exists for finding a factorial, because every
spreadsheet can do this.
So one would think that an algorithm also exists for finding the sum of
all the factorials. But I haven't found it yet.
As far as I can see, the solution is surely that the total number of
permutations at any n is:
n + [n x (n - 1)] + [n x (n - 1) x (n - 2)] + [n x (n - 1) x (n - 2) x
(n - 3)] + ........ through all the r's as n declines until (n - r) = 2;
and then we stop and add 1 to our result.
Which is why I was thinking last night that the binomial theorem comes
into it.
But I really just need to express the sum of such a series elegantly as
r ranges from n down to 2.
I've had some sleep now. I can only hope that my mind is a bit fresher.
So I should be able to figure it out today once I've fed my daughter's
rabbit and other all those other such essential life functions that
befall me these days.
I used to be able to solve such problems with such ease, but they just
don't seem to come up much these days, and I've lost the basic skills.
Thanks for the reference, though, it told me that I wasn't going nuts!!
...
With every good wish,
(K)-(B) | Wout |
|
|
Back to top
|
|
 |
BobTheDog

Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Sun Jul 06, 2008 8:37 am Post subject:
|
 |
|
Hi,
So your friend doesn't want all the permutations, just the count of permutations?
Cheers
Andy |
|
|
Back to top
|
|
 |
Wout Blommers

Joined: Sep 07, 2003 Posts: 4529 Location: The Hague - The Netherlands
Audio files: 123
G2 patch files: 12
|
Posted: Sun Jul 06, 2008 9:14 am Post subject:
|
 |
|
Andy, I surely don't know.
If you could help him, I ask him if you can discuss this by normal e-mail, if you like to do this
Wout |
|
|
Back to top
|
|
 |
BobTheDog

Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Sun Jul 06, 2008 10:00 am Post subject:
|
 |
|
| Check PM |
|
|
Back to top
|
|
 |
|