Logic Riddles for Chess Players (7)

by Arne Kaehler
8/17/2020 – The last logic riddle was really hard, and only a few readers were able to calculate all outcomes and find the correct solution. The riddle today is easier. You have to figure out how to adjust the odds in your favour. Keep in mind, you might not be able to solve the puzzle fully, but maybe your result is good enough to save the life of a grandmaster.

Power Play 27 and 28 - The King's Gambit and Tactic Toolbox Power Play 27 and 28 - The King's Gambit and Tactic Toolbox

Glorious sacrifices, unexpected tactics and checkmating attacks. The King’s Gambit is one of the oldest and most romantic openings in the game of chess. These DVDs contain all you need to know to play the King's Gambit.

More...

The two urns

Unfortunately, a young grandmaster won a chess game against a king, with playing the King's Gambit. Not only did he mate him with a pawn, the people kiebitzing began laughing at the king. The chess player got sentenced to death by the king, right after the check-mate. Four strong guards pushed the young grandmaster into a prison cell.

The king entered the prison, carrying a sac with chess pieces. While talking to the grandmaster, he opened the sac and took out one piece after another, until only the pawns were left in the sac.

"You are quite masterful with the pieces, young grandmaster," the king said with a smirk on his face. "Especially with the pawns it seems. Let's see how much luck they bring you now, because I shall grant you one last chance to get out of here alive!" With this, he made a quick gesture and two big urns were carried in.

"Although you embarrassed me in front of my friends, I still try to be a fair King. I offer you a last chance by playing a different game than chess with me," the king said and dropped all the chess pieces out of his bag onto the floor of the cell.

"Pick up all 16 pawns and put them into the urns as you please. However, at the end both urns have to have pawns," the king said with a smile on his face, while touching both of the containers.

"After that is done, I will blindfold you, mix the containers around and you will choose one of them." The king's smile grew bigger.

"You will then pick one single pawn out of the chosen urn. If it is a white pawn, you stay alive and leave my kingdom. If you pick a black pawn, your chess career ends here."

The king continued: "I am a fair king after all. Your chances are fifty/fifty. Let us see how fate decides".

How does the grandmaster divide the pawns so that he has the greatest probability of picking a white pawn?

The king believes he is fair with giving him a 50/50 chance, but with some thinking, the grandmaster's odds to get out of the cell alive can be adjusted.

The solution of the fair fair logic riddle

If you are like me, you have no clue what the last riddle was about and how to even approach solving it. But once you understand the very basics of combinatorics, things can get very interesting. So stay with me and maybe you learn something new.

One of many helpful tutorials on YouTube about combinations and permutations

This was probably the hardest puzzle of our logic riddle series so far, and it is time to roll up all the odds and RTP's for the four games (I use ":" for "division" and "x" for "multiply"):

The ten white pawns (sorted without repetition)

Everyone who posted a comment was pretty confident, that this game was not the best to win some money over time.

The approach to solve these kinds of puzzles is to use combinatorics. 

Think about a normal poker deck which is made of 52 cards (n = 52) and the five cards in hand are described as a 5-combination (k = 5). While the cards in your hand are all distinct and the order is irrelevant, you can get 2,598,960 combinations like this. Any randomly drawn hand has a 1 / 2,598,960 chance to be picked.

Let's apply this knowledge of n and k to the games.

From the basic set of n different elements, we pick k amount of elements. Elements can only be picked once and the order of the elements is relevant.

From ten (=n) spheres, numbered from 0-9, two spheres (=k) are chosen in a particular order. With those two spheres, you can generate a number from 00 to 99, with the exceptions of 00, 11, 22, 33, 44, 55, 66, 77, 88 and of course 99. We can calculate the amount of options now. The formula is

n! : (n-k)! (the "!" stands for factorial)

In our example we have:

(1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10) : (1 x 2 x 3 x 4 x 5 x 6 x 7 x 8) = 90

n is 10 and k is 4, leading to 5040 different outcomes.

Since the winning sum is 4000, the RTP is only 79%, thus one of the worst games to make a quick ducat with.

Black or White (sorted with repetition)

From the basic set of n different elements, we pick k amount of elements. Elements can be picked twice and the order is irrelevant.

In this example from two different containers with ten (=n) spheres each to choose from which are numbered from 0-9, and where one sphere (k=2) is chosen in no particular order.

In our example we have to calculate the amount of options with 10 (=n) spheres, numbered from 0 to 9, where one sphere (k=2) is chosen in order. Those two spheres generate a number between 00 and 99 without any exception.

The calculation requires the formula

n to the power of k which is 10(n) to the power of 2(k) = 100.

The other part is, Black and White are the two different colours on the spinning wheel (n=2) which is turned ten times (k=10), leading to a total of 1024 different results, where only one result leads to the perfect outcome.

The RTP is around 97% and very similar to the normal roulette games, but the Black king will still win some money in the end.

The Dice (Unsorted with repetition)

This is actually game four, but for obvious reasons we take a look at it before game number three.

From the basic set of n different elements, we pick k amount of elements. Elements can be picked multiple times and the order is irrelevant.

In this example from two different containers with ten (=n) spheres each to choose from which are numbered from 0-9, one sphere (k=2) is picked. With those two spheres, you can generate a number from 00 to 99 without exception, though numbers like 32 and 23 are counted as similar numbers, due to the same digits.

To calculate the amount of possible options, this formula has to be used:

(n+k-1)!:[k!(n-1)!] 

11!:(2!x9!) = 55

With n =6 and k = 4 we can reach 9!:(4!x5!) = 126 possible options by throwing the dice. But since the Black King only pays x 100 the winning amount, we end up with roughly 79%, just like the Black or White game.

Numbers of fortune (unsorted without repetition)

From the basic set of n different elements, we pick k amount of elements without being able to choose two similar Elements with the order being irrelevant.

In this example from one container with ten (=n) spheres which are numbered from 0-9, two spheres (=k) are picked.

With those two spheres, you can generate a number from 00 to 99, except for 00, 11, 22, 33, 44, 55, 66, 77, 88, and 99, and where numbers like 32 and 23 count as similar numbers, because both digits are similar.

The formula we need to calculate the options is: n! : [k!(n-k)!]

(1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10) : [(1 x 2) x (1 x 2 x 3 x 4 x 5 x 6 x 7 x 8)] = 45

With the "Numbers of fortune" you have 10! : (4! x 6!) = 210 options.

The Black king made a big mistake! He has to pay the 250 x of the entry with an RTP of 119%.

Everybody who plays this game of "luck" long enough, will probably leave the fair fair with some ducats in their pockets.

These were a lot of formulas and numbers, and I hope I didn't make a mistake in writing them all down.

Links:




Arne Kaehler, a creative thinker who is passionate about board games in general was born in Hamburg and learned how to play chess at a very young age. Through teaching chess to youth teams and creating chess content on YouTube, Arne was able to extend this passion onto others and has even made an online chess course for anyone who wants to learn how to play this game. Currently, Arne blogs for the English news page of ChessBase and focuses on creating promotional and entertaining articles.
Discussion and Feedback Join the public discussion or submit your feedback to the editors


Discuss

Rules for reader comments

 
 

Not registered yet? Register

lajosarpad lajosarpad 8/22/2020 01:57
@JoshuaVGreen agreed, we are making quite a good case for a white pawn being put into an urn and all others into another urn, if the young GM is still going to choose a situation with less chance, then we are innocent :)
JoshuaVGreen JoshuaVGreen 8/21/2020 01:18
@lajosarpad, one of my professors once noted that a proof is an "act of persuasion" and that there are ways to persuade people that have nothing to do with logic. :P

At any rate, there's nothing wrong with "manually" checking every case, and between our two analyses (plus anything else you and others came up with that wasn't posted), I think we have a pretty compelling case here. Let's hope the young grandmaster figured this all out and prevailed.
lajosarpad lajosarpad 8/21/2020 12:58
@JoshuaVGreen

Don't get me wrong. I find your arguments understandable and convincing. In fact, I thought in a similar fashion before reading your arguments, but the reason which prompted me for an implementation was that factual proof, which sheds any doubts seemed to be more difficult than implementing a proving algorithm. It's a generative way of proving a claim in a finite problem-space. I would very much welcome a more elegant, deductive proof and due to the proven truthness of the hypothesis, I'm sure both you and I could come up with one. I just found it to be less easy than implementing it and was too lazy to think it through in a more formal manner.
lajosarpad lajosarpad 8/21/2020 12:54
@JoshuaVGreen

"the grandmaster's probability of winning will be ("probability of winning with good urn" + "probability of winning with bad urn")/2"

That's true.

"I thought I demonstrated that that particular division maximized BOTH terms in the numerator, hence maximized the probability."

You said so, but I was not convinced. Yes, you are right that one must imbalance the pawns (balanced means the same amount of pawns in both urns, which is not the best). But you can imbalance the pawns in many ways. For instance, you arguments would not convince me that 3w5b,5w3b is necessarily worse than 1w0b,7w8b. Intuitively it seems to be so and I had the same hypothesis, but unless we show a formula, a function which clearly proves our point, or demonstrate with a proving method, such as induction or other generative patterns used in our demonstration, the point remains a strong hypothesis. During my work as a mathematician and programmer I have seen many examples when very plausible, but unproven hypotheses turned out to be false. In this case it happened to be true.
JoshuaVGreen JoshuaVGreen 8/20/2020 01:02
@lajosarpad, the grandmaster's probability of winning will be ("probability of winning with good urn" + "probability of winning with bad urn")/2. I thought I demonstrated that that particular division maximized BOTH terms in the numerator, hence maximized the probability. (I did NOT show that no other division is just as good.) Of course, checking all the possibilities directly (as you have) is good for confirmation.
lajosarpad lajosarpad 8/20/2020 12:27
@JoshuaVGreen your reasoning proves that a white pawn in the "good" urn, with all other pawns in the bad urn has a higher chance of reward than the even match. However, I do not see how your reasoning proves that the solution you propose is better than all other possible distributions. In fact, while thinking intuitively I reached the same reasoning, but was not satisfied with it, because even though I was sure this is the solution, I wanted to make a hard proof of it, so I have programmatically implemented an algorithm which yields the solution. You can find it in the link I have provided earlier. I will paste it again here:

https://jsfiddle.net/skh4cpLn/4/
JoshuaVGreen JoshuaVGreen 8/19/2020 05:55
As several people have posted the answer, I might as well give my proof.

If one urn has the same number of White pawns as Black pawns, then so will the other, and the grandmaster's probability of prevailing will be 50% regardless of which urn is chosen. If he is to improve on those odds, he must imbalance the pawns. In such a scenario, one urn will contain more White pawns than Black pawns, and the other will contain more Black pawns than White pawns. Call the former the "good urn" and the latter the "bad urn."

Now consider what happens if the grandmaster places a single White pawn in one urn (the good urn) while leaving the rest of the pawns in the other urn (the bad urn). The probability of winning if the good urn is chosen is clearly 100%, the theoretical maximum. Moreover, the probability of winning if the bad urn is chosen is 7/15, also the maximum over all possible bad urns. Thus, of the imbalanced divisions this must be optimal, and it yields a winning probability of 11/15, solidly beating the even divisions.
melvich melvich 8/19/2020 02:44
Put 1 white pawn in one urn and the other 15 in the second urn. So you have a 50% chance of a safe choice and if you choose the second urn you still have a good chance to select a white pawn.So you have about 73% chance of surviving.
Michael Jones Michael Jones 8/18/2020 10:01
Place one white pawn in one urn and all the other pawns of both colours in the other urn. You then have a 1/2 chance of picking the urn which only has a white pawn in it, and if you do, a certainty of picking that pawn. Also a 1/2 chance of picking the urn which has the other 15 pawns in, and a 7/15 chance of picking a white one thereafter. Overall probability of picking a white pawn = (1/2 * 1) + (1/2 * 7/15) = 1/2 + 7/30 = 22/30 = 11/15.
JoshuaVGreen JoshuaVGreen 8/18/2020 07:37
If the young grandmaster divides the pawns optimally and manages to stay alive, the king will have to admit that he urn-ed it.
JoshuaVGreen JoshuaVGreen 8/18/2020 01:44
@lajosarpad, that's what I got -- the precise value being 11/15 = 0.733333... -- but it requires being able to put exactly one pawn in one of the urns. The proof that this is optimal is surprisingly simple, but I'll save it for later.
Zurubang Zurubang 8/18/2020 01:05
Hey riddle masters, thank you very much for your participation, calculations, ideas, comments and very respectful writing. The dice riddle has been debunked very well by you. And about this riddle, "both urns have to have pawns" was meant in a way, that all 16 pawns have to be placed in both urns. So of course you were also correct with pointing this out. Thank you again and see you for the next puzzle soon!
lajosarpad lajosarpad 8/18/2020 11:55
@Zurubang my solution is correct if and only if we do not take "However, at the end both urns have to have pawns" literally, because, if we have to have at least two pawns in both urns because of the plurality used in the specification, then I need to add an extra validation to the solution.
lajosarpad lajosarpad 8/18/2020 11:53
@brian8871 & @JoshuaVGreen, it's actually a chance of 73.33%

Take a look at this proof: https://jsfiddle.net/skh4cpLn/4/

The code defines a set called items of 16 elements, the first 8 are of value -1, meaning "Black" and the last 8 are 1, meaning "White". This way, we get a binary number of 16 bits (each position is a "digit"), where 0 means the first urn and 1 means the second urn. We just simply increment this number of 16 digits while we can and compute the probability in each iteraton. I collected the best results into a set called "best". As you can see, there are 16 solutions, because there are 8 white pawns and there is a total of 16 ways to put one white pawn in one of the urns and all other pawns in the other urn. The computed chance is shown besides the solutions.
MadMox MadMox 8/18/2020 11:16
Once again about The Dice, with more details. We can break the 1296 possible outcomes of rolling 4 dice (order is relevant) in the possible outcomes of the game (order is irrelevant) in this way:
6 results with probability 1/1296 [Ex. {1111}]
30 results with probability 1/324 [Ex. {1112}]
15 results with probability 1/216 [Ex. {1122}]
60 results with probability 1/108 [Ex. {1123}]
15 results with probability 1/54 [Ex. {1234}]
Check: 6/1296 + 30/324 + 15/216 + 60/108 + 15/54 = 1. If I bet on a result with 4 different figures (which I should definitely do if I'm not daft), my probability of winning is 1/54. The expected value of my bet is 495*1/54 - 5*53/54 = 115/27, that is on the long run I expect to net 0.852 ducats for each one invested. No sane King would ever offer such a game.
mkkuhner mkkuhner 8/18/2020 08:47
Your analysis for The Dice is a correct solution to the wrong problem. You solved the problem "What is the chance that the dice will match a random string of four numbers, order not counted?" However, nothing in the game rules forces the player to choose a *random* string of four numbers.

The player's worst case is to choose four numbers all the same: (1111) for example. This is quite improbable because if you list all of the possible rolls, this one only appears once; its chance is (1/6) ^ 4 = 0.00077.

The player's best case is to choose four numbers all different. I solved this by taking the answer I just gave and multiplying by the number of distinct (ordered) rolls that contain four specific different digits in any order, and got an expected RTA of 1.851.

So this one, unlike the others, is a game of skill: a clever player can beat the house.
wethalon wethalon 8/17/2020 11:40
The urn riddle is a nice example of Simpson's paradox (https://en.wikipedia.org/wiki/Simpson%27s_paradox), of which the essence is that the average of two proportions, each from a subsample, can be very different from the overall proportion in the combined sample.
JoshuaVGreen JoshuaVGreen 8/17/2020 10:59
@brian8871, I agree. Assuming the expected answer to my request for clarification below, I get an optimal strategy yielding a winning probability of 11/15, not too shabby under the circumstances.
Erdmundr Erdmundr 8/17/2020 10:36
Imagining the pawns as differently colored dice is probably the easiest way to reach what I expect is the intended solution.
brian8871 brian8871 8/17/2020 10:33
Not to give away the answer to the current riddle, but there's a way to make your odds of winning almost 75 percent.
JoshuaVGreen JoshuaVGreen 8/17/2020 10:32
For the urn problem, please resolve an ambiguity in the King's instructions:

"Pick up all 16 pawns and put them into the urns as you please. However, at the end both urns have to have pawns."

Must each urn have at least two pawns, or could the young grandmaster put exactly one pawn in one of the urns?
JoshuaVGreen JoshuaVGreen 8/17/2020 09:47
Typo correction in my first comment below -- "... an option WITH all-distinct values ..."
chamishavolkov chamishavolkov 8/17/2020 09:19
@Lars Rasmussen @Zurubang: those 126 options are not equally likely. If I bet on {1 2 3 4}, I'll be 24 times more likely to win than if I had bet on {1 1 1 1}. Alas, as long as I get to choose the numbers, I will choose four different ones and win bigly. I hope this clears things up.
JoshuaVGreen JoshuaVGreen 8/17/2020 08:28
Also, thank you @Lars Rasmussen for your trust in my result(s) and @Zurubang for the same and kind words.
JoshuaVGreen JoshuaVGreen 8/17/2020 08:19
As @Lars Rasumussen noted, I already computed a significant advantage for the player when playing "The Dice" and guessing four distinct numbers, and that computation still looks correct. The mistake in your computation seems to be that you act as though all "options" are equally likely. In fact, an option will all-distinct values is more likely than an option with repeat(s); think about Yahtzee. To repeat my previous computations:

There are 6 x 6 x 6 x 6 = 1296 outcomes of the dice. Of course, some of those outcomes are scored equivalently. Of those 1296 possible rolls, 24 of them consist of the distinct results 1, 2, 3, 4 in some order. Thus, by guessing {1, 2, 3, 4} (say), the player will win 24:1296 times and expect to get back (24 x 100) : 1296 = 50 : 27 of his/her money.
Zurubang Zurubang 8/17/2020 07:54
@Lars Thank you for pointing this out. To be honest, Joshua is one of our greatest riddle masters and I trust him more than the magazine I got the solution from, since he has proven many times how competent he could solve all puzzles. But If anybody can explain the formula I have and what is wrong about it please? I would be happy to see the mistake. Best regards, Arne
Lars Rasmussen Lars Rasmussen 8/17/2020 07:25
RTP for the dice is not 79% but 185% (50/27). This was already calculated by JoshuaVGreen in his comments to Logic Riddles for Chess Players (6).
1