The Guardian asked in a recent Monday puzzle for an optimal strategy to find the smallest and the biggest in a deck of 100 cards.
https://www.theguardian.com/science/2025/may/12/can-you-solve-it-are-you-craftier-than-a-cat-burglar
(It's not the rope riddle)
While my strategy was optimal like the proposed solution, they claimed the formal proof that there can't be any better solution to be "too technical" to be published there. (Pierre de Fermat giggles in his tomb).
The attempts in the comment section didn't impress me either.
Anyway I spent the last hours figuring out an elegant proof for a general formula of any numbers of cards.
But the comment section there is long closed and I thought the local crowd here would like to try their best too ...:)
So here the task again: (copied from above link)
A dealer places one hundred cards on a table. On their face-down sides are the numbers from 1 to 100. The cards are randomly arranged so you have no idea at the beginning which card is which. Your task is to identify the 1 card and the 100 card without turning any of them over.
The only way to learn information about the cards is by comparison. At any stage, you may choose two and ask the dealer which is smaller and which is larger. The dealer always knows. They will never tell you the number on the cards, just which is smaller and which is larger.
It is possible to identify the 1 card after asking the dealer to make 99 comparisons. First, ask them to compare any two cards. Make a note of the lower card, and ask them to compare it with one of the 98 remaining cards. Make a note of the lower card, and ask them to compare it with one of the 97 remaining cards. And so on. The lower card in the 99th comparison must be lower than all other cards, and thus is the 1 card. Likewise you can identify the 100 card after 99 comparisons, making a total of 198 comparisons to find both highest and lowest cards.
Can you find a method to identify the 1 and the 100 cards using fewer comparisons? What’s the optimal strategy? ¹
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
¹) It's quite rich to ask for an optimal strategy without presenting one...
|
---|