You have 2 0 balls, numbered 1 − 2 0 .
Can you put them into 3 bins such that no bin contains 3 balls where 2 numbers add up to the third?
(For example 2 , 3 and 5 couldn't go in the same bin since 2 + 3 = 5 )
Image credit : shutterstock
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Using this solution you could put 21 and 22 in the second bin (but you would be stuck with 23), so the highest is at least 22. I'm not sure if you can go higher with another variation, though. A computer program would be handy here.
Log in to reply
Definitely!
Log in to reply
I used a computer program and found 23 to be the highest number of balls. See my solution.
Here's another way to do it: (1, 2, 7, 17, 20), (3, 4, 5, 6, 18, 19), (8, 9, 10, 11, 12, 13, 14, 15, 16)
I wrote the computer program below to investigate some other questions on this thread. There are actually 357 possible (non-symmetrical) ways to place 20 balls in the 3 bins. The maximum number of balls is 23, for a total of 3 possible (non-symmetrical) ways:
Bin 1 : 1, 2, 4, 8, 11, 16, 22; Bin 2 : 3, 5, 6, 7, 19, 21, 23; Bin 3 : 9, 10, 12, 13, 14, 15, 17, 18, 20
Bin 1 : 1, 2, 4, 8, 11, 17, 22; Bin 2 : 3, 5, 6, 7, 19, 21, 23; Bin 3 : 9, 10, 12, 13, 14, 15, 16, 18, 20
Bin 1 : 1, 2, 4, 8, 11, 22; Bin 2 : 3, 5, 6, 7, 19, 21, 23; Bin 3 : 9, 10, 12, 13, 14, 15, 16, 17, 18, 20
(Switching the same set of numbers in two bins would count as a symmetrical solution.)
There are no possible ways to put 24 balls in the 3 bins.
By the way, the code below can also be altered to set bins = 2 to solve Blue and Red Balls (but multiply the answer by 2 to give the symmetrical answer of switching all the blue and red balls completely).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
Interesting... I wonder how much higher you can go beyond 20...
Log in to reply
I edited my solution. I found 23 to be the max.
Whoa... Cool program, David!
(I guess this shows why, when I was trying to do it by hand, it was spiraling out of control)
So, we have,
I wonder how N behaves in general as the number of bins increases...
I'm re-running your program for 4 bins ...
So far I have this... (I have a feeling this will take a while. 🤔 )
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
Log in to reply
Unfortunately, there are too many possibilities for 4 bins for this method to work out well.
Ans: Yes
Wait... Where is 6?
Log in to reply
number 6 has been added to the last group!
Log in to reply
Looks good! Also 15 appears unnecessarily twice.
Problem Loading...
Note Loading...
Set Loading...
Yes.
One way to do it:
Bonus question : What is the highest number of balls for which you can do this?