# Balls and holes

Here is a puzzle that I made based of a game i played with my sister. I don't have a solution yet, but if you can figure one out that would be cool!

Each numbered circle represents a hole. you may put ANY amount of balls in each hole, but at least 1 in each. the objective is to end the game with all the balls in the end hole. To get balls to the end, you take ALL the balls from any one hole, and place 1 ball in each hole in front of it in the direction towards the end. If the last ball lands in the "end" hole, you may repeat this process, if it doesn't, the game ends. Note that you must not have an excess of balls at the end hole when moving balls. eg if I have 4 balls in the 8th hole, i cannot move that group of balls, and thus the game would end.

Note by Jayden Cruickshank
7 years ago

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

• Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
• Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
• Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$ ... $$ or $ ... $ to ensure proper formatting.
2 \times 3 $2 \times 3$
2^{34} $2^{34}$
a_{i-1} $a_{i-1}$
\frac{2}{3} $\frac{2}{3}$
\sqrt{2} $\sqrt{2}$
\sum_{i=1}^3 $\sum_{i=1}^3$
\sin \theta $\sin \theta$
\boxed{123} $\boxed{123}$

Sort by:

10,8,6,4,2,5,1,3,1,1 is the only solution. The task of verifying that it works is left to the reader. Meanwhile, I'll wait for a while in case anyone else can figure out why it is the only solution, because the reason is nice.

- 7 years ago

This game reminds me of the traditional Indonesian game Conglak, and I think it's extremely fitting that an Indonesian solved it.

image

Staff - 7 years ago

Yes, I also remember that game, which is why I have some initial ideas. (For example, do you know a 2,0,hole can be cleared, and similarly with 3,1,0,hole? I knew that because the familiarity with this game. :P )

Also, we tend to spell "Congklak" with that first k.

- 7 years ago

We have this game in India too.

- 6 years, 11 months ago

Okay, it has been five days.

I'm using mancala (or as an Indonesian, congklak) terminologies. A few that you might want to keep track of: "stone" is the object used, which the problem calls "balls"; "sowing" means distributing the stones from a hole to the next holes; "home" is the last, large hole that the problem marks as "End"; I'm numbering the holes by the distance from the home (so hole $i$ is $i$ holes away from home; this is the reverse of the one used in the problem).

We will solve a simpler version of $5$ holes. The solution for $10$ stones can be adapted accordingly.

Observe hole $5$. It will never get any new stone, so we can sow from it at most once. But we need at least one stone in that hole. So the only way is to put $5$ stones in it, in which we will sow from it to home. (5,0,0,0,0 -> 0,1,1,1,1)

Now, after sowing $5$ stones, we will have hole $1$ filled. We need to clear it now, otherwise it will get extra stones and the sowing will exceed the home. (0,1,1,1,1 -> 0,1,1,1,0)

Back to the back holes, the ones with large numbers. Now that we have decided that hole $5$ contains $5$ stones, it's time to look to hole $4$. This hole can only receive stones from hole $5$, and only one such stone. Thus this hole must contain $3$ stones initially; less than that and this hole will be stuck with too few stones, more than that and this hole will sow before hole $5$, leaving it empty, and thus will be stuck with the one stone sown from hole $5$. (5,3,0,0,0 -> 0,4,1,1,1 -> 0,4,1,1,0 -> 0,0,2,2,1 -> 0,0,2,2,0)

Back to the front holes, now looking at hole $2$. If we have a configuration of 5,3,0,0,0, we will end up with 0,4,1,1,1 after sowing hole $5$, continued with 0,4,1,1,0 for hole $1$, and then 0,0,2,2,1 for hole $4$, and lastly 0,0,2,2,0 for clearing hole $1$ again. Now hole $2$ has just enough stones, so we need to sow from it: 0,0,2,2,0 -> 0,0,2,0,1 -> 0,0,2,0,0.

Back to the back holes. Hole $3$ receives two stones, from sowing hole $4$ and sowing hole $5$. Thus it needs one more stone to complete a set of three and hence can be sown from. 5,3,1,0,0 -> 0,4,2,1,1 -> 0,4,2,1,0 -> 0,0,3,2,1 -> 0,0,3,2,0 -> 0,0,3,0,1 -> 0,0,3,0,0 -> 0,0,0,1,1 -> 0,0,0,1,0

As we can see above, with a configuration of 5,3,1,0,0, we're stuck with a stone in hole $2$. So we need to add another stone to hole $2$ at the beginning so we can sow from it. Thus we get 5,3,1,1,0, and we can clear all stones.

But hole $1$ still needs some stone. No worries, just fill 1 stone there and sow from it at the beginning.

Thus we get 5,3,1,1,1 as the sole solution for $5$ holes:

• 5,3,1,1,1
• 5,3,1,1,0
• 0,4,2,2,1
• 0,4,2,2,0
• 0,4,2,0,1
• 0,4,2,0,0
• 0,0,3,1,1
• 0,0,3,1,0
• 0,0,0,2,1
• 0,0,0,2,0
• 0,0,0,0,1
• 0,0,0,0,0

Just use the same approach for $10$ holes.

- 7 years ago

Can you summarize the guiding principle(s)? For example, the following could be candidates:
- If hole $i$ has $i$ stones, it needs to be sowed immediately.
- Everytime you sow, at least one hole $i$ must have $i$ stones.
- There must be at least one hole $i$ with $i-1$ stones.

Staff - 7 years ago

I think the only guiding principles are these:

• Always sow the lowest-numbered complete hole (hole with equal number of stones as the hole number).
• Each hole needs at least one stone at the beginning.

Then I work backwards or something, like above. (I'm not sure whether it's forward or backward.)

- 7 years ago

I got the same unique solution, but it came from casework just working down from the hole furthest away and then everything else is forced. I did write up a (long) solution but clicked outside the box and everything was deleted

- 7 years ago

how do you know it is the only solution?

- 7 years ago

My solution above guarantees a determined number of stones go into each hole, thus it's the only solution.

- 7 years ago

Did you based it off of Mancala?

- 7 years ago

yes i did

- 7 years ago

Did you base it off of Mancala?

- 7 years ago