Here is a algorithms/riddle i just solved that was kind of fun. So heres the setup. You have a circular table that spins with four evenly spaces opaque boxes on it around the outside. In each box is a coin that is either heads or tails. You get a maximum of 5 rounds, between each round you are blindfolded and the table ia spun randomly. During each round you can pick a box to open, look, the pick a second box to open and look. You can then flip none, any, or all, of the coins with open boxes. Then the boxes are closed before the next round. If at any point all four coins are the same then you win the game.

You must come up with a strategy that **guarantees** in 5 rounds or less that all 4 coins will be the same.

Tommorow i will take a picture of the flow chart i came up with the answer. In the meantime please give hints, answer, or thoughts in the comments but be sure to CW them. I will reply tomorrow with a picture of the answer and CW that as well. Good luck!

PS for a slightly harder version all the same rules apply except you need to pick both boxes to open simultaneously rather than one after thr other. With this harder version it is still possible in 5 rounds or less.

#riddle #algorithm #computerscience #programming #algorithms #puzzle

Right it can be any 2 coins but you have no idea what coins were which in the roevious round since the table is spun

Trinsec @Qoto@trinsec@qoto.org@freemo Oh, and it can be any 2 coins, not any nearest to you or something? You just don't know which ones were north south etc before?