mscroggs.co.uk
mscroggs.co.uk

subscribe

Blog

Archive

Show me a random blog post
 2018 
 2017 
 2016 
 2015 
 2014 
 2013 
 2012 

Tags

folding paper folding tube maps london underground platonic solids london rhombicuboctahedron raspberry pi weather station programming python php inline code news royal baby probability game show probability christmas flexagons frobel coins reuleaux polygons countdown football world cup sport stickers tennis braiding craft wool emf camp people maths trigonometry logic propositional calculus twitter mathslogicbot oeis matt parker pac-man graph theory video games games chalkdust magazine menace machine learning javascript martin gardner noughts and crosses reddit national lottery rugby puzzles game of life dragon curves fractals pythagoras geometry triangles european cup dates palindromes chalkdust christmas card ternary bubble bobble asteroids final fantasy curvature binary arithmetic bodmas statistics error bars estimation accuracy misleading statistics pizza cutting captain scarlet gerry anderson light sound speed manchester science festival manchester dataset a gamut of games hexapawn nine men's morris draughts chess go radio 4 data

Archive

Show me a random blog post
▼ show ▼
 2018-05-02 

A bad Puzzle for Today

Every morning just before 7am, one of the Today Programme's presenters reads out a puzzle. Yesterday, it was this puzzle:
In a given month, the probability of a certain daily paper either running a story about inappropriate behaviour at a party conference or running one about somebody's pet being retrieved from a domestic appliance is exactly half the probability of the same paper containing a photo of a Tory MP jogging. The probability of no such photo appearing is the same as that of there being a story about inappropriate behaviour at a party conference. The probability of the paper running a story about somebody's pet being retrieved from a domestic appliance is a quarter that of its containing a photo of a Tory MP jogging. What are the probabilities the paper will (a) run the conference story, (b) run the pet story, (c) contain the jogging photo?
I'm not the only one to notice that some of Radio 4's daily puzzles are not great. I think this puzzle is a great example of a terrible puzzle. You can already see the first problem with it: it's long and words and very hard to follow on the radio. But maybe this isn't so important, as you can read it here after it's been read out.
Once you've done this, you can re-write the puzzle as follows: there are three news stories (\(A\), \(B\) and \(C\)) that the newspaper might publish in a month. We are given the following information:
$$\mathbb{P}(A\text{ or }B)=\tfrac12\mathbb{P}(C)$$ $$1-\mathbb{P}(C)=\mathbb{P}(A)$$ $$\mathbb{P}(B)=\tfrac14\mathbb{P}(C)$$
To solve this puzzle, we need use the formula \(\mathbb{P}(A\text{ or }B)=\mathbb{P}(A)+\mathbb{P}(B)-\mathbb{P}(A\text{ and }B)\). These Venn diagrams justify this formula:
Venn diagrams showing that \(\mathbb{P}(A\text{ or }B)=\mathbb{P}(A)+\mathbb{P}(B)-\mathbb{P}(A\text{ and }B)\).
Using the information we were given in the question, we get:
\begin{align} \tfrac12\mathbb{P}(C)&=\mathbb{P}(A\text{ or }B)\\ &=1-\mathbb{P}(C)+\tfrac14\mathbb{P}(C)-\mathbb{P}(A\text{ and }B)\\ \mathbb{P}(C)&=\tfrac45(1-\mathbb{P}(A\text{ and }B)). \end{align}
At this point we have reached the second problem with this puzzle: there's no answer unless we make some extra assumptions, and the question doesn't make it clear what we can assume. But let's give the puzzle the benefit of the doubt and try some assumptions.

Assumption 1: The events are mutually exclusive

If we assume that the events \(A\) and \(B\) are mutually exclusive—or, in other words, only one of these two articles can be published, perhaps due to a lack of space—then we can use the fact that
$$\mathbb{P}(A\text{ and }B)=0.$$
This means that \(\mathbb{P}(C)=\tfrac45\), \(\mathbb{P}(A)=\tfrac15\), and \(\mathbb{P}(B)=\tfrac15\). There's a problem with this answer, though: the three probabilities add up to more than 1.
This wouldn't be a problem, except we assumed that only one of the articles \(A\) and \(B\) could be published. The probabilities adding up to more than 1 means that either \(A\) and \(C\) are not mutually exclusive or \(A\) and \(B\) are not mutually exclusive, so \(C\) could be published alongside \(A\) or \(B\). There seems to be nothing special about the three news stories to mean that only some combinations could be published together, so at this point I figured that this assumption was wrong and moved on.
Today, however, the answer was posted, and this answer was given (without an working out). So we have a third problem with this puzzle: the answer that was given is wrong, or at the very best is based on questionable assumptions.

Assumption 2: The events are independent

If we assume that the events are independent—so one article being published doesn't affect whether or not another is published—then we may use the fact that
$$\mathbb{P}(A\text{ and }B)=\mathbb{P}(A)\mathbb{P}(B).$$
If we let \(c=\mathbb{P}(C)\), then we get:
\begin{align} \tfrac12c&=\mathbb{P}(A)+\mathbb{P}(B)-\mathbb{P}(A\text{ and }B)\\ &=\mathbb{P}(A)+\mathbb{P}(B)-\mathbb{P}(A)\mathbb{P}(B)\\ &=1-c+\tfrac14c-\tfrac14(1-c)c\\ \tfrac14c^2-\tfrac32c+1&=0. \end{align}
You can use your favourite formula to solve this to find that \(c=3-\sqrt5\), and therefore \(\mathbb{P}(A)=\sqrt5-2\) and \(\mathbb{P}(B)=\tfrac34-\tfrac{\sqrt5}4\).
In this case, our assumption appears to be more reasonable—as over the course of a month the stories published by a paper probably don't have much of an effect on each other—but we have the fourth, and probably biggest problem with the puzzle: the question and answer are not interesting or surprising, and the method is a bit tedious.

Similar posts

World Cup stickers 2018, pt. 2
A 20,000-to-1 baby?
World Cup stickers 2018
How much will I win on the new National Lottery?

Comments

Comments in green were written by me. Comments in blue were not written by me.
 2018-05-03 
It's possible that that was intended but it's not completely clear. If that was the intention, I stick to my point that it's odd that the other story can be published alongside these two.
Matthew
 2018-05-03 
Doesn’t the word ‘either’ in the opening phrase make A and B explicity exclusive?
Stefan
 Add a Comment 


I will only use your email address to reply to your comment (if a reply is needed).

Allowed HTML tags: <br> <a> <small> <b> <i> <s> <sup> <sub> <u> <spoiler> <ul> <ol> <li>
To prove you are not a spam bot, please type "l" then "u" then "n" then "c" then "h" in the box below (case sensitive):
 2018-01-02 

Christmas (2017) is over

It's 2018, and the advent calendar has disappeared, so it's time to reveal the answers and annouce the winners. But first, some good news: with your help, Santa was able to work out which present each child wanted, and get their presents to them just in time:
Now that the competition is over, the questions and all the answers can be found here. Before announcing the winners, I'm going to go through some of my favourite puzzles from the calendar.

4 December

Pick a three digit number whose digits are all different.
Sort the digits into ascending and descending order to form two new numbers. Find the difference between these numbers.
Repeat this process until the number stops changing. The final result is today's number.
This puzzle revealed the surprising fact that repeatedly sorting the digits of a three digit number into ascending and descending order then finding the difference will always give the same answer (as long as the digits of the starting number are all different). This process is known as the Kaprekar mapping.
If four digit starting numbers are chosen, then all starting numbers that do not have three equal digits will eventually lead to 6174. It's not as simple for five digit numbers, but I'll leave you to investigate this...

11 December

Two more than today's number is the reverse of two times today's number.
Ruben pointed something interesting out to me about this question: if you remove the constraint that the answer must be a three digit number, then you see that the numbers 47, 497, 4997, 49997, and in fact any number of the form 49...97 will have this property.

20 December

What is the largest number that cannot be written in the form \(10a+27b\), where \(a\) and \(b\) are nonnegative integers (ie \(a\) and \(b\) can be 0, 1, 2, 3, ...)?

Show answer & extension

If you didn't manage to solve this one, I recommend trying replacing the 10 and 27 with smaller numbers (eg 3 and 4) and solving the easier puzzle you get first, then trying to generalise the problem. You can find my write up of this solution here.
Pedro Freitas (@pj_freitas) sent me a different way to approach this problem (related to solving the same question with different numbers on this year's Christmas card). To see his method, click "Show Answer & Extension" in the puzzle box above.

24 December

Today's number is the smallest number with exactly 28 factors (including 1 and the number itself as factors).

Show answer

I really like the method I used to solve this one. To see it, click "Show Answer" above.
Solving all 24 puzzles lead to the following final logic puzzle:

Advent 2017 logic puzzle

2016's Advent calendar ended with a logic puzzle: It's nearly Christmas and something terrible has happened: Santa and his two elves have been cursed! The curse has led Santa to forget which present three children—Alex, Ben and Carol—want and where they live.
The elves can still remember everything about Alex, Ben and Carol, but the curse is causing them to lie. One of the elves will lie on even numbered days and tell the truth on odd numbered days; the other elf will lie on odd numbered days and tell the truth on even numbered days. As is common in elf culture, each elf wears the same coloured clothes every day.
Each child lives in a different place and wants a different present. (But a present may be equal to a home.) The homes and presents are each represented by a number from 1 to 9.
Here are the clues:
21
White shirt says: "Yesterday's elf lied: Carol wants 4, 9 or 6."
10
Orange hat says: "249 is my favourite number."
5
Red shoes says: "Alex lives at 1, 9 or 6."
16
Blue shoes says: "I'm the same elf as yesterday. Ben wants 5, 7 or 0."
23
Red shoes says: "Carol wants a factor of 120. I am yesterday's elf."
4
Blue shoes says: "495 is my favourite number."
15
Blue shoes says: "Carol lives at 9, 6 or 8."
22
Purple trousers says: "Carol wants a factor of 294."
11
White shirt says: "497 is my favourite number."
6
Pink shirt says: "Ben does not live at the last digit of 106."
9
Blue shoes says: "Ben lives at 5, 1 or 2."
20
Orange hat says: "Carol wants the first digit of 233."
1
Red shoes says: "Alex wants 1, 2 or 3."
24
Green hat says: "The product of the six final presents and homes is 960."
17
Grey trousers says: "Alex wants the first digit of 194."
14
Pink shirt says: "One child lives at the first digit of 819."
3
White shirt says: "Alex lives at 2, 1 or 6."
18
Green hat says: "Ben wants 1, 5 or 4."
7
Green hat says: "Ben lives at 3, 4 or 3."
12
Grey trousers says: "Alex lives at 3, 1 or 5."
19
Purple trousers says: "Carol lives at 2, 6 or 8."
8
Red shoes says: "The digits of 529 are the toys the children want."
13
Green hat says: "One child lives at the first digit of 755."
2
Red shoes says: "Alex wants 1, 4 or 2."

Show answer

Together the clues reveal what each elf was wearing:
Drawn by Alison Clarke
Drawn by Adam Townsend
and allow you to work out where each child lives and what they wanted. Thanks Adam and Alison for drawing the elves for me.
I had a lot of fun finding place names with numbers in them to use as answers in the final puzzle. For the presents, I used the items from The 12 Days of Christmas:
#LocationPresent
1Maidstone, Kenta partridge
2Burcot, Worcestershireturtle doves
3Three Holes, NorfolkFrench hens
4Balfour, Orkneycalling birds
5Fivehead, Somersetgold rings
6Sixpenny Handley, Dorsetgeese
7Sevenhampton, Glosswans
8Leighton Buzzard, Bedsmaids
9Nine Elms, Wiltshireladies
I also snuck a small Easter egg into the calendar: the doors were arranged in a knight's tour, as shown below.
And finally (and maybe most importantly), on to the winners: 84 people submitted answers to the final logic puzzle. Their (very) approximate locations are shown on this map:
From the correct answers, the following 10 winners were selected:
1M Oostrom
2Rosie Paterson
3Jonathan Winfield
4Lewis Dyer
5Merrilyn
6Sam Hartburn
7Hannah Charman
8David
9Thomas Smith
10Jessica Marsh
Congratulations! Your prizes will be on their way shortly. Additionally, well done to Alan Buck, Alessandra Zhang, Alex Burlton, Alex Hartz, Alex Lam, Alexander, Alexander Bolton, Alexandra Seceleanu, Arturo, Brennan Dolson, Carmen Günther, Connie, Dan Whitman, David Fox, David Kendel, Edison Yifeng He, Elijah Kuhn, Eva, Evan Louis Robinson, Felix Breton, Fred Verheul, Henry Hung, Joakim Cronvall, Joe Gage, Jon Palin, Kai Lam, Keith Sutherland, Kelsey, Kenson Li, Koo Zhengqun, Kristen Koenigs, Lance Nathan, Louis de Mendonca, Mark Stambaugh, Martin Harris, Martine Vijn Nome, Matt Hutton, Matthew Schulz, Max Nilsson, Michael DeLyser, Michael Smith, Michael Ye, Mihai Zsisku, Mike Walters, Mikko, Naomi Bowler, Pattanun Wattana, Pietro Alessandro Murru, Raj, Rick, Roni, Ross Milne, Ruben, Ryan Howerter, Samantha Duong, Sarah Brook, Shivanshi, Steve Paget, Steven Peplow, Steven Spence, Tony Mann, Valentin Vălciu, Virgile Andreani, and Yasha Asley, who all also submitted the correct answer but were too unlucky to win prizes this time.
See you all next December, when the advent calendar will return.

Similar posts

Christmas card 2017
Christmas (2017) is coming!
Christmas (2016) is over
Christmas card 2016

Comments

Comments in green were written by me. Comments in blue were not written by me.
 2018-01-02 
Thanks! The advent calendar was great fun to take part in - and winning something in the process is the cherry on top. The riddles themselves were interesting and varied, they fitted well together in the overall puzzle, and I learned some interesting new bits of maths in the process. And now, to try my hand at the other advent calendars...

I particularly liked the riddle on the 5th of December (with walking 13 units) - it was quite tricky at first, but then I solved it by seeing that you can't end up on a square an even distance away from the centre, so the possible areas are in "circles" from the center with odd side lengths . It was quite reminiscent of showing you can't cover a chessboard with dominoes when two opposite corners are removed .
Lewis
 Add a Comment 


I will only use your email address to reply to your comment (if a reply is needed).

Allowed HTML tags: <br> <a> <small> <b> <i> <s> <sup> <sub> <u> <spoiler> <ul> <ol> <li>
To prove you are not a spam bot, please type "kculc" backwards in the box below (case sensitive):
 2017-12-18 

Christmas card 2017

Just like last year, I spent some time in November this year designing a puzzle Christmas card for Chalkdust.
The card looks boring at first glance, but contains 10 puzzles. Converting the answers to base 3, writing them in the boxes on the front, then colouring the 1s black and 2s orange will reveal a Christmassy picture.
If you want to try the card yourself, you can download this pdf. Alternatively, you can find the puzzles below and type the answers in the boxes. The answers will be automatically converted to base 3 and coloured...
#Answer (base 10)Answer (base 3)
10000000
20000000
30000000
40000000
50000000
60000000
70000000
80000000
90000000
100000000
  1. In a book with 116 pages, what do the page numbers of the middle two pages add up to?
  2. What is the largest number that cannot be written in the form \(14n+29m\), where \(n\) and \(m\) are non-negative integers?
  3. How many factors does the number \(2^6\times3^{12}\times5^2\) have?
  4. How many squares (of any size) are there in a \(15\times14\) grid of squares?
  5. You take a number and make a second number by removing the units digit. The sum of these two numbers is 1103. What was your first number?
  6. What is the only three-digit number that is equal to a square number multiplied by the reverse of the same square number? (The reverse cannot start with 0.)
  7. What is the largest three-digit number that is equal to a number multiplied by the reverse of the same number? (The reverse cannot start with 0.)
  8. What is the mean of the answers to questions 6, 7 and 8?
  9. How many numbers are there between 0 and 100,000 that do not contain the digits 0, 1, 2, 3, 4, 5, or 6?
  10. What is the lowest common multiple of 52 and 1066?

Similar posts

Christmas card 2016
Christmas (2017) is over
Christmas (2017) is coming!
Christmas (2016) is over

Comments

Comments in green were written by me. Comments in blue were not written by me.
 2018-01-01 
C - look up something called Frobenius numbers. This problem's equivalent to finding the Frobenius number for 14 and 29.
Lewis
 2017-12-28 
I can solve #2 with code, but is there a tidy maths way to solve it directly?
C
 2017-12-23 
My efforts were flightless.
NHH
 2017-12-20 
What a fun diversion! I have to admit I can't remember how to solve #2 - I finally had to write some code. (So primitive.)
Heather
 2017-12-19 
Thank you for the clarification!

I don't want to spoil the answer for anyone, but my Christmassy picture looks like a well dressed bird.
Claudio
 Add a Comment 


I will only use your email address to reply to your comment (if a reply is needed).

Allowed HTML tags: <br> <a> <small> <b> <i> <s> <sup> <sub> <u> <spoiler> <ul> <ol> <li>
To prove you are not a spam bot, please type "zebra" in the box below (case sensitive):
 2017-11-28 

Christmas (2017) is coming!

This year, the front page of mscroggs.co.uk will once again feature an advent calendar, just like last year and the year before. Behind each door, there will be a puzzle with a three digit solution. The solution to each day's puzzle forms part of a logic puzzle:
It's nearly Christmas and something terrible has happened: Santa and his two elves have been cursed! The curse has led Santa to forget which present three children—Alex, Ben and Carol—want and where they live.
The elves can still remember everything about Alex, Ben and Carol, but the curse is causing them to lie. One of the elves will lie on even numbered days and tell the truth on odd numbered days; the other elf will lie on odd numbered days and tell the truth on even numbered days. As is common in elf culture, each elf wears the same coloured clothes every day.
Each child lives in a different place and wants a different present. (But a present may be equal to a home.) The homes and presents are each represented by a number from 1 to 9.
Santa has called on you to help him work out the details he has forgotten. Behind each day (except Christmas Day), there is a puzzle with a three-digit answer. Each of these answers forms part of a fact that one of the elves tells you. You must work out which combination of clothes each elf wears, which one lies on each day, then put all the clues together to work out which presents need delivering to Alex, Ben and Carol, and where to deliver them.
Ten randomly selected people who solve all the puzzles and submit their answers to the logic puzzle using the form behind the door on the 25th will win prizes! A selection of the prizes are shown below, and will be added to throughout December.
The ten winners will also will one of these winners' medals:
As you solve the puzzles, your answers will be stored. This year, there is a new feature allowing you to synchronise your answers between multiple computers: simply enter your email address below the calendar, and you will be emailed a magic link to visit on your other devices.
Behind the door on Christmas Day, there will be a form allowing you to submit your answers. The winner will be randomly chosen from all those who submit the correct answer before the end of 2017. Each day's puzzle (and the entry form on Christmas Day) will be available from 5:00am GMT. But as the winners will be selected randomly, there's no need to get up at 5am on Christmas Day to enter!
To win a prize, you must submit your entry before the end of 2017. Only one entry will be accepted per person. If you have any questions, ask them in the comments below or on Twitter.
So once December is here, get solving! Good luck and have a very merry Christmas!

Similar posts

Christmas (2017) is over
Christmas card 2017
Christmas (2016) is over
Christmas card 2016

Comments

Comments in green were written by me. Comments in blue were not written by me.
 2017-12-27 
Thanks, I've added a clarification to 22
Matthew
 2017-12-24 
Me again

Just for info (clarification?): I read question on 22nd as
22 is two times an odd number. Today's number is the mean of all the answers, on days (including today), that are two times an odd number."

Note my added commas. I was averaging the answers, not the dates. Certainly ambiguous as far as I am concerned.
Only fixed it by 'cheating'. Trying best guessses of averages until I got the correct one.
neal (@zbvif)
 2017-12-24 
Wow. Just discovered I meisread 15th Dec puzzle.

I can tell you that the number of combinations of n As and Bs which contain at at least one uninterrupted sequence of 3 As is 2^n - F3(n+3) where F3 is the fibonaccia variant adding 3 numbers (1,1,2,4,7,13,24 etc.).
Only took me about 8 hours (with some small help form OEIS for the 2 As problem)
Neal (@zbvif)
 2017-12-18 
Assume the pancake is 2D
Matthew
 2017-12-18 
With todays puzzle does the pancake have any thickness i.e can we slice the pancake into 2 circular pancakes each with half the thickness or are we to assume its 2D
Alex
 Add a Comment 


I will only use your email address to reply to your comment (if a reply is needed).

Allowed HTML tags: <br> <a> <small> <b> <i> <s> <sup> <sub> <u> <spoiler> <ul> <ol> <li>
To prove you are not a spam bot, please type "apple" in the box below (case sensitive):
 2016-12-28 

Christmas (2016) is over

More than ten correct solutions to this year's Advent calendar puzzle competition were submitted on Christmas Day, so the competition is now over. (Although you can still submit your answers to get me to check them.) Thank-you to everyone who took part in the puzzle, I've had a lot of fun watching your progress and talking to you on Twitter, Reddit, etc. You can find all the puzzles and answers (from 1 January) here.
The (very) approximate locations of all the entries I have received so far are shown on this map:
This year's winners have been randomly selected from the 29 correct entries on Christmas Day. They are:
1Jack Jiang
2Steve Paget
3Joe Gage
4Tony Mann
5Stephen Cappella
6Cheng Wai Koo
7Demi Xin
8Lyra
9David Fox
10Bob Dinnage
Your prizes will be on their way in early January.
Now that the competition has ended, I can give away a secret. Last year, Neal suggested that it would be fun if a binary picture was hidden in the answers. So this year I hid one. If you write all the answers in binary, with each answer below the previous and colour in the 1s black, you will see this:
I also had a lot of fun this year making up the names, locations, weapons and motives for the final murder mystery puzzle. In case you missed them these were:
#Murder suspectMotive
1Dr. Uno (uno = Spanish 1)Obeying nameless entity
2Mr. Zwei (zwei = German 2)To worry others
3Ms. Trois (trois = French 3)To help really evil elephant
4Mrs. Quattro (quattro = Italian 4)For old unknown reasons
5Prof. Pum (pum = Welsh 5)For individual violent end
6Miss. Zes (zes = Dutch 6)Stopping idiotic xenophobia
7Lord Seacht (seacht = Irish 7)Suspect espied victim eating newlyweds
8Lady Oito (oito = Portuguese 8)Epic insanity got him today
9Rev. Novem (novem = Latin 9)Nobody in newsroom expected

#LocationWeapon
1Throne roomWrench (1 vowel)
2Network roomRope (2 vowels)
3Beneath reedsRevolver (3 vowels)
4Edge of our gardenLead pipe (4 vowels)
5Fives courtNeighbour's sword (5 vowels)
6On the sixth floorSuper banana bomb (6 vowels)
7Sparse venueAntique candlestick (7 vowels)
8Weightlifting roomA foul tasting poison (8 vowels)
9Mathematics mezzanineRun over with an old Ford Focus (9 vowels)
Finally, well done to Scott, Matthew Schulz, Michael Gustin, Daniel Branscombe, Kei Nishimura-Gasparian, Henry Hung, Mark Fisher, Jon Palin, Thomas Tu, Félix Breton, Matt Hutton, Miguel, Fred Verheul, Martine Vijn Nome, Brennan Dolson, Louis de Mendonca, Roni, Dylan Hendrickson, Martin Harris, Virgile Andreani, Valentin Valciu, and Adia Batic for submitting the correct answer but being too unlucky to win prizes this year. Thank you all for taking part and I'll see you next December for the next competition.

Similar posts

Christmas (2017) is over
Christmas card 2017
Christmas (2017) is coming!
Christmas card 2016

Comments

Comments in green were written by me. Comments in blue were not written by me.
 2017-02-03 
Thanks for the prizes. Fascinating books!
Steve Paget
 2017-01-19 
I got my prize in the mail today. I really liked the stories from Gustave Verbeek; I thought that was pretty clever. I really appreciate you being willing to send the prizes internationally.

Thanks for setting this all up; I had a lot of fun solving the puzzles every day (and solving half them again when my cookie for the site somehow got deleted). I'll be sure to participate next time too!
SC
 2016-12-28 
Thanks, Matthew! The puzzles were really fun, and piecing the clues was very interesting too!
Jack
 Add a Comment 


I will only use your email address to reply to your comment (if a reply is needed).

Allowed HTML tags: <br> <a> <small> <b> <i> <s> <sup> <sub> <u> <spoiler> <ul> <ol> <li>
To prove you are not a spam bot, please type "k" then "e" then "y" in the box below (case sensitive):
© Matthew Scroggs 2018