post

Review: Mathematical T-shirt

I was recently lucky enough to pick up a free mathematical T-shirt from the University of Essex. Following the success earlier this year of my mathematical socks review, they will surely be happy to see their T-shirt under the spotlight this time.

Mathematical content

1. Calculator


A strong first image: pi is displayed to 11 decimal places, and correctly rounded at the end. But given there is no pi button, someone has had to type this in themselves. Is this a worthy use of time? Also note the lack of a square root button, a function common on even the weakest calculator models. Solid memory functionality as well.

However, the elephant in the room is the large number of digits on the screen compared to the limited button set. Of course, standard calculators only come with eight digits and this is hard to ignore.

Maths grade: B. Good idea but poorly executed.

2. Equation


$x = -2$.

Maths grade: C. Possibly challenging for a Year 7 student.

3. Delta del-squared f(x)


Finally some harder mathematics! The Laplacian can be represented by either $\Delta$ or $\nabla^2$ and the choice to do both here is a little unorthodox. Nonetheless, this double Laplacian
\[\Delta\nabla^2 f(\boldsymbol{x}) = \nabla^4 f(\boldsymbol{x}),\]
set equal to zero, can be found haunting the work of many an applied maths PhD student.

Naturally the $x$ really ought to be a vector $\boldsymbol{x}$, and the f is really too big, but otherwise…

Maths grade: A. The conical nature of the $\nabla$ suggests cylindrical coordinates which makes this a good challenge.

4. Abacus


Do you know how to use an abacus? Well that’s OK, neither do they. On the plus side, there are ten beads per line which is pretty standard. But beads in the middle of the lines?! Lunacy! Perhaps even more damning here is the lost potential for a good 5318008 joke.

Maths grade: D. Even the ancients would be stumped.

5. Graph and compasses


Perhaps this pair of compasses has been used to draw this graph. Actually, this is unlikely because the legs of the compass are different lengths, which you can tell below when the red, left leg line is shorter than the green, right leg line. One would have considerable trouble trying to use this apparatus.

Looking at the graph, traditionally the numbers, on the y-axis, say, line up with the little markings, but here the approach is a little more relaxed. What this graph is of is a little hard to say. The axes are probably irrelevant. It looks a bit like the first two terms of a Fourier transform of something, but that first peak seems a little too pointy to be a smooth function.

Maths grade: C. Perhaps the compasses and graph are not related at all.

6. Ruler


It is a matter of some debate whether the natural numbers, $\mathbb{N}$, includes 0 or not. What is not up for debate is that rulers really ought to start with 0. Also can you name a unit which is commonly split into ninths? (Count the little lines…)

Maths grade: F.

7. Rocks


Jesus Christ, Marie, they’re minerals.

Joke grade: D. No-one is still watching Breaking Bad.

Fashion

Grey T-shirts have never gone out of style. Pair with some colourful shorts for a well-balanced look.

Fashion grade: A

Fit

Only comes in one size (large), which will not please at least half the market, and is not particularly flattering if you want to show off your beach body. That said, this bagginess allows for the ‘mathematics’ to be more easily read.

Fit grade: B

Utility

Camden High Street

Lovely horrible Camden High Street. Image: public domain

Surprisingly light, making it ideal for hot weather. I took the T-shirt out for a walk up and down the fashionable Camden High Street. It was an uncomfortable journey, mostly because this area is always full of tourists who think that Camden is as trendy as it was in the nineties, vying with large amounts of traffic trying to leave London by the north. However, the inexpensive, thin fabric kept me cool and well aerated.

Utility grade: A

Overall review

Light and inoffensive on first view. But if you are going to take it out for a walk, expect ridicule for its poor mathematical content, so probably best for light housework during the summer months. If you’re looking for a more mathematical T-shirt, you can order one from Chalkdust.

post

How many quadratics factorise?

Write down a quadratic—any quadratic you like, but let’s say it should have integer coefficients between 0 and 20. What is the probability that it factorises?

What I really mean is will it factorise ‘over the integers’. So
\[x^2 + 5x + 6 = (x+2)(x+3)\]is in, but
\[x^2 + 2x + 2 = (x + [1-\mathrm{i}]) (x + [1 + \mathrm{i}]) \quad \text{and} \quad x^2 – 2 = (x-\sqrt{2})(x+\sqrt{2})\]are out.

To make it simpler, we will look for quadratics of the form
\[x^2 + bx + c\]where $b$ and $c$ are both positive. Try extending it to negative coefficients yourself afterwards!

Let’s plot a graph of $c$ against $b$, and colour in the values where $x^2+bx+c$ factorises. We’re going to colour these in with a 1×1 box where the bottom-left corner is at the relevant coordinate.

Quadratics of the form x² + bx + c which factorise, for b,c ≤ 20

Quadratics of the form $x^2 + bx + c$ which factorise, for $b,c \leq 20$.


Continue reading

post

Top 10 emoji for use in mathematics

Maths loves symbols. Everyone loves emoji. It’s 2017 and time we brought the two together. To get you started, here are our top ten emoji for use in mathematics!

10.

📐

Don’t leave home without one: it’s the nifty 45° set square. What better reminder is there that
$$\sin\left(\frac{\pi}{4}\right) = \frac{\sqrt{2}}{2}, \qquad \cos\left(\frac{\pi}{4}\right) = \frac{\sqrt{2}}{2}, \qquad \tan\left(\frac{\pi}{4}\right) = 1$$ 📐

9.

🏹

Perfect for popping over a letter to make it a vector, it’s the bow and arrow:

a.b = ab cos arrow

Continue reading

post

Why self-service machines give such awful change

You’ve got this down. You’ve bagged your groceries, swiped your Nectar card, and you’ve paid with a fiver. You’re due 55p change. Surely you’ll get a 50p and 5p coin, right? Nice and light in your pocket.

Wrong!

Self-checkout fans will know that you really get 20p, 20p, 5p, 5p, 5p.

Why?!

Last week, we advocated a new £1.23 coin in place of the new pound coin in order to reduce the number of coins you get in change. The answer to this self-service riddle is related.

Why do self-service checkouts give so much change?

Although supermarket self-checkouts accept all circulating coins, customers normally find that they only give out six possible coins as change. Normally these are

1p — 2p — 5p — 20p — £1 — £2.

They don’t give out 10p or 50p coins.

This is because self-checkout machines don’t reuse coins they are given. Instead, all the coins you put in are collected into a bucket [the brand that Sainsbury’s use call it a recycling acceptor: pdf]. The machines have separate tubes for coins as change, which are filled by staff with coins which have been checked by the bank as genuine.

The mechanisms for these tubes are expensive and prone to jamming. Combine this with the fact that many machines are based on US designs, where there are far fewer denominations of coin:

1¢ — 5¢ — 10¢ — 25¢ — $1,

you end up with machines with fewer coin tubes than types of coin.

This means that 99p in change (for example) requires nine coins with the current choice of coins to fill the machine with. But there’s a better choice of six coins. Suppose a machine has only n coin tubes to give out change. Which coins should it pick?

Coin tubes Coins Number expected
2 1p, 20p 21.5
3 1p, 20p, 50p 10.9
4 1p, 5p, 20p, £1 7.5
5 1p, 5p, 20p, 50p, £2 6.2
6 (self-checkout) 1p, 2p, 5p, 20p, £1, £2 (current) 5.9
1p, 2p, 5p, 20p, 50p, £2 (improvement) 5.4
7 1p, 2p, 5p, 10p, 20p, 50p, £2 or
1p, 2p, 5p, 20p, 50p, £1, £2
5.0

The message here is that £1 and 10p coins are less efficient than any other coin. The £1 coin, for example, is made up of only two 50ps, and it’s only half of £2.

So the self-checkout machines almost have it right: but if we’re going to use self-checkout machines with a small number of slots to give out change, we should swap the £1 coin tube for the 50p coin tube: then 99p is only six coins, instead of nine.

There is a good reason to keep £1 coins though: if you run out of £5 notes—a very common occurrence given that cash machines only give out £10 and £20 notes—you want to keep back your £2 coins for that. Maybe they have it right after all.

Speaking of Americans…

Are quarters better than 20-cent coins?

20-cent and 25-cent coins

Euro 20c vs Canadian 25¢. Fight!

Nearly all currencies have coin denominations starting with 1s and 5s. The differences can be found in between.

20-cent coins are favoured by most modern currencies (UK, Euro, most Commonwealth), whereas some older ones favour the 25-cent coin (US/Canada, Denmark, Thailand, pre-Euro Netherlands).

Is one more efficient than the other?

Coins Number expected Weight expected
1p, 2p, 5p, 10p, 20p, 50p, £1, £2 4.61 32.8g
1p, 2p, 5p, 10p, 25p, 50p, £1, £2 4.61 33.6g

Answer: they are equally efficient! Although, if you made a 25p coin weigh the same as a 20p coin, the expected weight is a little higher. (Fun fact: the UK used to have a 25p coin… but it was the same size/weight as the £5 coin.)

Programming this yourself

As with the £1.23 post, I am doing this all with a bit of Python code I found on StackExchange:

def get_min_coins(coins, target_amount):
    n = len(coins)
    min_coins = [0] + [sys.maxint] * target_amount
    for i in range(1, n + 1):
        for j in range(coins[i - 1], target_amount + 1):
            min_coins[j] = min(min_coins[j - coins[i - 1]] + 1, min_coins[j])
    return min_coins

This is nice code because it avoids the lazy approach (‘greedy algorithm’) of trying the highest coin first and then dealing with the remainder. Such a lazy approach is quick but fails if you have coins of 1p, 3p, 4p and want to make 6p. The lazy approach would give you 4p, 1p, 1p; but of course the best option is 3p, 3p.

Have a play with the code yourself. Do share below if you find anything interesting.

Bonus: How does the new £1 coin square off against the old one?

post

Forget a new £1 coin, we need a £1.23 coin

Tomorrow, the Royal Mint—producer of British coins—is introducing a new, thinner, dodecagonal £1 coin. But they’re missing a trick. To cut the amount of change in our pockets, we don’t need a lighter £1 coin: we should replace it with a £1.23 coin.

New one pound coin

Coming soon to your pocket… the new pound coin. (Royal Mint)

The question you need to ask is: When you pay for something in a shop with a banknote, how many coins do you expect to get back in change? How much heavier will they make your purse?

The answers are different for different countries, so we’ve worked it out for your country as well!

How many coins do you expect to receive in change?

The smallest banknote in the UK is the meaty see-through £5 note. So if you pay with a note, you would hope to receive somewhere between 1p and £4.99 in coin change back. Supposing an even distribution of prices and that cashiers always give you the most efficient change (next week’s blog: when self-service machines don’t give efficent change), on average, then, how many coins do you expect to receive?

We’ve done the calculation for a few countries, for change amounts up to the smallest banknote.
You can find the code we’ve used at the bottom of the page.
Average number of coins expected as change in each country
Some variants on the UK system are highlighted in pink. Switching the £1 coin for a £1.23 coin reduces the coin expectancy by about half a coin, from 4.61 to 4.07: the best-performing option.

Some other observations:

  • Some countries do really well (India) because banknotes are used almost exclusively.
  • Low-scoring countries have abolished their smallest denominations (pennies etc.)
  • The US only has 4 common coins, yet averages the same number of coins as the UK with 8.
  • The pre-decimal UK system (pounds, shillings and pence) performs almost as efficiently as the current UK system.
  • The Harry Potter system (29 knuts in a sickle, 17 sickles in a galleon) is ridiculous.

And what about the weight of these expected coins in our pockets?

Average weight of coins expected as change in each country
Observations:

  • The UK has, on average, the heaviest coins out of the top 20 circulating world currencies. Removing 1p and 2p would reduce the weight by 20%.
  • Despite expecting the same number of coins in the UK and US, the weight of US coins is about half that of the UK.
  • Australian coins are heavy because their sizes are the same as pre-decimal UK ones.

If we could add just one coin, what would it be?

Suppose we were to keep all our coins, but could add one more. Which denomination would reduce the average number of coins you receive in change the most?
Average number of coins expected as change  if you add a new coin of a certain value
Adding a £1.33 or £1.37 coin would reduce the average number of coins from 4.61 to 3.93.

If you could choose any coins, what would they be?

So suppose we start over. A whole new set of coins up to £5. Designed to be the most efficient in terms of change. For a set number of coins, what would they be?

Number Coins Number expected
2 1p, 22p or 1p, 23p 21.3
3 1p, 14p, 61p 9.98
4 1p, 7p, 57p, 80p 6.82
5 1p, 6p, 20p, 85p, £1.21 5.45

Programming this yourself

I do this all with a bit of Python code I found on StackExchange:

def get_min_coins(coins, target_amount):
    n = len(coins)
    min_coins = [0] + [sys.maxint] * target_amount
    for i in range(1, n + 1):
        for j in range(coins[i - 1], target_amount + 1):
            min_coins[j] = min(min_coins[j - coins[i - 1]] + 1, min_coins[j])
    return min_coins

This is nice code because it avoids the lazy approach (‘greedy algorithm’) of trying the highest coin first and then dealing with the remainder. Such a lazy approach is quick but fails if you have coins of 1p, 3p, 4p and want to make 6p. The lazy approach would give you 4p, 1p, 1p; but of course the best option is 3p, 3p.

Questions to investigate

Next week we’ll use this code to answer the age-old question of

  • Why do supermarket self-checkout machines give such terrible change?

Plus, we’ll ask are quarters are better than 20-cent pieces?

Have a play with the code yourself. Comments are open below when you find something interesting.

Bonus: old £1 coin v new £1 coin

post

Review: Mathematical socks

This Christmas, I received mathematical socks. A great gift, you might think. But is it good maths or fake maths? Can you wear them and be taken mathematically seriously? Thus I have undertaken this important review.

Unboxing

The socks come beautifully packaged and folded, tied together with a fancy red label, which gives a nifty standing suggestion.

Beautifully packed mathematical socks

Beautifully packed mathematical socks


Unboxing grade: A

Mathematical content

There are five distinct mathematical items on the socks. I have graded them individually. The younger reader may wish to refer to this helpful guide to converting to new grades.

1. Proof of Pythagoras

Sock v Elements

Pythagoras’ Theorem proved on a sock (left) and in the Elements (right)

Continue reading

post

Switching sides in a matrix equation

Suppose you’ve got a simple matrix equation, $\boldsymbol{y} = \boldsymbol{\mathsf{A}x}$. Now switch some elements of $\boldsymbol{y}$ with some elements of $\boldsymbol{x}$. How does the matrix change? 

This problem seems like it should be neat: if we switch all the elements of $\boldsymbol{y}$ with all the elements of $\boldsymbol{x}$, then our new matrix is just $\boldsymbol{\mathsf{A}}^{-1}$. Since we have a full description of how the elements of $\boldsymbol{y}$ depend on $\boldsymbol{x}$ (and vice versa), switching only some elements should involve some sort of neat part-inverse of $\boldsymbol{\mathsf{A}}$. But I’m yet to find a neater description of the new matrix than what I’ve worked out below. Surely linear algebra has a method for this? Comment below if you can beat this.

Let me be more clear with the problem by using an example. Consider the matrix equation $$\begin{pmatrix}y_1 \\ y_2 \\ y_3 \\ y_4\end{pmatrix} =
\boldsymbol{\mathsf{A}}
\begin{pmatrix}x_1 \\ x_2 \\ x_3 \\ x_4 \end{pmatrix}.$$Now if I switch $y_3$ and $x_3$,$$\begin{pmatrix}y_1 \\ y_2 \\ x_3 \\ y_4\end{pmatrix} =
\widetilde{\boldsymbol{\mathsf{A}}}
\begin{pmatrix}x_1 \\ x_2 \\ y_3 \\ x_4 \end{pmatrix},$$what is the new matrix $\widetilde{\boldsymbol{\mathsf{A}}}$ in terms of $\boldsymbol{\mathsf{A}}$? Continue reading

post

Stopping distances in the Highway Code are wrong

To pass your driving theory test in the UK, you need to know how far it will take you to stop if you brakes at a particular speed. But the numbers given in the Highway Code are based on inaccurate calculations that exist only because they formed an easy formula for stopping distances when we thought in feet instead of metres. Simple mechanics shows that the Highway Code systematically underestimates how long it takes to stop. At the end we propose an easy, safer equation for stopping distances.

The stopping distances you need to learn for your driving theory test are given in the Highway Code as:

Speed Stopping distance
20mph 6 + 6 = 12m
30mph 9 + 14 = 23m
40mph 12 + 24 = 36m
Speed Stopping distance
50mph 15 + 38 = 53m
60mph 18 + 55 = 73m
70mph 21 + 75 = 96m

Your stopping distance is given by thinking distance + braking distance. These numbers disguise a fascinating fact that you can only see if you write the stopping distances in feet:
Braking distances in feet Continue reading