people are at the beach, each holding a coin in one hand. have one in their right hand, and have one in their left hand, but you don't know which is which.
Your task is to split the people into two groups such that the same number in each group has a coin in their right hand, and you can do this in two steps:
What is ?
Clarification: You have no idea which of the people has the stone in their right hand. You split the people into two groups of size and , (with no control over how many right handed or left handed coin holders are in each group) and then you ask people in the first group to switch (not knowing which hand holds the coin for any of them), and to switch in the other group, again not knowing which of the people you ask might have a coin in their left or right hand.
If you think this is impossible to do, provide -1 as your answer.
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.
The solution is to separate them into groups of size 5 8 and 2 5 and tell all the people in the group of 2 5 to switch the coin to their other hand.
After separating them, lets say there are i people in the group of 5 8 that have a coin in their right hand. This means there are 2 5 − i people in the group of 2 5 who have it in their right hand. So once you tell the people in the group of 2 5 to switch hands, there are i people in each group that have the coin in their right hand.
So, in the end, you don't know how many will have a coin in their right hand, but you know there are an equal number in each group.
2 5 + 2 5 = 5 0
Now, to explain why this is the only solution...
Here is my start....
================================================================
Lets suppose you ask n people to go in one group, then there are 8 3 − n in the other.
Let r be the number of "people with coins in their right hand" that are in the group of size n . So, the group of size 8 3 − n has 2 5 − r "righties".
So, now you have:
Gotta run, I will plan to finish this off in a bit...
==================================================================
Stay tuned...