# Blog

## Time travel, anime and maths

By

,

Way back in 2006, an unusual anime began airing on Japanese television. Although the series was about aliens, time travel and other supernatural events, no one could have predicted the strange effects that The Melancholy of Haruhi Suzumia would have on the world of mathematics.

## All mixed up

As the show aired, people began to notice the episodes seemed out of order. Some of the earliest episodes clearly showed events that happened after later episodes. When the series finished, fans pieced together the timeline and came up with the chronological (time-based) order for the episodes.

When the series came out on DVD, the episodes were in a third order. Fans began joking that maybe they should watch the series in every possible order. But with 14 episodes in the first series, how long would it take to do that?

## An epic TV marathon

We can calculate that! Given 14 episodes, with each episode being a bit over 20 minutes long, it takes about five hours to watch that series once. And the possible number of orders is staggering – there are 14 episodes you could watch first, 13 you could watch second, 12 you could watch third and so on, for a grand total of 14 x 13 x 12 x … x 2 x 1 = 87 178 291 200 different orders, with a total of 1 220 496 076 800 episodes watched, and a total run time of approximately fifty million years.

Fans also noticed a loophole that could cut that time down. If you watch episodes 1–14 in that order and then watch episode 1 again, you’re actually completing two possible orders – the original order, and also the order 2, 3, 4, … 13, 14, 1. This saves a repeat watching of 13 episodes! You can extend this trick even further, and save a heap of time, but it also makes it a lot more difficult to find the best answer.

## Enter the mathematicians

In the world of maths, this ordering of episodes is an example of the unsolved minimal superpermutation problem. Surprisingly, some of the best research on the topic isn’t coming from professional mathematicians.

Currently, the best known solution was devised by Greg Egan, an Australian Science Fiction writer. His method requires watching just 93 924 230 411 episodes, which takes about four million years.

There might be better solutions out there, but not much better. Back in 2011, on an internet forum discussing Japanese animation, an anonymous poster showed it was impossible to find an answer with fewer than 93 884 313 611 episodes watched.

The forum post, which included some working, was recently discovered by a team of mathematicians. The team wrote up and clarified the ideas, then made them available on the internet for other mathematicians.

So what’s the actual answer? Mathematicians reckon it’s somewhere between these two solutions. It might be possible to do better than Greg’s answer, but probably not manage a number as low as that given by the anonymous poster. Either way, it’s going to take a lot more maths to figure it out!

If you’re after more science news for kids, subscribe to Double Helix magazine!

Categories:

## 4 responses

1. Theofanis Lantzakis

Here’s my ‘solution’ and I apologize for my sense of humour, in advance.
A. All of this in real life, is bunkum. Mathematics is the art of fantasy. To be precise > get real mister Mathematics, why should I care about the order if it takes more than a reasonable amount of time to watch the series in order, assuming that there is one > Millions of years? Really?
Better to watch the series all jumbled up. After all, the movie makers wanted it that way.

B. Ok. to tackle the problem head on with a real life human brain, I would watch each episode and give it a number from one to forty. I would allow for approximations. eg. Episode one is in the vicinity of the end of the story. Episode two is somewhere in the middle but more likely around number twenty-five-ish… and so on.
Then I would hone in on each episode and fine-tune the series.
But here is the catch. I am not very good at memorizing stories.. good but not very good. So, if you really REALLY want an answer, then get someone with photographic memory to order the series very very quickly, so why would you use Mathematics when Humans can do it better?

C. But there are conundrums:
1. As stated earlier the series is meant to be watched as it stands. Reason being it is a story about TIME TRAVEL, so there is no order.
2. If individual episodes time-warp, then again there is no answer, no order and therefore again meant to be watched as presented.
3. I know that I have repeated this, but it is so much related to the subject matter that it needs highlighting.
NB: The series is about TIME TRAVEL and there is no order.
4. As all movies, sit back, enjoy the show. After all it is a MOVIE!
5. Mathematics can not solve this problem because the Mathematical answer to this problem is stupid, hypothetical and pointless > it is a problem for real people real situations…. oops sorry. I got carried away. I guess I watch too much Judge Judy which orthodoxically, this is a prime example of “The order does not matter”, so enjoy the show and stop ruining it with Mathematical garbage.
Again I apologize for my sense of humour.

2. Theo

Hey! Where’s the comment I put up a couple of days ago?

1. David