Combinatorics question (1 Viewer)

milton

Member
Joined
Oct 30, 2004
Messages
107
Location
Westmead
Gender
Male
HSC
2006
How many ways can you divide n people into r groups?
(each group has to have at least 1 person obviously :p)
 

milton

Member
Joined
Oct 30, 2004
Messages
107
Location
Westmead
Gender
Male
HSC
2006
no, that is incorrect because you're double-counting some cases where a certain person appears in your first r selection to put 1 in each group, and that certain person appears later in the same arrangement of groups in the r^(n-r) part

e.g. take n=3, r=2
there are 3 possible arrangements of groups ie
(A) (BC)
(B) (AC)
(C) (AB)
but your formula gives 3C2*2^(3-2)=6

this problem is much trickier than it seems ;)
 

airie

airie <3 avatars :)
Joined
Nov 4, 2005
Messages
1,143
Location
in my nest :)
Gender
Female
HSC
2007
I hate typing in VB codes :S

One group with n-r+1 people, the rest with 1:
[nCn-r+1*r-1C1*r-2C1*...*1C1] / (r-1)!
One group with n-r people, one with 2, the rest with 1:
[nCn-r*rC2*r-2C1*...*1C1] / (r-2)!
One group with n-r-1 people, two with 2, the rest with 1:
[nCn-r-1*r+1C2*r-1C2*r-3C1*...*1C1] / [2! * (r-2)!]
... etc. until all possibilities exhausted.

And add them all together.

...Ugh. Such disgusting counting. x.x
 

§eraphim

Strategist
Joined
Jul 4, 2004
Messages
1,568
Gender
Undisclosed
HSC
N/A
There is discrete calculus. The time step is an arbitrary delta T.

It's called time scale calculus as it attempts to blend bridge the theory of differential equations and difference equations.
 

Mill

Member
Joined
Feb 13, 2003
Messages
256
Gender
Male
HSC
2002
Maybe I'm missing something but you are simply solving an equation of the form:

x1 + x2 + x3 + ... + xr = n

ie. placing n pidgeons into r holes (d/w im not gonna use pidgeon hole principle, its just an analogy :p)


now since we have the condition that xi > 0

we solve:

y1 + y2 + y3 + ... + yr = (n - r)

[where we have taken into account that every hole MUST have a pigeon, and as such reformulated the problem to consider the r holes and (n - r) remaining pidgeons]

the number of solutions to such a problem is:

(n - r + r - 1) C (r - 1)

= (n - 1) C (r - 1)


unless i misunderstood the problem ;d
 

Mill

Member
Joined
Feb 13, 2003
Messages
256
Gender
Male
HSC
2002
i suspect i may have answered a slightly different problem since my pidgeons are perhaps indistinguishable and the people are not.

i'm going back to sleep :p
 

Mill

Member
Joined
Feb 13, 2003
Messages
256
Gender
Male
HSC
2002
MY LAST THOUGHT - then sleep



FROM BEFORE:

x1 + x2 + x3 + ... + xr = n

now since we have the condition that xi > 0

we solve:

y1 + y2 + y3 + ... + yr = (n - r)

[where we have taken into account that every hole MUST have a pigeon, and as such reformulated the problem to consider the r holes and (n - r) remaining pidgeons]

the number of solutions to such a problem is:

(n - r + r - 1) C (r - 1)

= (n - 1) C (r - 1)




BUT we have the problem that people are distinguishable, there is nCr ways to choose the r original people in shifting from x to y

once we are at the y-problem, the rest of my solution is fine because the holes ARE distinguishable.



so amended solution : nCr . (n-1)C(r-1)
 

milton

Member
Joined
Oct 30, 2004
Messages
107
Location
Westmead
Gender
Male
HSC
2006

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top