Wednesday, October 26, 2016

The 10 Prisoners And The 1000 Bottles Of Wine

After much preparation, a group of 10 death-sentenced criminals are finally in the opportunity to execute their venomous plan. You might think I'm talking about a prison escape, but no. Their prison is highly secure and on an island, so escape seems impossible. Instead they've set out for the next best thing: revenge on their evil, sadistic prison warden. I am sure you remember that guy. He likes to play games with those on death row, and despite the hats it ain't a party.

The warden has a giant wine cellar in his prison. During convict labor, the group of ten are assigned to clean this wine cellar. It houses a collection of 1,000 bottles of expensive wine. And many of these wines get put on the table during lavish parties hosted by the warden. A big one is coming up in one month. And his guests, well they are as bad as he is. They can't get enough of the warden telling stories about what sadistic puzzle he has invented for the prisoners this time.

So none of the ten prisoners have any qualms about what they are about to do: secretly poison nearly the entire supply of wine. They managed to get a special needle to inject the poison into the wine via the corks — the whole thing is untraceable. There are guards watching them, so they have to be careful. During brief unsupervised moments is when they strike, injecting one bottle at a time.

But it does not go according to plan. They are caught red handed before even the second attempt. And shortly they find themselves in a room, being viciously questioned by none other than the warden himself.

Eventually one of the prisoners explains the situation.
“We have poisoned only one bottle in your collection. But we will never tell you which one. And this poison is so potent, it will kill you no matter how many times you dilute it. It won't kill you straight away though. For 3 weeks you will not notice a thing, and then suddenly you will drop dead.”

The wardens face gets red in anger, while the prisoner continues: “You will never find this bottle. Are you really willing to risk your own life and that of your guests over this? Ha, you will have to throw away your entire collection!”

The warden is furious. Foaming at the mouth, screaming: “How dare you! Do you have any idea how much these wines are worth?! I am not throwing out a single bottle more than needed!

He gets silent for a moment and thinks deeply. Suddenly his angry expression changes to an evil grimace.
“Yes, that's right. I can still serve the remaining 999 to my guests. Because I will find this one bottle that you poisoned. And I only need the 10 of you to do so,” he claims confidently.

He lowers his voice, as he tends to do. “You will test my wines for me. Some of you will die. But you have brought this upon yourselves.”

What tactic could the warden possibly employ to make good on his manic claims?

Saturday, January 16, 2016

The First-Digit Law

A Coruña243,870
Ciudad Real74,427
This post is about long lists of — real-life — numerical data. Doesn't sound like we're off to an interesting start, are we? But keep staring at such a list long enough, and you'll notice something strange.

For example, take a list of population counts for each of the more than 8000 cities in Spain. Like the one on the left. Without actually seeing that whole list, approximately what percentage of those numbers do you expect to start with the digit one?

You could reason that since the first digit could be any from 1 to 9, then a number will start with a specific digit about one in nine times as well. Or about ~11%. You know, on average.

That seems a reasonable and logical guess, and yet it turns out that almost one third of the numbers on this list start with the digit ‘1’!

Check out that link. That site shows something else too. It doesn't just apply to this particular list of numbers. Nor does it only apply to lists of population counts. There are many, many numerical data sets out there where this Law — also called Benford's Law — applies.

Socio-economic data. Stock prices. The lengths of rivers in miles. The lengths of rivers in kilometers! Street addresses. Constants in physics. Birth rates. Death rates. The sizes of the files on your computer. It doesn't apply to everything, but it sure applies to a lot.

Friday, October 23, 2015

The Math Joke

Three logicians walk into a bar. The barman asks them, “Do you all want a drink?”
The first logician says, “I don't know.”
The second logician says, “I don't know either.”
The third logician exclaims, “Yes!”

Can you explain the joke?

Wednesday, September 30, 2015

The Einstein Puzzle

There's a well-known logical puzzle, which is said to have been created by Albert Einstein as a boy. And to make it a bit more juicy, this is then usually followed up by the claim that 98% of the people will not be able to solve it!

Nonsense I say. You are totally up for it, I believe in you! It's a tough but fun puzzle, and finding the answer can be very satisfying. This is how it goes:

Five houses painted five different colors stand in a row. In each house lives one person, and each person has a different nationality. These five owners drink a certain type of beverage, smoke a certain brand of cigar and keep a certain pet. No owners have the same pet, smoke the same brand of cigar or drink the same beverage.   source

Then there's all this:
  1. The Brit lives in the red house.
  2. The Swede keeps dogs as pets.
  3. The Dane drinks tea.
  4. The green house is on the immediate left of the white house.
  5. The green house's owner drinks coffee.
  6. The owner who smokes Pall Mall rears birds.
  7. The owner of the yellow house smokes Dunhill.
  8. The owner living in the center house drinks milk.
  9. The Norwegian lives in the first house.
  10. The owner who smokes Blends lives next to the one who keeps cats.
  11. The owner who keeps the horse lives next to the one who smokes Dunhill.
  12. The owner who smokes Bluemasters drinks beer.
  13. The German smokes Prince.
  14. The Norwegian lives next to the blue house.
  15. The owner who smokes Blends lives next to the one who drinks water.
Which finally leads to a single question: Who owns the fish?

Tuesday, March 17, 2015

The Age Old Problem

Here we have two completely random people: Anna en Ben. Anna's birthday is in February, while Ben's birthday is in April.

Today (15 March 2015) I take Anna's age, Ben's age, Anna's year of birth, and Ben's year of birth, and add all of 'em together.

This results in one number. What is it?

Friday, October 24, 2014

The Incomplete Equation

Given the following four numbers:
1   5   6   7
The goal is to make the number:
Using only these elementary arithmetic operations:
( + − × ÷ )

So, you can put the four numbers in any order, and use parentheses to specify operator precedence. Each number may only be used once and must be used separately (i.e. no sticking numbers together). You do not necessarily need to use all the operators.

What would the resulting equation look like?

Sunday, March 30, 2014

The Three Strange Statistics

Here are three statistics that will make you scratch your head.
  • Of all people that ever lived, 6.7% are still alive today.
  • Whenever you give a deck of cards a proper shuffle, it is safe to say that the order that comes out has never been dealt before in all of human history.
  • Statistically, people who get injured will more often be living in an odd-numbered house than an even-numbered house.
Explanations after the jump!

Wednesday, January 22, 2014

The Mind Reader, Part II

Below you can access an amazing algorithm. It runs remotely on a server park of quantum computers. By giving the algorithm only one number, it will know which two random numbers you picked! It does this using quantum-mechanical phenomena such as superposition and entanglement. Just follow the steps in this game and you'll see it's true!

Sunday, June 23, 2013

The Prosecutor's Fallacy

The field of statistics has quite a few types of fallacies up its sleeve. The prosecutor's fallacy is a particularly misleading one. In the courtroom, the prosecutor may not purposely use the fallacy to present evidence. Neither may the defense, who might use it to argue a suspects innocence. Still, sometimes the fallacy is presented by mistake.

Let's say some DNA is found on a murder scene. The police have a DNA databank containing 20,000 people and run the sample through it. There is a match, the suspected murderer is identified and put to trial.
The crime scene analyst testifies that the probability of two DNA profiles matching erroneously is only 1 in 10,000. The jury concludes that this means that there is only a 0,01% chance that the suspect is innocent.

Would you conclude the same?

Friday, December 21, 2012

The Prediction

Friday, August 31, 2012

The Sleep Experiment

To make a quick buck, you volunteer for a strange experiment. The details of the experiment are explained to you before you start.

You arrive on a Sunday and are put to sleep. A fair coin is tossed to decide what happens next.
  • If the coin comes up heads, you're awakened on Monday only and the experiment ends there.
  • If the coin comes up tails, you're awakened on Monday, put back to sleep with a pill, and awakened again on Tuesday. That pill also erases the memory of your last awakening.
This means that whenever you are woken, you do not know what day it is. And each time, the researchers ask you the same question:
“What do you now say is the probability that the coin landed heads?”

So if you are partaking in the experiment and being awakened with that question... what is your answer?

Sunday, April 15, 2012

The Impossible Puzzle

I'm leaving this one here not necessarily as a puzzle for you to solve, but as an insight in how freaky these math puzzles can get. This particular one is called ‘The Impossible Puzzle’. Solving it is in fact possible, but that title might hint at how difficult that is. Nevertheless, see how far you can get!

Sam and Priya are two very talented mathematicians.
Their friend Anna approaches them and says: “I have chosen two whole numbers, labeled A and B. Note that A is greater than 1 and B is greater than A. The sum of these numbers does not exceed 100.”

The others nod, so she continues: “In a moment, I will inform Sam of only the sum (A+B), and I will inform Priya of only the product (A×B). These announcements remain private!”
She does so, and the following conversation then takes place:

Priya says, “I don't know the values of A and B.”
Sam responds, “I already knew that.”
“In that case, I do know what their values are,” says Priya.
“Really?”, Sam ponders. “Then so do I.”

Now you too, can know what numbers A and B are.

Friday, January 20, 2012

The Impossible Vuvuzela

Mathematicians can describe a very strange theoretical object, which has two very paradoxic properties.

It looks like a horn, or maybe a trumpet. Hmmm, I guess it resembles one of those dreaded vuvuzelas most. It becomes thinner and thinner along its length — which, by the way, is infinite. You know what? Here's a picture:

On the one hand this vuvuzela has an infinite surface area. Because as the vuvuzela becomes longer, its exterior and interior become bigger, thus this vuvuzela of infinite length has an infinite surface.

On the other hand, its volume approaches π. That's right, a finite value. Surprisingly, this vuvuzela of infinite length has an exact finite volume.

Wednesday, December 14, 2011

The Mind Reader

I am thinking of a number between 1 and 9. You can ask me two yes/no questions and I will answer them truthfully.

You can't ask me any open questions, I will only answer “Yes” or “No”! However, if for some reason I cannot answer it, I will tell you “I don't know”.¹

What two questions should you ask me to find the number I'm thinking of?

¹ Let's pretend I'm a genius and that the difficulty of your question does not stop me from answering it. Also, me not knowing the answer is not the same as making me deal with an invalid answer! So having me divide by zero will do you no good. That's just cheating out of a valid yes/no question. Encoding the numbers as yes/no/don't know? Same story!

Tuesday, December 13, 2011

The Statistical Anomaly

“There are lies, damned lies, and statistics.” How is that for starting off with a cliché one-liner!? However, it is true that statistics can be quite misleading or difficult to interpret at times. Enter Simpson's Paradox. I'm going to demonstrate two interesting real-world examples of this.


The above numbers are grad school admissions at UC Berkeley from the fall of 1973. It sure seems that, compared to women, men were more likely to be admitted. Looking at these figures, would you accuse them of gender bias? Well, some people did, and sued the university!

So Berkeley decided to take a closer look at the numbers. Admissions are per department, so they wanted to find out which specific departments were guilty of a significant bias against women. Guess what... none of them were.

Thursday, November 17, 2011

The Diagonal Paradox

Shown here is a square with edges of length 1. The two orange edges will sum up to 2. Additionally, the length of the diagonal can be calculated using the Pythagorean Theorem. You know, A² + B² = C². That one. This gives √2 ≈ 1.41 for the diagonal.

Start carving out a stairway as shown in the pictures below. Realise that the total length of those orange lines will remain 2 no matter how many steps you chose to make!

From left to right, there are more (smaller) steps each time. But hang on a second: that orange line is quickly starting to look like the diagonal. Would it also approach 1.41 in length? If you made infinitely many steps, would its length turn out to be exactly √2?
No, not so, on both accounts.

Saturday, October 15, 2011

The Necktie Paradox

Tom and Michael are both given a cheap necktie by their respective wives for Christmas. At the office Christmas party they start arguing over which (who) is the cheapest. Having had a few drinks, they agree to have a silly bet. They will ask their wives how much their neckties cost. The guy with the more expensive necktie has to give it to the other as the prize.

Tom eagerly accepts the bet. He reasons that winning and losing are equally likely. “If I lose, then I lose the value of my necktie. But if I win, then I win more than the value of my necktie. Therefore this bet is ultimately to my advantage!”
Michael is eager to accept the bet as well... since he reasons in exactly the same way.

Either guy's reasoning seems sound, yet they cannot both have the advantage in the bet! Where is the fault?

Details: For a fair bet you'd expect both guys to have a 50% chance of winning it (100% together). In the extreme case where one guy would have a 100% chance of winning, it can only follow that the other guy has 0% chance, i.e. no chance at all. So that's why they can't both have the advantage (= a chance bigger than 50%).

Thursday, September 8, 2011

The Fuses Riddle

You have a bunch of fuses, each of which burns for exactly one minute. But, they burn unevenly. That is to say, half a length of fuse does not necessarily burn for half a minute. You have as many fuses and matches as you want.

How can you use these to measure 45 seconds?

Tuesday, August 23, 2011

The Coastline Paradox

What is the length of the coastline of Great Britain?

If you'd ask the Ordnance Survey (the mapping authority for the United Kingdom), they might give you a number of 11,073 miles (17,820 km). That's all well and good, but what does this number actually mean?

If I said the coastline had an infinite length, would I be wrong?

Wednesday, July 27, 2011

The Town's New Roads

A small town has four important places: a factory, school, soccer stadium and the shops. These four places are located on the corners of a square exactly 1 kilometer in size (see image on the left).
Now the municipality is planning the construction of roads in between. Each location should be directly or indirectly reachable from any other location. Extra intersections can be placed wherever. However, because of cutbacks, the designers are instructed to plan as little road as possible.

Here are some attempts to do that.
  1. The first image connects all places directly to every other place. While this makes for fast travelling, it doesn't quite result in a small amount of road. The total length here is 4×1 + 2×√2 ≈ 6.83 km.
  2. Since indirect connections were fine, the second image does away with the diagonals giving it a total road length of 4 kilometers.
  3. Looking for even shorter solutions, what happens if the road is built in the shape of a circle, touching every location? With π×√2 ≈ 4.44 km, that third image is worse.
  4. So in the last image, one of the roads is removed from the square, making a total of 3 km. While moving from the factory to the shops will be a pain, it is the shortest solution so far. Although an H-shape would be more practical, this is not relevant to the problem (that's still 3 km).
But 3 kilometers is not the shortest solution. What is?