# Blog

## Archive

Show me a Random Blog Post**2017**

### Jun 2017

Big Ben Strikes Again### 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 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 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 captain scarlet gerry anderson light sound speed**2016-10-08**

## 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.

**2016-10-06**

## 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 | 2 October 2017 | YYYYMMD |

2 | 7 October 2017 | DMMYYYY,DMMYY |

3 | 1 August 2018 | 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-09-06**

## Tube Map Kaleidocycles

After my talk at EMF 2014, I was sent a copy of

*MC Escher Kaleidocycles*by Doris Schattschneider and Wallace Walker (thanks Bob!). A kaleidocycle is a bit like a 3D flexagon: it can be flexed to reveal different parts of itself.In this blog post, I will tell you how to make a kaleidocycle from tube maps.

### You Will Need

- 12 tube maps
- glue

### Making the Modules

First, fold the cover of a tube map over. This will allow you to have the tube
map (and not just its cover) on the faces of your shape.

With the side you want to see facing down, fold the map so that two
opposite corners touch.

For this step, there is a choice of which two corners to connect: leading to
a right-handed and a left-handed piece. You should make 6 of each type for your
kaleidocycle.

Finally, fold the overhanding bits over to complete your module.

The folds you made when connecting opposite corners will need to fold both
ways when you flex your shape, so it is worth folding them both ways a few times
now before continuing.

### Putting it Together

Once you have made 12 modules (with 6 of each handedness), you are ready
to put the kaleidocycle together.

Take two tube maps of each handedness and tuck them together in a line.
Each map is tucked into one of the opposite handedness.

The four triangles across the middle form a net of a tetrahedron. Complete
the tetrahedron by putting the last tab into the first triangle. Glue these
together.

Take two more tube maps of the opposite handedness to those at the top of the tetrahedron.
Fit them into the two triangles poking out of the top of the tetrahedron to
make a second tetrahedron.

Repeat this until you have five connected tetrahedra. Finally, connect the
triangles poking out of the top and the bottom to make your kaleidocycle.

### Similar Posts

Tube Map Stellated Rhombicuboctahedron | Tube Map Platonic Solids, pt. 3 | Tube Map Platonic Solids, pt. 2 | Tube Map Platonic Solids |

### Comments

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

**Add a Comment**

**2016-07-04**

## Solving the Cross Diagonal Cover Problem

In five blog posts
(1,
2,
3,
4,
5)
Gaurish Korpal present the Cross diagonal cover problem, some ideas about how to solve it and some conjectures.
In this post, I will present my solution to this problem. But first, the problem itself:

Draw with an \(m\times n\) rectangle, split into unit squares. Starting in the top left corner, move at 45° across
the rectangle. When you reach the side, bounce off. Continue until you reach another corner of the rectangle:

How many squares will be coloured in when the process ends?

### Restating the Problem

When I first saw this problem, it reminded me of Rebounds, a puzzle I posted here
in 2014. To restate the problem in a similar way, we place a point in the centre of each unit square,
then creating a second grid. I will call this the dual grid. The original problem is equivalent to asking, if a line bounces
around the dual grid, how many corners will it pass through.

It it worth noting here that the dual grid is \(n-1\times m-1\): each side is one shorter than the original grid.

A corner cannot be travelled over more than twice: otherwise, the line would be retracing its past path; to do this requires it to have
already hit a corner of the rectangle. Therefore we can calculate the number of distinct corners travelled to using:

$$\text{Distinct corners visited} = \text{Corners visited}-\text{Corners visited twice}$$
### Introducing Mirrors

When I solved Rebounds, I imagined the line passing through mirror images of the rectange, rather then bouncing.
For our example above, it would look like this:

Looking at the puzzle in this way, it can be seen that the line will travel through \(\mathrm{lcm}(n-1,m-1)\) squares, and so hit \(\mathrm{lcm}(n-1,m-1)+1\)
corners (the \(+1\) appears due to fence panels and fence posts).
We have shown that:

$$\text{Corners visited}=\mathrm{lcm}(n-1,m-1)+1$$
### Collisions in the Mirror

To solve the problem, we need to work out how many corners are visited twice; or the number of times the line crosses itself in the rectangle.

To do this, imagine the mirror images of the red line in the mirrors. Ignoring the images parallel to the red line, and terminating
the lines when they hit the red line gives the following diagram:

I have added extra rectangles to the diagram so that all the reflections that hit the red line and their starting points can be seen.
The diagonal black line has been added because all lines outside that clearly cannot intersect the red line.
We now need to justify two claims:

- Each intersection of a red line and a green line corresponds to the line bouncing off the side of the rectangle or crossing itself (in the dual rectangle). Each bounce or crossing matches with exactly one red-green intersection.
- The green lines starting on the outer border are those that correspond to the bounces.

The first claim can be seen by reflecting the green lines and the parts of the red line they hit back into the top left rectangle.

The second claim can be shown in two parts:

First, each line starting from the border will meet the red line on the edge of a rectangle:
this is because the green lines all start a multiple of two rectangles away, and meet at half this distance away (and half a multiple of two
is a whole number).

Conversely, if a red line meets a green line at the edge of a rectangle, then the reflection of the red line in the edge (ie. the green line)
must go back to a starting point on the boundary.

These two claims show that the points where the line crosses itself in the dual rectangle match up one-to-one with the interior points
at which the green lines start. So if we can count these points, we can solve the problem.

### Counting the Interior Points

The green lines will start from all points that are a multiple of two rectangles (in both directions) away from the top left. The reason for
this can be seen by reflecting the first little bit of the red line in all the mirrors:

We see that the perpendicular green lines that we are interested in, plus many other irrelevant lines, start from a grid of points on the
corner of every other rectangle. To count these points, we will extend them into the full square:

To make for clearer counting, I have not drawn the unit squares.

Alternatively, this square can be thought of as being made up from two copies of the triangle.

We next notice that these points can never lie on the diagonal (the diagonal drawn in the diagram): a green point lying on the diagonal would imply
that the red line met a corner before it did. Taking out the lines on which the green dots never lie, we get:

We can now count the green dots. In the square above, there are
\(\displaystyle\frac{\mathrm{lcm}(m-1,n-1)}{m-1}\) rectangles vertically and
\(\displaystyle\frac{\mathrm{lcm}(m-1,n-1)}{n-1}\) rectangles horizontally.
Therefore there are
\(\displaystyle\frac{\mathrm{lcm}(m-1,n-1)}{m-1}-1\) columns of green dots and
\(\displaystyle\frac{\mathrm{lcm}(m-1,n-1)}{n-1}-1\) rows of green dots. (Again, we take one due to fence posts and fence panels.)

Of these green dots, half are in the triangle of interest, so:

$$\text{Corners visited twice} = \frac12\left(\frac{\mathrm{lcm}(m-1,n-1)}{m-1}-1\right)\left(\frac{\mathrm{lcm}(m-1,n-1)}{n-1}-1\right)$$
### Putting it together

We can now put the two parts together to get:

$$\text{Distinct corners visited} = \mathrm{lcm}(m-1,n-1)+1 - \frac12\left(\frac{\mathrm{lcm}(m-1,n-1)}{m-1}-1\right)\left(\frac{\mathrm{lcm}(m-1,n-1)}{n-1}-1\right)$$
And we have solved the problem.

#### Example

For the \(4\times6\) rectangle given, our formula gives:

$$\text{Distinct corners visited} = \mathrm{lcm}(3,5)+1 - \frac12\left(\frac{\mathrm{lcm}(3,5)}{3}-1\right)\left(\frac{\mathrm{lcm}(3,5)}{5}-1\right)$$
$$= 15+1 - \frac12(5-1)(3-1)$$
$$= 16 - 4 = 12$$
This is correct:

### Disproving the Conjecture

In Gaurish's most recent post, he gave the following
conjecture:
The highest common factor (or greatest common divisor) of \(m\) and \(n\) always divides the number of coloured squares.

After trying to prove this for a while, I found that me attempted proof
required that \(\mathrm{hcf}(n-1,m-1)^2-1\) is a multiple of \(\mathrm{hcf}(n,m)\).
However this is not in general true (eg. 15,5).

In fact, 15,5 provides us with a counterexample to the conjecture:

In this diagram, 26 squares are coloured. However \(\mathrm{hcf}(15,5)=5\)
and 5 is not a factor of 26.

### Similar Posts

Christmas (2016) is Over | Christmas Card 2016 | Christmas (2016) is Coming! | The Mathematical Games of Martin Gardner |

### Comments

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

**Add a Comment**

**2016-06-29**

## Braiding, pt. 2

### Two Results and a Conjecture

In this blog post, I will present two conditions that cause a braid to
fail, with reasons why. You can read more about the method of braiding we
are talking about here, in part one.

In this post, we will consider the (\(a\),\(b\)) braid with \(a\) slits, taking the \(b\)th thread each time.

### Some Strands Are Never Moved

If some of the strads are never moved in the braiding process, then the
braid will fail. To find out when this happens, I will draw lines to show the
moves that are made. For the (8,3) braid, the first move is:

Then the second move is:

And so on until we get:

For the (8,3) braid, every strand is moved at some point in the cycle.

For the (6,2) braid, however, we get the following diagram:

Now some strands are not moved and the braid will fail.

To find out when all the slits are visited, I first label the slots:
the slot which starts empty is 0, then I continue numbering anti-clockwise.
This numbering puts all the multiples of \(a\) at the bottom slot.

Now let's look at which slots we visit. We start at 0, then visit \(b\), then \(2b\), then \(3b\) and so on. We visit
all the multiples of \(b\).

Therefore we will reach the bottom slot again and finish our loop when we reach a common multiple of
\(a\) and \(b\). The first time this happens will be at the lowest common multiple, or \(\text{lcm}(a,b)\).

On the way to this slot, I visited one slot for every \(a\) we passed, so the number of slots I have visited is:

$$\frac{\text{lcm}(a,b)}{a}$$
I will visit every slot if:

$$\frac{\text{lcm}(a,b)}{a}=b$$
Or, in other words, if \(\text{lcm}(a,b)=ab\). This is true when, \(a\) and
\(b\) have no common factors, or are coprime: often written \(\text{hcf}(a,b)=1\).

Therefore, if \(a\) and \(b\) are not coprime, then the braid sill fail.

### The Braid Results in Twists

Some braids, for example (13,3), result in a groups of twisted strands rather than a whole braid.

To see when this happens, imagine the (\(a\),\(b\)) braid just after a thread has been moved. Call the currently
empty slit 0. The threads at positions \(a-1\), \(a-2\), ..., \(a-b+1\) have just been jumped over. If, from these threads,
the thread at \(a-1\) is moved before the others, then this group of threads will form into a twist.

This will happen when \(b\) is a factor of \(a-1\), as this leads to \(a-1\) being reached before slit 0 is passed again.
Therefore is \(b\) is a factor of \(a-1\), the braid will not work.

### A Conjecture

In this post, I have shown that if \(a\) and \(b\) are not coprime or if \(b\) is a factor of \(a-1\), then the
braid will fail. From the examples I have tried (I'm compiling them here), it seems that
all other braids will work. It seems difficult, however, to explain why all other braids work. I'd love to hear your ideas
on how this could be shown.

### What's Next?

A have a few leads to follow up on, which may lead to a proof or counterexample.
Vicky
Neale has found instructions for making
Kumihimo braids. They
are created in a very similar way to my cardboard braids, so looking into
the patterns you can make with them may be helpful.

@mathforge
has found a mathoverflow
page where quotients of the braid group are discussed.
I know from past discussions that the braiding group is not exactly what I'm
looking for—for example, the multiple twists is considered a member of
the braiding group. However, finding the correct way to adapt the group may solve
the problem. Looks like I may have to polish up on my group theory...

Until a proof of or counterexample to the conjecture turns up, we seem to be at the end of the braiding puzzle.
But do not fret, there is a related problem that we can now spend some time on.

In the braids we've done so far, we have taken the same jump every time. But more complicated rules could be used:
for example, we could alternate between taking the third thread and the second thread. I'm yet to find a rule with different jumps
that works, so let me know if you find one before me!

### Similar Posts

Braiding, pt. 1 | Electromagnetic Field Talk | Big Ben Strikes Again | The End of Coins of Constant Width |

### Comments

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

**Add a Comment**

Add a Comment