Sylvester’s convex hull problem in R

James Joseph Sylvester. Image: public domain.

James Joseph Sylvester was born just over 200 years ago on 3 September 1814 in London and was educated at Cambridge. However, as a Jew, he was awarded his degree only in 1872 when Oxford and Cambridge Universities abolished the theological tests for graduates. In 1838 he became professor of Natural Philosophy at University College London (the first English university to admit students regardless of race, class or religion, and also the first to admit men and women on an equal basis) where he had been, briefly, an undergraduate ten years earlier, and three years later was appointed to the chair of mathematics at the University of Virginia in Charlottesville, a post he held for a few months. In 1854 he was appointed to the chair of mathematics at the Royal Military Academy at Woolwich until his retirement, under military rules, at age 55. This was followed by a fruitful period as a mathematician. In 1877, Sylvester went back to the United States as professor at Johns Hopkins University, and, aged 68, in 1883 was appointed Savilian professor of geometry at Oxford. He retired in 1892 and died in London on 15th March 1897. The Royal Society instituted the Sylvester Medal in 1901 for the encouragement of mathematical research.

Continue reading


Power-up review

Last year, Power-up: unlocking the hidden mathematics in video games by Matthew Lane (Amazon: UK, US) was released. I’ve done some writing and talking about maths and video games myself, so I was keen to read it.

What a great place to sit and read a book! Image: David Iliff, CC BY-SA 3.0

I took a copy of it with me on holiday to the Lake District, where I had plenty of time to sit in a garden and enjoy it.

And enjoy it I did! Power-up is a really well written and enjoyable book that takes you on a tour through many different areas of maths and their relation to many different games. I was surprised by just how many different games the book finds maths hidden in.

My favourite chapter of the book was The thrill of the chase. This chapter looked at the green and red shells in the Mario Kart games. As hopefully everyone knows, the shells in Mario Kart are weapons used to attach to the other racers: green shells travel in straight lines and bounce off objects; red shells travel straight towards an opponent, but they break if they hit other objects. You may be thinking to yourself: “What is the best angle to fire a green at?” or “What path will a red shell follow?” or “When will the shells hit the opponent?”. If you are, then you should read Power-up. If not, you should probably read Power-up anyway…

It’s worth noting how nice the book looks inside. Sometimes the maths in maths books can be badly typeset, which is at best distracting and at worst simply wrong. This book has no such problems; the equations are beautifully typeset:

Nice typesetting!

The only problem I can find with Power-up is that at times it talks about games that I’m less familiar with. These were less easy to follow, and less interesting to me, as I was unfamiliar with the problem the book was discussing. The majority of the games discussed, however, are very well known, so this problem is small. And perhaps the best solution to it would be for me to play more video games.

In case you’re wondering, other highlights of the holiday included meeting this famous cow, and climbing Place Fell. I highly recommend both the holiday and the book, although it may be possible to enjoy them both separately….


Modelling in a heartbeat

Today at Chalkdust, we’re celebrating our love for mathematics, and what better way to do that than by analysing our heartbeats? The heart is composed of four main chambers: two atria at the top and two ventricles at the bottom. Apart from carrying our hopes and dreams, the heart’s main function is to pump blood around our body. This can be split into two different circuits, the first one is low-pressure (in blue below) and pumps blood from our body to our lungs to get oxygenated before coming back to the heart. The second is a high-pressure circuit (in red) which then pumps this oxygenated blood out of the aorta and to the rest of our body. Continue reading


Math Blaster

Math Blaster is a classic game many of you will have played in your childhood. But did you know it was first released in 1983 for the Apple II and the Atari 8-Bit? The original version was created by Davidson & Associates as a simple zapping game with the aim of teaching school-level maths, though it didn’t have a storyline at the time. Since then, it has been re-released countless times for various consoles and computer.

And which version did you play? My one came out in 1998 and was called Math Blaster: Ages 6-9. But not too long ago, I discovered another version released in 1994 called Math Blaster Episode 1, which was designed for the Sega Mega Drive (that’s Sega Genesis for the Americans reading this blog post!) After hearing about it, I decided to relive my childhood, this time in 16-bit graphics. I never played Math Blaster on a console before, so I went for the easiest settings and as many lives as the computer would give me(!)

Setting the scene

The game starts with Blasternaut asking Spot to pop outside their spacecraft and repair one of the parts in the engine. Blaster looked as if he was a father sternly telling his son to tidy up his bedroom!

Spot reluctantly agrees, and starts his repair job, when all of a sudden, some yellow trash alien snatches Spot behind Blaster’s back! As soon as Blaster finds out, he calls the Galactic Commander and hatches a plan to save Spot. Apparently the first step is to…clean up the trash?

Blasternaut to the rescue!

Part 1: Trash Zapper

I saw some trash flying my direction; each bit of junk had a different number, and only one of those numbers fits the equation on the panel, so I needed to zap the correct one. It took a while for me to get the hang of the controls, probably because I never played on a SEGA console before! But even when I figured out how to aim and shoot, it was still difficult to zap anything because you had to move the cursor using the arrow controls. All I needed in the 1998 version was a mouse – so much simpler!

Now, where’s that seven?

You also have bonus stages where you shoot asteroids to gain points. It doesn’t affect your chances of rescuing Spot, but I like the graphics for the asteroids – it’s surprisingly realistic for a game running on only 16 bits!

Once the stage is over, you see the trash alien flying his spaceship into a crater on some planet, with Blaster in hot pursuit.

Part 2: Cave Runner

Blasternaut starts at the bottom of a series of caves with a 0 attached to his chest. As I played the 90s version, I recognised the drops of water (or whatever liquid it is) on the roofs of each ”floor” of the cave. Each drop will say something like “+2” which adds two to whatever number Blaster is carrying, or “-11” which takes eleven away instead, etc.

Also, there’s a gap you fly through to reach the next floor. Playing the 1998 version didn’t prepare me for how you get past it – I saw “3+0” and “17” and tried to get 17 so I could hit a lever and open the way through (like the 1998 version). When I did that I was zapped straight away! It turned out I needed a number between 3+0 and 17 to pass. So I started to chug my way through tons of drops.

The irritating part was when I wanted to take 2 away from the Blaster’s number and the “-2” drop didn’t appear, so I kept flying into lots of drops until I ended up with a number I was looking for. I passed through at last…only to fly into some bat-like creature!

There were many other times I lost control while I was getting Blaster to fly – when I wanted to pass one floor, he sometimes went through several (which was a good thing, actually!) There’s a few monsters flying/walking by here and there, but I thought it was quite easy to shoot them down.

It’s a bit cramped over here in the cave runner!

After I completed that stage, I saw the alien fly out of a second crater. Blasternaut hasn’t given up on chasing him…

Part 3: Classic Math Blaster

At this point, the trash alien has carried Spot into a UFO which is hovering mid-air. The UFO has four “holes” which are like entrances. By now, you’ll have figured that to save Spot, Blaster needs to sneak in through one of the holes. Sounds easy enough, right? Wrong!

Watch out for the low-flying litter!

Basically there’s an equation shown on the UFO. You have to dodge the trash (as well as any loitering monsters) and fly into the port that has the correct answer. Easier said than done – I kept flying into the trash, and once I flew into the wrong hole! You can shoot at the trash to clear them, but I didn’t do much shooting myself.

The first stage was NOT TOO BAD because there was less trash and I wasn’t timed, but from Stage 2 onwards I had to hurry…if I took too long, an eclipse would happen and I lost a life. Trouble was, I didn’t know about the time limit at first. Worse still, I got the fly and shoot buttons mixed up! Perhaps that was why I had difficulties controlling Blaster’s flight (again!). There came a point when I simply decided to fly straight into a hole as soon as the path was clear, which didn’t always work! I often got hit by the trash and was sent flying back to the ground. That was when I usually ran out of time, and in the end I easily lost all five lives.

To rub the salt into the wound, I later found out that this was the final stage of the whole game – had I finished it, I could have watched Blaster save Spot and set the UFO alight! I was so close! The trash alien gets away, though. Can anyone stop that yellow fellow?


The main obstacle for me was the game controls. Maybe it’s because I barely touched a games console in my entire life – the vast majority of games I played were on a PC, and the same was true when I played Math Blaster as a child, hence I’m used to saving the day with a mouse and keyboard. Also, I kept forgetting which button did what…possibly because I didn’t think of checking the controls option before starting the game!

Also, the Mega Drive version seems quite short compared to the PC version of 1998, which had one more stage in the game, and the trash zapper comes up a second time. Moreover the storyline was expanded on a fair deal – the trash alien is called Gelator, and he is serving his sentence in prison. The ending has its differences, too: if you win the game, Blaster traps Gelator, sending the three-eyed criminal back where he belongs.

Still, I reckon the Mega Drive version is rather nifty game for its time. The graphics were quite impressive, I recognised Blasternaut and co., and I got my dose of Math Blaster nostalgia! Definitely going to play it again.

UPDATE: I played the game a second time, and I finally managed to beat the final stage! Hurray!


Why knot?

As any fule kno…

you can’t tie a knot in a length of string without letting go of the ends.

Let’s be a bit more mathematical: you can’t tie a knot in a loop of string without cutting it. (We can think about the string together with your body as forming a loop, and cutting the loop as letting go of an end.) Continue reading


Well, well, well…

Imagine, for a moment, that you have opportunity to build the house of your dreams. You are rich and powerful, you own a lot of land, and you are carefree. So carefree, in fact, that this is what you decide to call your house. You are Frederick the Great: an 18th century monarch, the creator of Sanssouci palace in Potsdam, Germany, and the first person on record to describe your dog as ‘man’s best friend’. Continue reading


The mathematical con artist

You’re walking down the street one fine morning, and you see that someone has set up a little table and gathered a small crowd. It’s that sneaky trickster Kyle again. His inspired variants on the shell game have brought him something of a following amongst the local mathematicians. Today, though, he’s got something else entirely. Stepping closer, you see that he’s written out the alternating harmonic series…
1 – \frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\frac{1}{5}-\frac{1}{6} \dots
$$ You hear his patter. “This, ladies and gentlemen, is a perfectly ordinary convergent series. Now, I will pay one hundred pounds — no tricks — to anyone who can tell me to what, exactly, this series converges. Don’t think I’m trying to mess you around with a divergent series. If any one of you fine fellows can show that it sums to infinity, they will receive the one hundred pounds just the same as if they showed that it converged. Just five pounds a guess. Who’s first?”

Is Kyle finally going straight, or has he got something up his sleeve? Continue reading