is among - problem

Thomas J McGrath III 3mcgrath at adelphia.net
Sat Nov 22 11:24:35 EST 2003


Geoff,

I knew there was a reason I shouldn't have been sleeping in Math class. 
Damn.

I figured from the repeating patterns in the result that there was most 
likely a mathematical solution.
The fact that you know this explicitly really humbles me.

I am going to study this and try and learn something from it.

Thanks,

Tom

On Nov 22, 2003, at 11:04 AM, Geoff Canyon wrote:

> (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
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>

Macintosh PowerBook G-4 OSX 10.3.1, OS 9.2.2, 1.25 GHz, 512MB RAM, Rev 
2.1.2


Advanced Media Group
Thomas J McGrath III 	 ð 2003 ð	3mcgrath at adelphia.net
220 Drake Road, Bethel Park, PA 15102





More information about the Use-livecode mailing list