PDA

Click to See Complete Forum and Search --> : Formula/Patterns


ThomasJones
May 23rd, 2003, 05:32 PM
Hello,

I've been trying to figure out this simple problem but I'm just missing something.

Here it is:
I have 4 lights and at any given point half the lights will be on and the other half will be off. I have figured out that there are 6 different combinations where this is possible.

Ok, now move to 6 lights and the same is true, at any given point half the lights will be on and half will be off. I have figured out that there are 20 combinations possible.

With 8 lights there are 35 combinations possible.


Does anyone see a pattern or forumla I can apply?

ThomasJones
May 23rd, 2003, 05:55 PM
Perhaps 8 lights will produce 70 combinations using
8! / [4! * (8-4)!]

with 6
6! / [3! * (6-3)!]

C=X! / [(X/2)! * (X-(X/2))!]

I think I may have figured it out.

sql_lall
May 24th, 2003, 06:04 AM
This is a combinatorics question:
"2N lights, N of them are on, how many ways is this possible."

Basically, you are "choosing" N of the lamps to be on, and seeing how many ways this can happen. As the order doesn't matter, you can use Combinations (not Permutations)

Hence, the thing you are looking for is 2N - choose - N, or 2NCN
Using the combinations formula, this is:
(2N)! / (N!*N!)
Which is what you have.

alkatran
May 25th, 2003, 09:14 PM
As said above:

N = Total lights
R = number of lights you can turn on

the formula is: n! / (n-r)!*r!


That's the formula for a combination.

Iif you were doing a permutation (you might have the option to make them red or green, making the ORDER important) you would use this:

n! / (n-r)!

The only difference is the *r! in combination. After that it starts to get all muddled and stuff... like if you have 2 green chairs and 3 blue ones... order is only 'half' important.