|
-
Aug 28th, 2004, 11:41 AM
#1
Thread Starter
Fanatic Member
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
-
Aug 28th, 2004, 03:57 PM
#2
Not NoteMe
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. 
-
Aug 28th, 2004, 04:00 PM
#3
Thread Starter
Fanatic Member
Yep. Permutations. No duplicates. Preferably no duplicates to begin with. I think it is 60^10.
-
Aug 29th, 2004, 07:28 PM
#4
Fanatic Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|