Results 1 to 4 of 4

Thread: Losing my marbles

  1. #1

    Thread Starter
    Fanatic Member WorkHorse's Avatar
    Join Date
    Jul 2002
    Location
    Where you live.
    Posts
    591

    Losing my marbles

    There are 10 red marbles, 20 blue marbles, and 30 green marbles. 10 people, in turn, choose one marble. Each person can choose a total of 1 red, 2 blue, 3 green. Each chosen marble is placed in a continous row to create a row of all 60 marbles. How many different rows can be created? Can you write a program that would print out each different row? For example:

    rrrrrrrrrrbbbbbbbbbbbbbbbbbbbbgggggggggggggggggggggggggggggg
    rrrrrrrrrrbbbbbbbbbbbbbbbbbbbgbggggggggggggggggggggggggggggg
    rrrrrrrrrrbbbbbbbbbbbbbbbbbbbggbgggggggggggggggggggggggggggg

  2. #2
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Not sure if i understand this correctly, but isn't it just permutations of the string, "rrrrrrrrrrbbbbbbbbbbbbbbbbbbbbgggggggggggggggggggggggggggggg"
    (with duplicates removed)? Or is not producing the duplicates in the first place the point of the problem?
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  3. #3

    Thread Starter
    Fanatic Member WorkHorse's Avatar
    Join Date
    Jul 2002
    Location
    Where you live.
    Posts
    591
    Yep. Permutations. No duplicates. Preferably no duplicates to begin with. I think it is 60^10.

  4. #4
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860
    I don't think your outputted strings match the rules of the problem. They obviously don't follow "1 red, 2 blue, 3 green"

    In fact, it looks like you just have subgroups within a group.
    Basically, you have 10 groups of 6 marbles. Each group of marbles can be X different permutations.
    X^10 is the answer.

    The red marble is going to multiply the final by 6...
    So how many greens can I do...4+3+2+1 = (4+1)/2*4 = 2.5*4 = 10
    10*6 = 60

    60^10 = answer
    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