# Blog

## Archive

Show me a Random Blog Post**2017**

### Mar 2017

The End of Coins of Constant WidthDragon Curves II

### Feb 2017

The Importance of Estimation Error### Jan 2017

Is MEDUSA the New BODMAS?**2016**

**2015**

**2014**

**2013**

**2012**

## Tags

folding paper folding tube maps london underground platonic solids 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 pac-man graph theory video games games chalkdust magazine menace machine learning javascript martin gardner reddit national lottery rugby puzzles advent game of life dragon curves fractals pythagoras geometry triangles european cup dates palindromes chalkdust christmas card bubble bobble asteroids final fantasy curvature binary arithmetic bodmas statistics error bars estimation accuracy misleading statistics pizza cutting**2016-12-23 18:38:20**

## Video Game Surfaces

In many early arcade games, the size of the playable area was limited by the size of the screen. To make this area seem larger, or to
make gameplay more interesting, many games used wraparound; allowing the player to leave one side of the screen and return on another.
In Pac-Man, for example, the player could leave the left of the screen along the arrow shown and return
on the right, or vice versa.

Pac-Man's apparent teleportation from one side of the screen to the other may seem like magic, but it is more easily explained by
the shape of Pac-Man's world being a cylinder.

Rather than jumping or teleporting from one side to the other, Pac-Man simply travels round the cylinder.

Bubble Bobble was first released in 1986 and features two dragons, Bub and Bob, who are tasked with
rescuing their girlfriends by trapping 100 levels
worth of monsters inside bubbles. In these levels, the dragons and monsters may leave the bottom of the screen to return at the top.
Just like in Pac-Man, Bub and Bob live on the surface of a cylinder, but this time it's horizontal not vertical.

A very large number of arcade games use left-right or top-bottom wrapping and have the same cylindrical shape as Pac-Man or Bubble Bobble.
In Asteroids, both left-right and top-bottom wrapping are used.

The ships and asteroids in Asteroids live on the surface of a torus, or doughnut: a cylinder around to make its two ends meet up.

There is, however, a problem with the torus show here. In Asteroids, the ship will take amount of time to get from the left of the screen
to the right however high or low on the screen it is. But the ship can get around the inside of the torus shown faster than it can
around the outside, as the inside is shorter. This is because the screen of play is completely flat, while the inside and outside halves of
the torus are curved.

It is impossible to make a flat torus in three-dimensional space, but it is possible to make one in
four-dimensional space.
Therefore, while Asteroids seems to be a simple two-dimensional game, it is actually taking place on a four-dimensional surface.

Wrapping doesn't only appear in arcade games. Many games in the excellent Final Fantasy series use wrapping on the world maps, as shown here
on the Final Fantasy VIII map.

Just like in Asteroids, this wrapping means that Squall & co. carry out their adventure on the surface of a four-dimensional flat torus.
The game designers, however, seem to not have realised this, as shown in this screenshot including a spherical (!) map.

Due to the curvature of a sphere, lines that start off parallel eventually meet. This makes it impossible to map
nicely between a flat surface to a sphere (this is why so many different map projections exist), and heavily complicates the task of making
a game with a truly spherical map. So I'll let the Final Fantasy VIII game designers off. Especially since the rest of the game is such
incredible fun.

It is sad, however, that there are no games (at leat that I know of) that make use of the great variety of different wrapping rules available. By only
slightly adjusting the wrapping rules used in the games in this post, it is possible to make games on a variety of other surfaces,
such a Klein bottles or Möbius strips as shown below.

If you know of any games make use of these surfaces, let me know in the comments below!

### Similar Posts

Optimal Pac-Man | Proving Pythagoras' Theorem | The Mathematical Games of Martin Gardner | MENACE |

### Comments

Comments in green were written by me. Comments in blue were not written by me.

**2016-12-24**

See: http://zenorogue.blogspot.com.au/2012/03/hyperbolic-geometry-in-hyperbolic-rogue.html

maetl

**2016-12-24**

zaratustra

**2016-12-24**

F-Zero X had a more trivial track that was just the outward side of a regular ring, but it was rather weird too, because it meant that this was a looping track that had no turns.

Olaf

**2016-12-24**

gaurish

**Add a Comment**

**2016-12-20 09:21:56**

## Christmas Card 2016

Last week, I posted about the Christmas card I designed on the Chalkdust blog.

The card looks boring at first glance, but contains 12 puzzles. Converting the answers to base 3, writing them in the boxes on the front, then colouring the 1s green and 2s red 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) | ||||||||

1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |

2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |

3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |

4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |

5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |

6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |

7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |

8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |

9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |

10 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |

11 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |

12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

- The square number larger than 1 whose square root is equal to the sum of its digits.
- The smallest square number whose factors add up to a different square number.
- The largest number that cannot be written in the form \(23n+17m\), where \(n\) and \(m\) are positive integers (or 0).
- Write down a three-digit number whose digits are decreasing. Write down the reverse of this number and find the difference. Add this difference to its reverse. What is the result?
- The number of numbers between 0 and 10,000,000 that do not contain the digits 0, 1, 2, 3, 4, 5 or 6.
- The lowest common multiple of 57 and 249.
- The sum of all the odd numbers between 0 and 66.
- One less than four times the 40th triangle number.
- The number of factors of the number \(2^{756}\)×\(3^{12}\).
- In a book with 13,204 pages, what do the page numbers of the middle two pages add up to?
- The number of off-diagonal elements in a 27×27 matrix.
- The largest number, \(k\), such that \(27k/(27+k)\) is an integer.

### Similar Posts

Christmas (2016) is Over | Christmas (2016) is Coming! | Christmas (2015) is Over | Christmas (2015) is Coming! |

### Comments

Comments in green were written by me. Comments in blue were not written by me.

**2016-12-20**

Dan Whitman

**2016-12-20**

Matthew

**2016-12-20**

Dan Whitman

**Add a Comment**

**2016-11-27 15:57:54**

## Christmas (2016) is Coming!

This year, the front page of mscroggs.co.uk will feature an advent calendar, just like last year. Behind each door, there will be a puzzle with a three digit solution. The solution to each day's puzzle forms part of a murder mystery logic puzzle in which you have to work out the murderer, motive, location and weapon used: the answer to each of these murder facts is a digit from 1 to 9 (eg. The murderer could be 6, the motive 9, etc.).

As you solve the puzzles, your answers will be stored in a cookie. 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 on Christmas Day. Runners up will then be chosen from those who submit the correct answer on Christmas Day, then those who submit the correct answer on Boxing Day, then the next day, and so on. As the winners will be chosen randomly,

**there is no need to get up at 5am on Christmas Day this year**!The winner will win this array of prizes:

I will be adding to the pile of prizes throughout December. Runners up will get a subset of the prizes. The winner and runners up will also win an mscroggs.co.uk 2016 winners medal:

To win a prize, you must submit your entry before the end of 2016. Only one entry will be accepted per person. Once ten correct entries have been submitted, I will add a note here and below the calendar. 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!

Edit: added picture of this year's medals.

Edit: more than ten correct entries have been submitted, list of prize winners can be found here.
You can still submit your answers but the only prize left is glory.

### Similar Posts

Christmas (2016) is Over | Christmas (2015) is Over | Christmas (2015) is Coming! | Christmas Card 2016 |

### Comments

Comments in green were written by me. Comments in blue were not written by me.

**2016-12-27**

Matthew

**2016-12-27**

Another Matthew

**2016-12-25**

Lyra

**2016-12-25**

Louis

**2016-12-25**

Matthew

**Add a Comment**

**2016-10-08 12:39:14**

## Logical Contradictions

During my EMF talk this year, I spoke about @mathslogicbot, my Twitter bot that is working its way through the tautologies in propositional calculus. My talk included my conjecture that the number of tautologies of length \(n\) is an increasing sequence (except when \(n=8\)). After my talk, Henry Segerman suggested that I also look at the number of contradictions of length \(n\) to look for insights.

A contradiction is the opposite of a tautology: it is a formula that is False for every assignment of truth values to the variables. For example, here are a few contradictions:

$$\neg(a\leftrightarrow a)$$
$$\neg(a\rightarrow a)$$
$$(\neg a\wedge a)$$
$$(\neg a\leftrightarrow a)$$
The first eleven terms of the sequence whose \(n\)

$$0, 0, 0, 0, 0, 6, 2, 20, 6, 127, 154$$
^{th}term is the number of contradictions of length \(n\) are:This sequence is A277275 on OEIS. A list of contractions can be found here.

For the same reasons as the sequence of tautologies, I would expect this sequence to be increasing. Surprisingly, it is not increasing for small values of \(n\), but I again conjecture that it is increasing after a certain point.

### Properties of the Sequences

There are some properties of the two sequences that we can show. Let \(a(n)\) be the number of tautolgies of length \(n\) and let \(b(n)\) be the number of contradictions of length \(n\).

First, the number of tautologies and contradictions, \(a(n)+b(n)\), (A277276) is an increasing sequence. This is due to the facts that \(a(n+1)\geq b(n)\) and \(b(n+1)\geq a(n)\), as every tautology of length \(n\) becomes a contraction of length \(n+1\) by appending a \(\neg\) to be start and vice versa.

This implies that for each \(n\), at most one of \(a\) and \(b\) can be decreasing at \(n\), as if both were decreasing, then \(a+b\) would be decreasing. Sadly, this doesn't seem to give us a way to prove the conjectures, but it is a small amount of progress towards them.

### Similar Posts

Logic Bot, pt. 2 | Logic Bot | How OEISbot Works | Raspberry Pi Weather Station |

### Comments

Comments in green were written by me. Comments in blue were not written by me.

**Add a Comment**

**2016-10-06 16:07:36**

## Palindromic Dates

Thanks to Marc, I noticed that today's date is a palindrome in two different date formats—DMMYY (61016) and DMMYYYY (6102016).

This made me wonder when there will be another date that is palindromic in multiple date formats, so I wrote a Python script to find out.

Turns out there's not too long to wait: 10 July 2017 will be palindromic in two date formats (MDDYY and MDDYYYY). But before that, there's 1 July 2017, which is palindromic in three date formats (YYMMD, YYMD and MDYY). Most exciting of all, however, is 2 February 2020, which is palindromic in 7 different formats!

The next palindromic dates are shown in the following table. It will update as the dates pass.

\(n\) | Next day with \(\geq n\) palindromic formats | Formats |

1 | 1 July 2017 | YYMMD,YYMD,MDYY |

2 | 1 July 2017 | YYMMD,YYMD,MDYY |

3 | 1 July 2017 | YYMMD,YYMD,MDYY |

4 | 2 February 2020 | YYYYMMDD,DDMMYYYY,MMDDYYYY,YYYYMDD,YYMDD,DDMYY,MMDYY |

5 | 2 February 2020 | YYYYMMDD,DDMMYYYY,MMDDYYYY,YYYYMDD,YYMDD,DDMYY,MMDYY |

6 | 2 February 2020 | YYYYMMDD,DDMMYYYY,MMDDYYYY,YYYYMDD,YYMDD,DDMYY,MMDYY |

7 | 2 February 2020 | YYYYMMDD,DDMMYYYY,MMDDYYYY,YYYYMDD,YYMDD,DDMYY,MMDYY |

A full list of future palindromic dates can be found here.

### Similar Posts

Dragon Curves II | Logical Contradictions | Dragon Curves | How OEISbot Works |

### Comments

Comments in green were written by me. Comments in blue were not written by me.

**Add a Comment**

2016-12-25