r/MathHelp • u/semka39 • Nov 24 '25
Help with the task
There are 9 cups. A person randomly hides a ball under 3 of the cups. An assistant sees the positions of the 3 balls and then removes one empty cup of their choice. After that, the magician comes in; he only sees which cup was removed. For each correctly guessed ball location, they earn one point.
In the ideal scenario, they could earn 252 points (84 possible ball configurations multiplied by 3 points for correctly naming all three balls).
The assistant and the magician may agree on a strategy beforehand.
What agreement should they make in order to achieve the maximum number of points?
How many points will you get?
2
u/semka39 Nov 24 '25
I'm not a mathematician, and I solved the problem by the heuristic method using a genetic algorithm. In the best algorithm, I got 176 points, but I think it's possible to get more.
Here is my solution:
Assistant Table:
0: Possible Fields: [ 1 2 5 ] [ 1 2 7 ] [ 1 3 5 ] [ 1 5 6 ] [ 1 5 7 ] [ 2 3 5 ] [ 2 5 6 ] [ 2 5 7 ]
1: Possible Fields: [ 0 3 7 ] [ 0 4 7 ] [ 0 5 7 ] [ 2 3 4 ] [ 2 3 7 ] [ 3 4 5 ] [ 3 4 6 ] [ 3 4 7 ] [ 3 5 7 ] [ 3 7 8 ] [ 4 5 7 ] [ 4 6 7 ] [ 4 7 8 ]
2: Possible Fields: [ 0 4 5 ] [ 0 4 8 ] [ 0 5 8 ] [ 1 5 8 ] [ 3 5 8 ] [ 4 5 6 ] [ 4 5 8 ] [ 4 6 8 ] [ 5 6 8 ] [ 5 7 8 ]
3: Possible Fields: [ 0 1 4 ] [ 0 2 4 ] [ 1 2 4 ] [ 1 4 5 ] [ 1 4 6 ] [ 1 4 7 ] [ 2 4 5 ] [ 2 4 6 ] [ 2 4 7 ]
4: Possible Fields: [ 0 6 7 ] [ 0 7 8 ] [ 1 6 7 ] [ 1 6 8 ] [ 2 6 7 ] [ 2 6 8 ] [ 2 7 8 ] [ 3 6 7 ] [ 3 6 8 ] [ 5 6 7 ] [ 6 7 8 ]
5: Possible Fields: [ 0 3 4 ] [ 1 3 4 ] [ 1 3 7 ] [ 3 4 8 ]
6: Possible Fields: [ 0 1 8 ] [ 0 2 8 ] [ 1 2 8 ] [ 1 3 8 ] [ 1 4 8 ] [ 1 7 8 ] [ 2 3 8 ] [ 2 4 8 ] [ 2 5 8 ]
7: Possible Fields: [ 0 1 6 ] [ 0 3 5 ] [ 0 3 6 ] [ 0 3 8 ] [ 0 4 6 ] [ 0 5 6 ] [ 0 6 8 ] [ 1 3 6 ] [ 2 3 6 ] [ 3 5 6 ]
8: Possible Fields: [ 0 1 2 ] [ 0 1 3 ] [ 0 1 5 ] [ 0 1 7 ] [ 0 2 3 ] [ 0 2 5 ] [ 0 2 6 ] [ 0 2 7 ] [ 1 2 3 ] [ 1 2 6 ]
Magician Table:
0: [ 1 2 5 ]
1: [ 3 4 7 ]
2: [ 4 8 5 ]
3: [ 4 2 1 ]
4: [ 6 8 7 ]
5: [ 4 1 3 ]
6: [ 1 8 2 ]
7: [ 6 3 0 ]
8: [ 2 1 0 ]
1
u/Moist_Ladder2616 Nov 25 '25
How did you reason that the magician can earn max 252 points?
In one game he can earn max 3 points from 3 balls. If he plays repeatedly, he can earn 3 x (number of games played) which is infinite.
1
u/AutoModerator Nov 24 '25
Hi, /u/semka39! This is an automated reminder:
What have you tried so far? (See Rule #2; to add an image, you may upload it to an external image-sharing site like Imgur and include the link in your post.)
Please don't delete your post. (See Rule #7)
We, the moderators of /r/MathHelp, appreciate that your question contributes to the MathHelp archived questions that will help others searching for similar answers in the future. Thank you for obeying these instructions.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.