is among - problem

Geoff Canyon gcanyon at inspiredlogic.com
Sat Nov 22 11:04:05 EST 2003

(Anyone not interested in math hit delete right now)

I should have pointed out the formula for this. When choosing y objects
from x possible objects, the number of combinations xCy is

(x!)/(y!)*((x-y)!)

Where x! means x * (x-1) * (x-2) * ... * 2 * 1

In this case that translates to

7!/3!*(7-3)!

7!/3!*4!

The nice thing about this formula is that whichever of the divisors is
larger simple cancels out that portion of the dividend. So:

7!/3!*4!

which is

7*6*5*4*3*2*1/3*2*1*4*3*2*1

becomes simply

7*6*5/3*2*1

3*2 cancels the 6, and you have 7*5 or 35

If you _do_ care about what order the numbers come in, that's
permutations, and the formula is similar but simpler:

xPr = x!/(x-y)!

So if you wanted all the ways you could arrange 3 numbers from 7 that
would be

7!/(7-3)!

or

7!/4!

which is 7*6*5, or 210

regards,

Geoff Canyon
gcanyon at inspiredlogic.com

On Nov 22, 2003, at 12:19 AM, Geoff Canyon wrote:

> To verify that there are 35 solutions, consider that this problem
> translates to: choose three numbers from the set "1,2,3,4,5,6,7" To
> solve that, find 7C3, which is (7*6*5)/(3*2*1) That's 210/6, or 35