Results 1 to 4 of 4

Thread: Formula/Patterns

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2003
    Posts
    114

    Formula/Patterns

    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?
    I can do all things with VB.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Apr 2003
    Posts
    114
    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.
    I can do all things with VB.

  3. #3
    Fanatic Member sql_lall's Avatar
    Join Date
    Jul 2002
    Location
    Up Above (i.e. AUS)
    Posts
    571

    Talking Hi

    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.
    sql_lall

  4. #4
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860
    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.
    Don't pay attention to this signature, it's contradictory.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width