mscroggs.co.uk
mscroggs.co.uk

subscribe

Blog

 2022-03-14 
A few weekends ago, I visited Houghton-le-Spring to spend two days helping with an attempt to compute the first 100 decimal places of π by hand. You can watch Matt Parker's video about our calculation to find out about our method and how many correct decimal places we achieved.
One of my calculations
Spending two days computing an approximation of π led me to wonder how accurate calculations using various approximations of π would be.
One nice way to visualise this is to ask: what is the largest circle whose area can be correctly computed to the nearest mm² when using a chosen approximation of π? In this blog post, I'll answer this question for a range of approximations of π.

3

First up, how about the least accurate approximation we could possibly use: π = 3.
Using this approximation, the areas of circles with a radius of up to 1.88mm could be calculated correctly to the nearest mm². That's a circle about the size of an ant.

Pi Day: 3.14

Today is Pi Day, as in the date format M.DD, today's date is the first three digits of π. Using this approximation, circles with a radius of up to 17.7mm or 1.77cm can be calculated correctly to the nearest mm². That's a circle about the size of my thumb.

Pi Approximation Day: 22/7

In the date format DD/M, 22 July gives an approximation of π that is more accurate than 3.14. Using this approximation, circles with a radius of up to 19.8mm or 1.98cm can be calculated correctly to the nearest mm². That's a slightly bigger circle that's still about the size of my thumb.

Our approximation

In Houghton-le-Spring, our final computed value was 3.1415926535886829815214... The first 11 decimal places of this are correct.
Using this approximation, circles with a radius of up to \(6.71\times10^5\)mm or 671m can be calculated correctly to the nearest mm². That's a circle about the size of Regent's park.

The 100 decimal places we were aiming for

If we'd avoided any mistakes in Hougton-le-Spring, we would've obtained the first 100 decimal places of π. Using the first 100 decimal places of π, circles with a radius of up to \(7.8\times10^9\)mm or 7800km can be calculated correctly to the nearest mm². That's a circle just bigger than the Earth.

The 527 decimal places that William Shanks computed

In 1873, William Shanks computed 707 decimal places of π in Houghton-le-Spring. His first 527 decimal places were correct. Using his approximation, circles with a radius of up to approximately \(10^{263}\)mm or \(10^{244}\) light years can be calculated correctly to the nearest mm². The observable universe is only around \(10^{10}\) light years wide.
That's a quite big circle.
                        
(Click on one of these icons to react to this blog post)

You might also enjoy...

Comments

Comments in green were written by me. Comments in blue were not written by me.
When does "MM" give 14 for the month?
Steve Spivey
      ×1      ×1     Reply
I wonder if energy can be put into motion with pi, so that would be a lot of theoretical energy
Willem
            ×1     Reply
 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> <logo>
To prove you are not a spam bot, please type "vector" in the box below (case sensitive):
 2022-02-26 
Surprisingly often, people ask me how they can build their own copy of MENACE. If you've been thinking that you'd love your own matchbox-powered machine learning computer but haven't got round to asking me about it yet, then this blog post is just what you're looking for.

Matchboxes

Before building MENACE, you'll need to get hold of 304 matchboxes (plus a few spares in case one gets lost or falls apart). I used these craft matchboxes: they don't have the best build quality, but they're good enough.

304 positions

The positions you need to glue onto the front of the matchboxes can be downloaded from this GitHub repository (first move boxes, third move boxes, fifth move boxes, seventh move boxes). These are sized to fit on matchboxes that have 15mm by 35mm fronts.
I printed each pdf on differently coloured paper to make it easier to sort the matchboxes after getting them out of their box.
If you get differently sized matchboxes, the code used the generate the PDFs is in the same GitHub repository (you'll need to modify these lines). Alternatively, feel free to drop me an email and I will happily adjust the sizes for you and send you the updated PDFs.

Glue

I used PVA glue to stick the positions onto the matchboxes. The printable PDFs have extra tabs of paper above and below the postions that can be glued in to the bottom and inside of the matchbox tray to hold it more securely.
Gluing the positions onto the matchboxes was the most time consuming part of building my copy of MENACE, largely due to having to wait for the glue to dry on a set of matchboxes before I had space for the next batch of them to dry.

Beads

Once you've glued pictures of noughts and crosses positions to 304 matchboxes, you'll need to put coloured beads into each matchbox. For this, I used a large tub of Hama beads (that tub contained orders of magnitude more beads than I needed).
A nice side effect of using Hama beads is that they're designed to be ironed together so making a key to show which colour corresponds to each position is very easy.
I typically start the boxes off with 8 beads of each colour in the first move box, 4 of each colour in the third move boxes, 2 of each in the fifth move boxes, and one of each in the seventh move boxes.

Once you've filled all your matchboxes with the correct number of beads, you're ready to play yout first game against MENACE. I'd love to hear how you get on.
And once you're bored of playing noughts and crosses against your matchboxes, why not build a machine that learns to play Hexapawn, Connect 4, Chess or Go? Or one that plays Nim?
Edit: Added link to the printable pdfs of the positions needed for Hexapawn, made by Dan Whitman.
×5      ×3      ×1      ×3      ×3
(Click on one of these icons to react to this blog post)

You might also enjoy...

Comments

Comments in green were written by me. Comments in blue were not written by me.
Interesting.
Could try a same kind of thing using playing card deck(s)? A(=1)-2-3 4-5-6 7-8-9 maybe 3 decks with different colours on their backs.
Willem
                 Reply
this if great!
Djonwaw
                 Reply
I also read the Martin Gardner article way back when and had two matchbox machines (actually with envelopes instead of matchboxes) play Nim against each other. I don't remember all the details now, except that it got to the point where one would make the first move and the other would immediately resign.
Tim Lewis
×3                 Reply
I made a matchbox machine that learns to play 3x3 Nim almost 50 years ago. I still have it. (Based on Martin Gardner's article)
Tony
×5   ×2         ×1     Reply
 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> <logo>
To prove you are not a spam bot, please type "naidem" backwards in the box below (case sensitive):
 2022-01-08 
Welcome to 2022 everyone! Now that the Advent calendar has disappeared, it's time to reveal the answers and annouce the winners. But first, some good news: with your help, a successful test flight was made and Christmas was saved!
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, reveal the solution and a couple of other interesting bits and pieces.

Highlights

My first highlight is the puzzle from 2 December. I like this puzzle, as it's very difficult (maybe impossible) to work out by brute force (as \(n\) is a huge number), and the solution method I used was satisfying.

2 December

The number \(7n\) has 37 factors (including 1 and the number itself). How many factors does \(8n\) have?
There was a typo in this puzzle. It originally read "38 factors" when it was meant to say "37 factors".

Show answer & extension


My next hightlight is the puzzle from 5 December. It's difficult to find many triangles with perimeter 50 and an integer area, but there's a neat way to solve this without needing to find any.

5 December

How many different isosceles triangles are there whose perimeter is 50 units, and whose area is an integer number of square-units?
(Two triangles that are rotations, reflections and translations of each other are counted as the same triangle. Triangles with an area of 0 should not be counted.)

Show answer


My next highlight is the puzzle from 14 December. This is closely related to the puzzle from 12 December but this time movements to the left are allowed. I enjoyed a nice "aha!" moment when designing this puzzle.

14 December

You start at the point marked A in the picture below. You want to get to the point marked B. You may travel to the right, upwards, or to the left along the black lines, but you cannot pass along the same line segment more than once.
Today's number is the total number of possible routes to get from A to B.

Show answer


My final highlight is the puzzle from 16 December. If you enjoyed this one, you'll probably also enjoy the crossnumber I wrote for Chalkdust issue 13.

16 December

Each clue in this crossnumber is formed of two parts connected by a logical connective: and means that both parts are true; nand means that at most one part is true; or means that at least one part is true; nor means that neither part is true; xor means that exactly one part is true; xnor means that either both parts are false or both parts are true. No number starts with 0.

Show answer

Hardest and easiest puzzles

Once you've entered 24 answers, the calendar checks these and tells you how many are correct. I logged the answers that were sent for checking and have looked at these to see which puzzles were the most and least commonly incorrect. The bar chart below shows the total number of incorrect attempts at each question.
You can see that the most difficult puzzles were those on 5 and 14 December; and the easiest puzzles were on 6, 8, and 9 December.

An Easter egg

The numbers on the doors of the Advent calendar formed a magic square: the numbers in each row, each column, and on the two major diagonals all add up to the same total.
This was spotted by both Colin Beveridge (@icecolbeveridge) and Alex on 15 December.

The winners

And finally (and maybe most importantly), on to the winners: 150 people solved all the puzzles and made a successful test flight. That's down on last year but up on two years ago:
From the correct answers, the following 10 winners were selected:
Congratulations! Your prizes will be on their way shortly.
The prizes this year include 2021 Advent calendar T-shirts. If you didn't win one, but would like one of these, I've made them available to buy at merch.mscroggs.co.uk alongside the T-shirts from previous years.
Additionally, well done to Aaron Stiff, Alan Buck, Alanis, Alek2ander, Alex, Alex Davis, Andrew Brady, Andrew Roy, Andrew Turner, Austin, B Moreland, Becky Russell, Ben Baker, Ben Boxall, Ben Jones, Ben Reiniger, Ben Tozer, Berl Steiner, Brennan Dolson, Brian Carnes, Brian Wellington, Carl Westerlund, Carmen, Cathy Hooper, Chris Hellings, Christopher Adams, Christy Hales, Connie, Corbin Groothuis, CreativeCrocheter, Dan DiMillo, Dan Whitman, Daniel Chiverton, Daniel Low, Dave Budd, David Ault, David Berardo, David Fox, David Kendel, David Mitchell, David P, David and Ivy Walbert, Deborah Tayler, Dylan Madisetti, Elijah Kuhn, Emily Troyer, Eric, Eric Kolbusz, Erik Eklund, Frank Kasell, Franklin Ta, Fred Verheul, Gabriella Pinter, Gary M. Gerken, Gert-Jan de Vries, Gregory Loges, Gwendolenn, Hannah , Harry Allen, Heerpal Sahota, Helen, Helen Bradley, Håkon Balteskard, Iris, Jacob Y, James Chapman, Jarvis, Jay Miller, Jean-Noël Monette, Jean-Sébastien Turcotte, Joe Gage, John Alasdair Warwicker, Jon Palin, Jonathan Chaffer, Jonathan Winfield, Jorge del Castillo, Joseph Wagner, Kai, Karen Climis, Kim Brooks, Kristen Koenigs, Lauren Woolsey, Lemminkäinen, Lewis Dyer, Liz Madisetti, Louis, Luke S, Maggie Orr, Magnus Eklund, Marco van der Park, Maria, Mark Stambaugh, Martin Harris, Martin Holtham, Matt Askins, Matthew, Matthew Schulz, Mels, Michael DeLyser, Mihai Zsisku, Mike Hands, Millie, NIck C, Nadine Chaurand, Naomi Bowler, Nick Keith, Niji, Nikos I., Noah Overcash, Oscar, Friend of Rudolph, patrick fussell, Ray Arndorfer, Rea, Reuben Cheung, Riccardo Lani, Rick Simineo, Robert Brady, Roger Lipsett, Rosie Paterson, Russ Collins, Ruth, Ryan W, Scott, Sean Carmody, Sean Henderson, Seth Cohen, SherlockSage, Simon Schneider, Tamara Brenner, Tarim, Tom Fryers, Tony Mann, tripleboleo, Tristan S, UsrBinPRL, Valentin VĂLCIU, Vinayak, Yasha, Yuliya Nesterova, and Yurie Ito, who all also completed the Advent calendar but were too unlucky to win prizes this time or chose to not enter the prize draw.
See you all next December, when the Advent calendar will return.
                        
(Click on one of these icons to react to this blog post)

You might also enjoy...

Comments

Comments in green were written by me. Comments in blue were not written by me.
I feel compelled to admit that something over a hundred of the checks on day 14 were me after I gave up all hope of figuring out the elegant solution and just started counting up from what I had come up with as a lower limit. I really, really wanted a go at the logic puzzle.
At least my failed attempt to figure that one made me realize that I needed to change my answer to day 12.
Kim
                 Reply
Damn, missed out again! But had a lot of fun (again). I'd guess the reason for there being fewer successful entries this year was the final puzzle being much harder than previous years, rather than a drop in participation. I got worried I still hadn't solved it on the 30th and had to get my whole family involved!
Louis
                 Reply
@Alex: Thanks, I've fixed those links
Matthew
                 Reply
Thanks for the advert calendar this year.

By the way, in the "Hardest and easiest puzzles" section, 4 out of the 5 links to the puzzles are to the 2020 puzzles instead of the 2021 puzzles
Alex
                 Reply
My son and I really enjoyed solving the puzzles each day. As a mom whose son is thousands of miles away, it was a great way to connect each day of Advent. This is our second year and I will definitely order a tee shirt. Keep up the great work!
Liz
×2                 Reply
 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> <logo>
To prove you are not a spam bot, please type "equation" in the box below (case sensitive):
 2021-12-04 
In November, I spent some time designing this year's Chalkdust puzzle Christmas card.
The card looks boring at first glance, but contains 14 puzzles. By writing the answers to the puzzles in the triangles on the front of the card, then colouring triangles containing 1s, 2s, 5s or 6s in the right colour, you will reveal a Christmas themed picture.
If you want to try the card yourself, you can download this printable A4 pdf. Alternatively, you can find the puzzles below and type the answers in the boxes. The answers will automatically be written in the triangles, and the triangles will be coloured...
14 7 1 8 2 5 6 3 10 4 13 12 11 9 9 8 7 0 3 4 0 8 7
                        
(Click on one of these icons to react to this blog post)

You might also enjoy...

Comments

Comments in green were written by me. Comments in blue were not written by me.
@HJ: the smallest one does have 6, and Q4 is correct too. I bought the cards and had good fun solving it myself. I’m glad to find this here though to check my answers as when I did the shading it looked like the picture wasn’t quite right. Thanks for the cards Matthew, I look forward to next year’s - no pressure!
Alec
×1   ×2              Reply
The only one I'm stuck on is #6. I thought I was doing it right but I'm getting a non-integer answer. I'm assuming the heptagon in question is aligned so one of its sides sits on the diameter of the semicircle, and the opposite vertex sits on the curved edge of the semicircle. Is this wrong?
Seth C
                 Reply
The version of the card on this page doesn't check if your answers are correct, so it will colour in any number you enter as long as it has the right number of digits.
Matthew
      ×1           Reply
Wonky solution for #9? On a blank start page, answering "16" gives you red and white puzzle completions, yet we _know_ that 16 is an incorrect answer. Strange?
Attika
                 Reply
@Matthew: Thanks, I figured they did but it was good to get confirmation.
Dan
                 Reply
@Dan: one digit numbers count
Matthew
   ×1              Reply
 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> <logo>
To prove you are not a spam bot, please type "m" then "e" then "d" then "i" then "a" then "n" in the box below (case sensitive):
 2021-11-25 
This year, the front page of mscroggs.co.uk will once again feature an Advent calendar, just like in each of the last six years. 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: a saboteur has infiltrated the stables where Santa's reindeer are kept, and has caused all three of Santa's test flights to be unsuccessful. You need to help Santa have a successful test flight so that he can deliver presents before Christmas is ruined for everyone.
In order to have enough magical power to fly with the sleigh, all nine of Santa's reindeer must be fed their favourite food. The saboteur gave one or more reindeer the wrong food before each of the three test flights, causing the reindeer to be unable to take off.
Behind each day (except Christmas Day), there is a puzzle with a three-digit answer. Each of these answers forms part of a piece of information about the reindeer's favourite foods and what the reindeer were fed before the three test flights. In each clue, "before test flight n" means "immediately before test flight n". Before each test flight, each reindeer was fed exactly one food, and two or more reindeer may have been fed the same food. Two or more reindeer may have the same favourite food. You must use these clues to work out what each reindeer's favourite food is, then complete a test flight by feeding each reindeer the correct food.
You can use this page to attempt up to three test flights per day. An attempted test flight will be successful if and only if all nine reindeer are given their favourite food just before the flight.
Ten randomly selected people who solve all the puzzles, complete a successful test flight, and fill in the entry form behind the door on the 25th will win prizes!
The prizes will include an mscroggs.co.uk Advent 2021 T-shirt. If you'd like one of the T-shirts from a previous Advent, they are available to order at merch.mscroggs.co.uk.
The winners will be randomly chosen from all those who submit the entry form before the end of 2021. 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!
As you solve the puzzles, your answers will be stored. To share your stored answers between multiple devices, enter your email address below the calendar and you will be emailed a magic link to visit on your other devices.
To win a prize, you must submit your entry before the end of 2021. 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!
                        
(Click on one of these icons to react to this blog post)

You might also enjoy...

Comments

Comments in green were written by me. Comments in blue were not written by me.
Thanks Matthew. Really nice to have this daily dose of brain teasing again
Gert-Jan
×7   ×5   ×4   ×4   ×2     Reply
This was a lot of fun - thank you so much for the time and effort that went into this.
Each puzzle was tricky enough to require some thought, but not so tricky as to be discouraging.
Looking forward to next year already!
Si E
×2                 Reply
Thanks, Matthew for all of your hard work to create the Advent Calendar. It was so much fun to work together with my son, even though we live thousands of miles apart. He is a coder and I am definitely old-school math.
Liz
×2   ×1              Reply
I have really enjoyed these puzzles over the last 26 days. I particularly liked the variety of puzzles, some leading me to graphing software, others to my amateur coding, and many just to a piece of paper and a pencil. Some ideas for the classroom too!
Ben
×2   ×1              Reply
@(anonymous): Yes, you should have enough info to work all that out. I recommend using a spreadsheet to keep track of all the feedings.
Matthew
   ×1              Reply
Really struggling with the final logic puzzle this year...is it possible to work out what each reindeer was fed before each test flight as well as their favourite foods? The information seems so little!
(anonymous)
                 Reply
 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> <logo>
To prove you are not a spam bot, please type "tcesib" backwards in the box below (case sensitive):

Archive

Show me a random blog post
 2024 

Feb 2024

Zines, pt. 2

Jan 2024

Christmas (2023) is over
 2023 
▼ show ▼
 2022 
▼ show ▼
 2021 
▼ show ▼
 2020 
▼ show ▼
 2019 
▼ show ▼
 2018 
▼ show ▼
 2017 
▼ show ▼
 2016 
▼ show ▼
 2015 
▼ show ▼
 2014 
▼ show ▼
 2013 
▼ show ▼
 2012 
▼ show ▼

Tags

accuracy christmas mathsjam frobel estimation video games golden spiral oeis rugby binary sobolev spaces graph theory hexapawn captain scarlet dates christmas card computational complexity bodmas stirling numbers php simultaneous equations football tmip programming hats guest posts map projections sound royal institution finite group quadrilaterals weather station platonic solids martin gardner chalkdust magazine logs people maths books pi approximation day dinosaurs mathsteroids wave scattering matt parker error bars inline code dragon curves craft big internet math-off numbers probability newcastle reddit nine men's morris fractals flexagons recursion 24 hour maths the aperiodical ucl signorini conditions final fantasy go pizza cutting pythagoras arithmetic weak imposition pac-man sorting hannah fry interpolation game of life errors matrices chebyshev logic european cup radio 4 triangles numerical analysis wool standard deviation databet london underground logo hyperbolic surfaces data draughts pi braiding inverse matrices python youtube crossnumber anscombe's quartet misleading statistics finite element method royal baby exponential growth sport bempp curvature polynomials electromagnetic field national lottery cambridge asteroids raspberry pi convergence determinants geometry folding paper gather town harriss spiral manchester crochet runge's phenomenon zines game show probability live stream plastic ratio approximation matrix of minors fence posts pascal's triangle datasaurus dozen matrix multiplication gerry anderson latex phd menace speed turtles gaussian elimination fonts talking maths in public realhats puzzles mean reuleaux polygons a gamut of games propositional calculus news bubble bobble light machine learning statistics boundary element methods mathslogicbot coins ternary correlation rhombicuboctahedron manchester science festival edinburgh advent calendar preconditioning javascript chess trigonometry dataset palindromes graphs golden ratio geogebra matrix of cofactors games data visualisation stickers tennis countdown squares london noughts and crosses folding tube maps world cup cross stitch

Archive

Show me a random blog post
▼ show ▼
© Matthew Scroggs 2012–2024