This was trickier than it looked. I have a feeling that there should be a quicker way to find the answer than the list of cases I worked through.
Note: I interpret "two of which are factors of the third" to mean that two of the numbers divide the third, and that either of those two factors might be 1.
If "factor" cannot be 1, then 2,4,8 and 2,3,6 remain as two options, but they cannot be a solution, because all of the people should be able to know their number at the first sight. Conclusion: "factor" can be 1.
Mr.Hehe sees 2 and 3 so he knows he has 6 before all. The others see 2,6 and 3,6 so they don't know their number because they both think they ...
It is not possible to do this in 12 steps. In fact, a simple argument shows that at least 20 steps are necessary:
Tiles 1 and 8 need to be swapped. They are however a distance of 3 moves apart, so each tile needs to be moved at least 3 times. Similarly, tiles 2 and 7 also each need 3 moves to reach their goal locations. So these 4 tiles together need at ...
Since we are talking about multiplication (products grow really fast), and our data gathering is relatively cheap, it stands to reason that the best strategy is to
I had this idea yesterday, but it took me this long to get through the final annoying special case. However, I'm pretty convinced now that
This is going to be a longish read because of the ...
What combinations of numbers are possible?
From this list of possibilities, we need to find one where one person can know what their number is by seeing two of the other numbers. Here are the possible numbers a person could see others having (lowest number first), and the possible numbers that the person could be.
Now we have 3 possibilities for two ...
I took a slightly different approach to Jaap Scherphuis:
The two smaller numbers are factors of the largest number, and all 3 numbers are different. This means that the largest number cannot be prime - ruling out 1,2,3,5,7, and leaving us with 4, 6, 8, and 9.
There are 32 possible pairs of factors of the numbers 4, 6, 8, and 9, but only 8 of these ...
Since Hehe knows his own number by watching the others, one can test the different factors that could lead to it (watched hats, with ascending sort -> possible hats Hehe could have):
So we only keep some of these entries:
And just consider:
Hehe knows his number even before the other ones talk. This means: a-priori he knows, with no ambiguity, the number ...
Looks like we have
mazes we need to solve simultaneously:
These are the difficult cases, so all the other configurations (that are solvable in the first place) should be automatically solved if we can get all of these.
So we need a move sequence that has
Is it optimal? No idea. I'm going to need some more coffee if I'm to ...