A Flash Developer Resource Site

Results 1 to 14 of 14

Thread: 21 photos combinations, a maths question

  1. #1
    Moonlight shadow asheep_uk's Avatar
    Join Date
    Dec 2001
    Location
    London
    Posts
    2,010

    21 photos combinations, a maths question

    I'm a little stuck on the maths of this puzzle. Anybody know?

    I have 21 photos and I've given them to a few dozen different people. Each person can order them how they like and use as many or as little as they wish, but may not use the same one twice.

    How many different combinations are there?

  2. #2
    Chaos silverx2's Avatar
    Join Date
    Jul 2002
    Location
    The hospital
    Posts
    1,262
    y number of people
    x number of combinations per person
    u number of combos total
    x * y = u

    some info that is needed is what do you mean may not use the same one twice.

    if you send one person 21 pictures, he has at the most 21 different combinations if he can only use a single picture one time.

    so that would make it

    21*Y=U

    but if you are talking combinations of photos such as, they cant use pictures 1 and 3 together more then once, then it turns into

    21+20+19+18+17+16+15+14+13+12+11+10+9+8+7+6+5+4+3+ 2+1=x (i dont know how to make the correct mathmatical symbol in a forum)
    GhooooostGIrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrl
    https://signup.leagueoflegends.com?ref=4b5493e6c7342
    use the link above if you download league of legends.

  3. #3
    Senior Member ctranter's Avatar
    Join Date
    Aug 2002
    Location
    England
    Posts
    2,557
    You can think of it as a summation series of combinations.

    nCr is the number of ways of choosing r things from a total of n
    so here n=21

    if people can choose as many photos they like up to a total of 21, and as few as 1 photo
    then we have the series

    21C21 + 21C20 + 21C19 ... 21C2 + 21C1 + 21C0

    or

    nCn + nC(n-1) + nC(n-2) ...

    A series like this converges to equal 2^n

    Now because we dont want to count the option where no photos are taken the answer is (2^n) - n

    or in this case = 2,097,131

    Thats my take, its been years since I've done any prob theory so I might be wrong
    Last edited by ctranter; 03-16-2009 at 01:03 PM.

  4. #4
    Senior Member ctranter's Avatar
    Join Date
    Aug 2002
    Location
    England
    Posts
    2,557
    our answers are one different. annoying! i hope its close enough for asheep

    actually I think it should be (2^n) - 1

    as 21C0 is of course 1 not 21

    and hence 2,097,151

    hmmmmm
    Last edited by ctranter; 03-16-2009 at 01:26 PM.

  5. #5
    Chaos silverx2's Avatar
    Join Date
    Jul 2002
    Location
    The hospital
    Posts
    1,262
    more info is required for this question.
    GhooooostGIrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrl
    https://signup.leagueoflegends.com?ref=4b5493e6c7342
    use the link above if you download league of legends.

  6. #6
    Senior Member ctranter's Avatar
    Join Date
    Aug 2002
    Location
    England
    Posts
    2,557
    yeah your adding is at fault jtnw

    21
    210
    1330
    5985
    20349
    54264
    116280
    203490
    293930
    352716
    352716
    293930
    203490
    116280
    54264
    20349
    5985
    1330
    210
    21
    1 +
    --------
    2097151

  7. #7
    Moonlight shadow asheep_uk's Avatar
    Join Date
    Dec 2001
    Location
    London
    Posts
    2,010
    Amazing guys. I had 5,842,587,018,598,200,000,000,000,000 or 441. So yeah, nice one!

    Thanks.

  8. #8
    Moonlight shadow asheep_uk's Avatar
    Join Date
    Dec 2001
    Location
    London
    Posts
    2,010
    Crap, now I need to work out how many combinations there are if you're allowed to use the same photo more than once (so I can compare...)

    That must be quite simple?

  9. #9
    Moonlight shadow asheep_uk's Avatar
    Join Date
    Dec 2001
    Location
    London
    Posts
    2,010
    If I do that I end up with 5,842,587,018,598,200,000,000,000,000 (or 5.84258701838598e+27) Formula being n^r. That seems like a big number though...

  10. #10
    Chaos silverx2's Avatar
    Join Date
    Jul 2002
    Location
    The hospital
    Posts
    1,262
    asheep what do you mean by combinations?
    GhooooostGIrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrl
    https://signup.leagueoflegends.com?ref=4b5493e6c7342
    use the link above if you download league of legends.

  11. #11
    Senior Member ctranter's Avatar
    Join Date
    Aug 2002
    Location
    England
    Posts
    2,557
    I make the summation series to be:



    Which my calculator says evaluates to 538,257,874,439 (5.38257874439x10^11)

  12. #12
    Senior Member ctranter's Avatar
    Join Date
    Aug 2002
    Location
    England
    Posts
    2,557
    My calc didn't give sufficient d.p. so I re-ran it on the pc and got exactly the same

  13. #13
    He has risen! lefteyewilly's Avatar
    Join Date
    Mar 2001
    Posts
    2,597
    you guys are way to fing smart to be hanging around here (except silver of course)

  14. #14
    Moonlight shadow asheep_uk's Avatar
    Join Date
    Dec 2001
    Location
    London
    Posts
    2,010
    I love the use of Flash, brilliant.

    Thanks a million guys, appreciated!

Tags for this Thread

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

HTML5 Development Center