newbie49
newbie49
  • Threads: 25
  • Posts: 63
Joined: Oct 26, 2010
March 1st, 2014 at 10:16:23 AM permalink
There are 100 light bulbs: 3 are on, 97 are off. How many ways can this happen? What about 4 on and 96 off.

What is the general formula? The order in which you switch them on DOES NOT matter in my case.
MangoJ
MangoJ
  • Threads: 10
  • Posts: 905
Joined: Mar 12, 2011
March 1st, 2014 at 10:23:34 AM permalink
Google binomial coefficients. For 3 on, 97 off it is 100! / (3! * 97!).
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6274
Joined: Jun 22, 2011
March 1st, 2014 at 10:27:25 AM permalink
Quote: newbie49

There are 100 light bulbs: 3 are on, 97 are off. How many ways can this happen? What about 4 on and 96 off.

What is the general formula? The order in which you switch them on DOES NOT matter in my case.


Get three cards, numbered 1, 2, and 3.
Put card 1 in front of one of the 100 bulbs; there are 100 ways to do this.
Put card 2 in front of one of the remaining 99 bulbs; for each of the 100 ways to place card 1, there are 99 ways to do this.
Put card 3 in front of one of the remaining 98 bulbs; for each of the (100 x 99) ways to place cards 1 and 2, there are 98 ways to do this.
However, since order does not matter, each set of 3 bulbs has 6 different ways to have cards (there are 3 numbers to use for the "first" bulb; for each of these, there are 2 numbers remaining for the "second" bulb; there is 1 card remaining for the "third" bulb).

The number of combinations = (100 x 99 x 98) / (3 x 2 x 1).

The general formula of choosing K items out of N "without order" is N! / (K! x (N-K)!).
In your case, N = 100 and K = 3.
Note that 100 x 99 x 98 = 100! / (100 - 3)!.

If order does matter, these are referred to as "permutations" (if it does not, they are "combinations"), and the formula is N! / (N-K)!.
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
March 1st, 2014 at 10:34:38 AM permalink
100*99*98/3*2*1 for 3
100*99*98*97/4*3*2*1 for 4

nCr (n choose r) or C(n,r)
http://www.mathsisfun.com/combinatorics/combinations-permutations.html
n! / r! * (n-r)!
where n is the number of things to choose from, and we choose r of them
(No repetition, order doesn't matter)
also you need to know what ! means in math

see if you agree with me

math is fun
Sally

so is Doodling


are the results about what you thought?
there also also combination generator programs that can print out all the combos with index numbers
or just the index ranges you specify. cool having computers to help with math.
index1 would be 1,2,3
161700 would be 98,99,100
10000 = 28,36,56

another method without using factorials (100!) is simply expanding
(x+1)^100 (this is the binomial coefficients method)
you may want to start small to see how this is done

say you have 2 light bulbs
(x+1)^2 or just (x+1)*(x+1)
you know that there is 1 way to have 0 of them on
1 way to have both on and 2 ways to have just 1 one
this should look like this
x^2+2x+1
(or 1x^2+2x^1+1x^0)
neat huh!
http://www.wolframalpha.com/input/?i=%28x%2B1%29%5E2

now for the (x+1)^100
try it!
the answer is +161700 x^3. (This would take some time to do long hand.)
and that happens to be the same as having 97 light bulbs on and 3 off!
+161700 x^97
binomial coefficients
Sally
I Heart Vi Hart
98Clubs
98Clubs
  • Threads: 52
  • Posts: 1728
Joined: Jun 3, 2010
March 1st, 2014 at 1:21:15 PM permalink
The formula can be expressed as a Calculator function known as nCr. Casio brands have this function, don't know about others.

The first example is 100C3 that is 100=n Combinations of 3=r. the answer is 161,700 ways
As others have pointed out 100*99*98/(3*2*1) is the written formula. The denominator is usually written as 3! (3-factorial).
Some people need to reimagine their thinking.
wudged
wudged
  • Threads: 2
  • Posts: 998
Joined: Aug 7, 2013
March 1st, 2014 at 2:20:11 PM permalink
You can also type "100 choose 3" into Google.
  • Jump to: