Hootsgo
Published on Hootsgo (https://www.hootsgo.org)


How Many Balls Are in the Bag?

Billiard Balls

Thanks to Lawrence Lee for suggesting this puzzle, which asks you to figure out the number of balls in the bag, based on certain restrictions.

I have a bag of balls. Each ball has a number on it that can be from 1 to 99. Not all those numbers are used, and there are fewer than 99 balls. No number may be used more than once. I have selected the numbers so that if you pick any three balls at random, the sum of the numbers on them will be divisible by 6.

I can’t have 99 balls in the bag, because some of the combinations will not be divisible by 6. For example, 1 + 2 + 4 = 7. So if I include 1 and 2, I cannot include 4. Or, for example, 5 + 23 + 30 = 58. Since 58 is not divisible by 6, I cannot have all three of those numbers in the bag. I have to pick some combination of balls so that the sum of any three will be divisible by 6.

What is the largest number of balls I can have in the bag?


This content has been re-published with permission from SEED. Copyright © 2025 Schlumberger Excellence in Education Development (SEED), Inc.

Course: 

  • Math [1]
Result/Solution(s)

Billiard BallsLet’s say the 1st ball picked is 1 and the 2nd ball picked is 2. The 3rd ball may then be 3 or 9 but cannot be 4, 5, 7, or 8. This means I cannot have all 99 balls in the bag, as the sums of some of the combinations are not divisible by 6. What combinations will guarantee that regardless of what the first 2 balls are, the 3rd ball will always form the right combination?

Let the numbers of the 3 balls picked be A, B, and C. This means

T = A + B + C is divisible by 6.

A solution would be for A, B, and C each to be divisible by 6. That is

T = 6I + 6J + 6K = 6 (I + J + K)

where I, J, and K are 3 different integers. These integers may range from 1 through 16, with 16 being the largest number we can use because 6 x 16 = 96, the largest number from 1 through 99 that is divisible by 6. In this case, the balls are numbered as

1 x 6, 2 x 6, 3 x 6, 4 x 6, 5 x 6, 6 x 6, 7 x 6, 8 x 6, 9 x 6, 10 x 6, 11 x 6, 12 x 6, 13 x 6, 14 x 6, 15 x 6, 16 x 6

which equals

6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96

In this case there are 16 balls in total.

What if each ball is numbered with 1 more than what would be divisible by 6? That is

T = (6I + 1) + (6J + 1) + (6K + 1) = 6 (I + J + K) + 3

This is not divisible by 6.

What if each ball is numbered with 2 more than what would be divisible by 6? That is

T = (6I + 2) + (6J + 2) + (6K + 2) = 6 (I + J + K) + 6

This is divisible by 6.

As before, I, J, and K are 3 different integers. These integers may range from 0 through 16. We can start from 0 this time because the smallest number on any ball will then be 2. In this case, the balls are numbered as

0 x 6 + 2, 1 x 6 + 2, 3 x 6 + 2, 4 x 6 + 2 . . . 15 x 6 + 2, 16 x 6 + 2

which equals

2, 8, 14, 20, 26, 32, 38, 44, 50, 56, 62, 68, 74, 80, 86, 92, 98

In this case there are 17 balls in total.

Now what if each ball is numbered with 2 less than what would be divisible by 6? That is

T = (6I – 2) + (6J – 2) + (6K – 2) = 6 (I + J + K) – 6

This is also divisible by 6.

The I, J, and K in this case may range from 1 through 16. In this case, the balls are numbered as

1 x 6 - 2, 2 x 6 - 2, 3 x 6 - 2, 4 x 6 - 2 . . . 15 x 6 - 2, 16 x 6 - 2

which equals

4, 10, 16, 22, 28, 34, 40, 46, 52, 58, 64, 70, 76, 82, 88, 94

In this case there are again 16 balls.

So the maximum number of balls we can have in the bag is 17.

  • combination problems [2]
Copyright © 2018 Hootsgo. All Rights Reserved. Hootsgo is a registered 501 (c) (3) non-profit organization.
Donated by Dev2Source I.T. Services Ltd.

Source URL: https://www.hootsgo.org/?q=how-many-balls-are-bag&qt-quicktabs=2

Links
[1] https://www.hootsgo.org/?q=taxonomy/term/50
[2] https://www.hootsgo.org/?q=tags/combination-problems