So You Think You've Got Problems

Home > Nonfiction > So You Think You've Got Problems > Page 9
So You Think You've Got Problems Page 9

by Alex Bellos


  It’s time to end our linguistic excursions and return to more mathematical territory.

  Tasty teasers

  Bongard bafflers

  Mikhail Bongard was a Soviet computer scientist who studied how computers recognise patterns. In the mid-1960s he devised a style of problem in which 12 images are placed together, as below. The six images on the left conform to a pattern, or rule. The six images on the right conform to a different pattern, often the negative of the rule that applies to the images on the left.

  The challenge is to discover the rule that the left obeys and the rule that the right obeys.

  Here’s an easy one to get you started:

  The answer is that, on the left, all the shapes are triangles, and, on the right, they are all quadrilaterals.

  The rules in the following problems are all very simple, but finding them can be fiendish.

  1)

  2)

  3)

  4)

  Sleepless nights and sibling rivalries

  PROBABILITY PROBLEMS

  The first mathematician to place his hand in the cookie jar was Jacob Bernoulli in 1713.

  Okay, so it wasn’t a jar. And it wasn’t full of cookies.

  It was an urn containing 5,000 pebbles, of which 3,000 were white and 2,000 black. (It was a big urn.)

  Bernoulli imagined placing his hand in the urn and taking out a pebble at random. He had no way of knowing in advance whether it would be a white one or a black one. Random events are impossible to predict.

  But, argued Bernoulli, if he took out a pebble at random, replaced it, took out another pebble, replaced it, took out another pebble, and so on, taking and replacing pebbles for a long enough time, he could guarantee that on average he would take out and replace about 3 white pebbles for every 2 black ones. In other words, because the ratio of white to black pebbles in the urn was 3 to 2, in the long run the total number of white pebbles taken out compared to the total number of black pebbles taken out would be approximately 3 to 2.

  Bernoulli’s insight – that even though the outcome of a single random event is impossible to predict, the average outcome of that same event performed again and again and again may be extremely predictable (and approximately equal to the underlying probabilities) – is known as the law of large numbers. It is one of the foundational ideas of probability theory, the study of randomness, the mathematical field that underpins so much of modern life, from medicine to the financial markets, and from particle physics to weather forecasting.

  Bernoulli’s pebble-picking thought experiment also created the template for puzzles in which common objects are plucked at random from urn-like receptacles, like cookies from a cookie jar.

  101

  BETTER THAN HALF A CHANCE

  You are asked to place 100 cookies – 50 made with dark chocolate and 50 made with white chocolate – into two identical jars. Once you have completed this task you will be blindfolded, and you will have to open a jar randomly and take a single cookie from it.

  When you are blindfolded, you will not be able to tell which jar is which, nor will you be able to tell the difference between cookies by touch or smell.

  You hate white chocolate. How do you arrange the 100 cookies between the jars to have the best chance of choosing a dark chocolate one?

  102

  SINGLE WHITE PEBBLE

  A bag contains a single white pebble and many black pebbles. You and a friend will take turns picking pebbles out of the bag, one at a time, choosing pebbles at random but not replacing them. The winner is the person who pulls out the white pebble.

  To maximise your chance of winning, do you go first?

  The advantage of going first is that you have a chance to win before your friend does. The disadvantage is that if you don’t get the white pebble on your first go, you are presenting your friend with a chance to win, and with one less black pebble in the bag your friend now has a better chance than you just had.

  Randomness is a hard concept to wrap one’s head around. Indeed, probability is the area of basic maths most replete with seemingly paradoxical results, which is one reason why it is a rich source of recreational problems. Some of the best-known puzzles in maths are probability posers; and they are notorious because their answers are so counter-intuitive. In this chapter we will flip coins, roll dice and obsess over the gender of children. Your gut answers to many of the problems will invariably be wrong. Embrace the bewilderment.

  Now back to extracting items from darkened receptacles.

  103

  THE JOY OF SOCKS

  A sock drawer in a darkened room contains an equal number of red and blue socks. You are going to pick socks out at random. The minimum number of socks you need to pick to be sure of getting two of the same colour is the same as the minimum number of socks you need to pick to be sure of getting two of different colours. How many socks are in the drawer?

  Next up, another sartorial stumper.

  104

  LOOSE CHANGE

  I have 26 coins in my pocket. If I were to take out 20 coins from the pocket at random, I would have at least one 10p coin, at least two 20p coins, and at least five 50p coins. How much money is in my pocket?

  Problems about selecting items often require you to count combinations. For example, how many ways are there of choosing from a group of two objects?

  If the objects are A and B, we could choose: {nothing}, {A}, {B}, {A and B}. Total: four ways.

  What about three objects?

  If the objects are A, B and C we could choose: {nothing}, {A}, {B}, {C}, {A and B}, {A and C}, {B and C}, {A and B and C}. Total: eight ways.

  To cut a long story short: if we have n objects, there are 2n different ways of choosing from them.

  You may find this information helpful.

  105

  THE SACK OF SPUDS

  A sack contains 11 potatoes with a combined weight of 2kg. Show that it is possible to take a number of potatoes out of the sack and divide them into two piles whose weights differ by less than 1g.

  106

  THE BAGS OF SWEETS

  You have 15 plastic bags. How many sweets do you need in order to have a different number of sweets in each bag? Every bag must have at least one sweet.

  The benefits of puzzles are many and varied. They can improve your powers of deduction, introduce you to interesting ideas and give you the pleasure of achievement.

  They are also a ‘helpful ally’ in banishing ‘blasphemous’ and ‘unholy’ thoughts when lying awake at night, wrote Lewis Carroll, the God-fearing author of Alice’s Adventures in Wonderland.

  Carroll, the pen name of Charles Dodgson, a maths don at Oxford University, celebrates puzzle solving as a remedy for self-loathing in Pillow Problems Thought Out During Sleepless Nights, a book of 72 recreational problems published in 1893. The book’s title is literal. Not only does Carroll divulge that he devised almost all the problems while tucked up in bed (think Victorian nightshirt and night-cap), he also specifies on precisely which sleepless night he thought out which problem.

  In the dark hours of Thursday 8 September 1887, blood must have been pumping wildly around his brain, for that night he came up with the following brilliantly confounding teaser.

  107

  A STRATEGY FOR THE DISPLACEMENT OF IMPROPER THOUGHTS

  A bag contains a single ball, which has a 50/50 chance of being white or black. A white ball is placed inside the bag so that there are now two balls in it. The bag is closed and shaken, and a ball is taken out, which is revealed to be white.

  What is the chance that the ball remaining in the bag is also white?

  In other words, you put a white ball in the bag and take a white ball out. The common sense, intuitive answer is 50 per cent, because nothing seems to have changed between the original state (mystery ball in bag, white ball outside bag) and the final state (mystery ball in bag, white ball outside bag). If the original ball in the bag had a 50 per cent chance of being white, then s
urely the ball left in the bag must also have a 50 per cent chance of being white? Not at all, I’m afraid. The answer is not 50 per cent.

  In the second edition of Pillow Problems, Carroll made a retraction about his nocturnal musings. He rephrased the title, replacing ‘Sleepless Nights’ with ‘Wakeful Hours’ to ‘allay the anxiety of kind friends, who have written to me to express their sympathy in my broken-down state of health, believing that I am a sufferer from chronic “insomnia”, and that it is as a remedy for that exhausting malady that I have recommended mathematical calculation.’ He concludes: ‘I have never suffered from “insomnia” … [mathematical calculation is] a remedy for the harassing thoughts that are apt to invade a wholly-unoccupied mind.’ [His italics.]

  At around the same time in Paris, a French mathematician was harassing his own mind with the conceptual difficulties inherent in basic probability. In his classic textbook from 1889, Calcul des Probabilités, Joseph Bertrand set the following problem. Like the Lewis Carroll problem, it involves a situation in which an object is randomly selected and its colour observed.

  108

  BERTRAND’S BOX PARADOX

  In front of you are three identical boxes. One of them contains two black counters, one of them contains two white counters, and one of them contains a black counter and a white counter.

  You choose a box at random, open it, and remove a counter at random without looking at the other counter in that box.

  The counter you removed is black. What is the chance that the other counter in that box is also black?

  If you have never seen this problem before, you will slip on the same banana skin that almost everyone else does.

  The most common answer is 50 per cent. That is, most people think that if you remove a black counter from a box, half the time the counter left in the same box will be black, and half the time it will be white. The reasoning is as follows: if you choose randomly between the boxes and take out a black counter, you must have chosen from either the first or the third box. If you chose from the first box, the other counter is black, and if you chose from the third box the other counter is white. So the chances of a black counter are 1 in 2, or 50 per cent. Your task is to work out why this line of deduction is faulty.

  The fact that the answer is not 50 per cent has led to this problem being known as Bertrand’s box paradox: the correct solution feels wrong, even though it is demonstrably true.

  If you are still confused by the last two questions, the following discussion will be useful.

  *

  Paradoxes, puzzles and games have been at the heart of probability theory since its inception. In fact, the first ever mathematical analysis of randomness was written by an Italian professional gambler in the sixteenth century in order to understand the behaviour of dice.

  Gerolamo Cardano – who also held down the jobs of mathematician, doctor and astrologer – played a gambling game, Sors, in which you throw two dice and add up the numbers on their faces. He saw that there were two ways to throw a 9 (the pairs 6, 3 and 5, 4), and two ways to throw a 10 (the pairs 6, 4 and 5, 5), yet somewhat curiously 9 was a more frequent throw than 10.

  Total is 9

  Dice A Dice B

  6 3

  3 6

  5 4

  4 5

  Total is 10

  Dice A Dice B

  6 4

  4 6

  5 5

  Cardano was the first person to realise that in a proper analysis of the problem, the dice must be considered separately, as illustrated here. When you roll two dice (A and B) there are four equally likely ways of getting 9, but only three of getting 10. Since there are more equally likely ways to get a 9 than a 10, when you roll two dice again and again, in the long run you will throw a 9 more often than you throw a 10.

  The lesson from Cardano that will serve you well in this chapter is that when analysing a random event write out a table of all the equally likely outcomes – also called the ‘sample space’.

  Roll with it.

  109

  THE DICE MAN DIET

  In order to shed some pounds, you implement the following rule. Every day you will roll a die, and only if it rolls a 6 will you allow yourself pudding on that day.

  You start on Monday, and roll the die.

  On which day of the week are you most likely to eat your first pudding?

  110

  DIE! DIE! DIE!

  You are given the chance to bet £100 on a number between 1 and 6.

  Three dice are rolled. If your number doesn’t appear, you lose the stake. If your number appears once you win £100, if it appears twice you win £200 and if it appears on all three dice you win £300. (Like all betting games, if you win you also get your stake back.)

  Is this bet in your favour or not?

  Try to solve this problem using barely any calculations at all.

  A dice throw is a very clear and understandable random event with six equally likely outcomes. Flipping a coin is a very clear and understandable random event with two equally likely outcomes.

  111

  THE PHONEY FLIPS

  Here are two sequences of 30 coin flips. One I made by flipping an actual coin. The other I made up. Which sequence of heads and tails is most likely to be the one I made up?

  [1] T T H T T T T T H H T H H T T H T H H T H H H H T H H H T T

  [2] T T H T H H T T T H T H H H T H H T H H H T T H T H T T H T

  In puzzle-land, giving birth supplants flipping coins as the model for a 50-50 random event. Just as a coin will land heads or tails, a child will be either a boy or a girl. Probability puzzles become much more colourful and evocative when discussing gender balance rather than comparing T’s and H’s. Indeed, one of the things that makes probability puzzles appealing is that they are usually stated using non-technical, everyday language.

  In the following puzzles we ignore any global variation in gender ratios.

  Assume that the chance of having a boy or a girl is the same and ignore the possibility of twins.

  112

  JUST FOUR KIDS

  A couple plans on having four children. Is it more likely they will have two boys and two girls, or three of one sex and one of the other?

  113

  THE BIG FAMILY

  The Browns are recently married and are planning a family. They are discussing how many children to have.

  Mr Brown wants to stop as soon as they have two boys in a row, while Mrs Brown wants to stop as soon as they have a girl followed by a boy.

  Which strategy is likely to result in a smaller family? In other words, once they start having children, when they get to the point that one of them wants to stop, is it more likely to be Mr Brown or Mrs Brown?

  In 2010 I attended a conference of recreational mathematicians, puzzle designers and magicians in Atlanta. The biennial Gathering 4 Gardner is a celebration of the life and work of Martin Gardner (1914–2010), an American science writer whose most devoted readership comprised members of the above three groups.

  One of the speakers, Gary Foshee, took to the stage to give his presentation. It consisted solely of the following words:

  I have two children. One of them is a boy born on a Tuesday. What is the probability I have two boys?

  Foshee left the stage to silence. The audience was bemused not only by the brevity of the talk but also by the seemingly arbitrary mention of the Tuesday.

  What has Tuesday got to do with anything?

  Later in the day I tracked Foshee down. He told me the answer: 13/27, a completely surprising, almost unbelievable result. And, of course, it’s all because he mentioned the day of the week.

  I wrote about the Tuesday-boy problem later that year in New Scientist and on my own blog. Within weeks it had sent the internet into a frenzy of disbelief, indignation and debate. Why such a strange answer? Why does mentioning Tuesday make a difference? Mathematicians raced to give explanations and refutations. Some agreed with 13⁄27, while others argued
over semantics or disputed ambiguities in the phrasing. It was my first experience of how fast a good puzzle – or at least a controversial one – can spread around the world.

  We’ll get to the details of the solution shortly. But first let’s look at the Tuesday boy’s antecedents. The problem was a new spin on a doubleheader first posed by Martin Gardner in Scientific American in 1959, which itself generated a postbag of protests.

  Mr Smith has two children. At least one of them is a boy. What is the probability that both children are boys?

  Mr Jones has two children. The older child is a girl. What is the probability that both children are girls?

  Read them quickly and you might think they are asking the same question, one about the chance of two sons and the other about the chance of two daughters. Not quite. The phrase ‘at least one of them’ opens up a world of confusion.

  Mr Jones’s situation is uncontroversial and simple. If the older child is a girl, the only child of unknown gender is the younger child, who is either a boy or a girl. The probability that Mr Jones has two girls is 1 in 2, or 1/2.

  Now to the troublesome Smiths. The phrase ‘at least one of them is a boy’ is to be taken mathematically, meaning that either one child is a boy, the other child is a boy, or both children are boys. In this case, there are three equally probable gender assignations of two siblings: boy-girl, girl-boy, and boy-boy. In one out of three of these cases both children are boys, so the probability is 1 in 3, or 1/3.

 

‹ Prev