The 3rd annual π day anime and mathematics post: A symmetric group of friends of degree 5

Posted on March 14, 2013 by

「ふいにコネクト」/「ものくろあくたー。」

It’s that day of the year again.

Kokoro Connect’s premise made a lot of people raise their eyebrows, because really, what good can come from body-switching shenanigans? Well, let’s think about this for a second. We have a group of five kids and every once in a while, at random, they switch into the others’ bodies at random. What does that sound like? That’s right, a permutation!

Interestingly enough, the idea of connecting body-switching with permutations isn’t new. The Futurama writers did it and apparently got a new theorem out of it. What differs in the case of Kokoro Connect and Futurama is that in Futurama, the body-switching could only happen in twos. These are called transpositions. Obviously, this isn’t the case for Kokoro Connect. This doesn’t make too much of a difference since it turns out we can write out any permutation we want as a series of transpositions, but that wouldn’t be very fun for Heartseed.

We write permutations in the following way. If we let Taichi = 1, Iori = 2, Inaban = 3, Aoki = 4, and Yui = 5, we’ll have $(1 2 3 4 5)$ representing the identity permutation, when everyone’s in their own body. If Heartseed wanted to make Aoki and Yui switch places, he’d apply the following permutation
$$\left( \begin{array}{ccccc} 1&2&3&4&5 \\ 1&2&3&5&4 \end{array} \right)$$
While it’s helpful for seeing exactly what goes where, especially when we start dealing with multiple permutations, this notation is a bit cumbersome, so we’ll only write the second line ($(12354)$) to specify a permutation.

For the purposes of this little exercise, we’ll consider applying a permutation as taking whoever’s currently in a given body. That is, say we permute Aoki and Taichi to get $(4 2 3 1 5)$. In order to get everyone back into their own bodies, we have to apply $(4 2 3 1 5)$ again, which takes Aoki, who’s in Taichi’s body, back into Aoki’s body.

So let’s begin with something simple. How many different ways are there for the characters to body switch? Both who is switched and who they switch with is entirely random. Again, since the switches aren’t necessarily transpositions, this means that we can end up with cycles like in episode 2, when Yui, Inaban, and Aoki all get switched at the same time. This can be written as $(1 2 4 5 3)$.

But this is just the number of permutations that can happen on a set of five elements, which is just 5! = 120. Of course, that includes the identity permutation, which just takes all elements to themselves, so the actual number of different ways the characters can be swapped is actually 119.

Anyhow, we can gather up all of these different permutations into a set and give it the function composition operation and it becomes a group. A group $(G,\cdot)$ is an algebraic structure that consists of a set $G$ and an operation $\cdot$ which satisfy the group axioms:

• Closure: for every $a$ and $b$ in $G$, $a\cdot b$ is also in $G$
• Associativity: for every $a$, $b$, and $c$ in $G$, $(a\cdot b)\cdot c = a\cdot (b\cdot c)$
• Identity: there exists $e$ in $G$ such that for every $a$ in $G$, $e\cdot a = a \cdot e = a$
• Inverse: for every $a$ in $G$, there exists $b$ in $G$ such that $a\cdot b = b\cdot a = e$

In this case, we can think of the permutations themselves as elements of a group and we take permutation composition as the group operation. Let’s go through these axioms.

Closure says that if have two different configurations of body swamps, say Taichi and Iori ($(2 1 3 4 5)$) and Iori and Yui ($(1 5 3 4 2)$), then we can apply them one after the other and we’d still have a body swap configuration: $(2 5 3 4 1)$. That is, we won’t end up with something that’s not a body swap. This seems like a weird distinction to make, but it’s possible to define a set that doesn’t qualify as a group. Say I want to take the integers under division as a group ($(\mathbb Z, \div)$). Well, it breaks closure because 1 is an integer and 2 is an integer but $1 \div 2$ is not an integer.

Associativity says that it doesn’t matter what order we choose to apply our operations in. If we have three swaps, say Taichi and Inaban ($(3 2 1 4 5)$), Aoki and Yui ($(1 2 3 5 4)$), and Iori and Yui $(1 5 3 4 2)$ and we want to apply them in that order. Then as long as they still happen in that order, it doesn’t matter which one we apply first. We’d have
$$((32145)(12354))(15342) = (32154)(15342) = (34152)$$
and
$$(32145)((12354)(15342)) = (32145)(14352) = (34152)$$

The identity means that there’s a configuration that we can apply and nothing will change. That’d be $(12345)$. And inverse means that there’s always a single body swap that we can make to get everyone back in their own bodies.

As it turns out, the group of all permutations on $n$ objects is a pretty fundamental group. These groups are called the symmetric groups and are denoted by $S_n$. So the particular group we’re working with is $S_5$.

So what’s so special about $S_5$? Well, as it turns out it’s the first symmetric group that’s not solvable, a result that’s from Galois theory and has a surprising consequence.

Évariste Galois was a cool dude, proving a bunch of neat stuff up until he was 20, when he got killed in a duel because of some drama which is speculated to be of the relationship kind, maybe not unlike Kokoro Connect (it probably wasn’t anything like Kokoro Connect at all). Among the things that he developed was the field that’s now known as Galois theory, which is named after him. What’s cool about Galois theory is that it connects two previously unrelated concepts in algebra: groups and fields.

One of the most interesting things that came out of Galois theory is related to the idea of solving polynomials. I’m sure we’re all familiar with the quadratic formula. Well, in case you aren’t, here it is:

$$x = \frac{-b \pm \sqrt{b^2 – 4ac}}{2a}$$

This neat little formula gives us an easy way to find the complex roots of any second degree polynomial. It’s not too difficult to derive. And we can do that for cubic polynomials too, which takes a bit more work to derive. And if we want to really get our hands dirty, we could try deriving the general form of roots for polynomials of degree four. And wait until you try to do it for degree five polynomials.

That’s because, eventually, you’ll give up. Why? Well, it’s not just hard, but it’s impossible. There is no general formula using radicals and standard arithmetic operations for the roots for any fifth degree (or higher!) polynomial. The reason behind this is because $S_5$ is the Galois group for the general polynomial of degree 5. Unfortunately, proving that fact is a bit of a challenge to do here since it took about 11 weeks of Galois theory and group theory to get all the machinery in place, so we’ll have to leave it at that.

Posted in Anime | |

Low energy 2012 reflection

Posted on January 1, 2013 by

「「私、気になります！」」/「Mirunai」

You can see my 12 Days posts as sort of the most interesting things I’ve seen or read over the year. And so you can probably infer the following.

The best anime of 2012 was Hyouka.

Why? There’s a lot of reasons, but basically, it was the show I was most sad to see end. Oh and I guess there’s this too:

@blkmage Totally not an excuse just to post a cute pic of Oreki and Chitanda.

— kViN (@Yuyucow) December 25, 2012

More generally, I think the highlights of my 2012 have been meeting up with people, something that I’ve begun to look forward to after being exiled in London. Of course, there’s the good old meetups with old university friends, some of which involved riichi mahjong. But this was the year that I got to meet some of the Toronto-area cartoon heads that I’ve been talking to on twitter for a while and it was great. And even the non-cartoon head Toronto council watchers were cool too, which is unsurprising, since Toronto City Council is the secret best anime.

Hopefully 2013 gives me some more chances to ruin your impressions of me IRL.

Posted in Anime | |

12 Days XII: He’s lazy. She’s curious. They solve mysteries.

Posted on December 25, 2012 by

「氷菓」/「ぱち」

Hyouka is just lovely. I was pretty skeptical when the whole thing was announced and it started. Really, a slow mystery light novel with pretty animation, is that going to hold up? As it turns out, it’s not really a mystery, as things involving a bunch of bored high school students rarely are. Instead, it’s about a guy who, despite his best efforts, has the misfortune of being captivated by a starry-eyed girl and is dragged out of his shell. Like most of other shows in this vein, the enjoyment comes from watching how our protagonist slowly changes and see, by the end of it all, how far they’ve come.

Posted in Anime | |

12 Days XI: Two wolf kid moon shirt

Posted on December 24, 2012 by

「おおかみこどもの雨と雪」/「ksw」

In Summer Wars, we’re introduced to a family that’s large and traditional from the viewpoint of an outsider. We watch as they go about their hustle and bustle to honour the matriarch that’s guided and anchored their family. It’s a very broad, macro sort of viewpoint of the family. In Ookami Kodomo, we go about things from the other side. We see the love between two people blossom and they start building their family. After tragedy strikes, we see the day-to-day struggles of the young family and follow them through their highs and lows until the children are grown up.

Posted in Anime | |

12 Days X: Humanity has declined

Posted on December 23, 2012 by

「いつか」/「八子」

Shingeki no Kyojin is a story about the human race getting screwed. In shounen manga, we usually get characters who pull off amazing feats and come back against all odds. Sure, they might get themselves into dangerous situations, but none of them are actually going to die, right? Well, no one is safe in Shingeki no Kyojin. Nothing good happens when someone dies. And death never comes in a blaze of glory. This cloud of danger, horror, and despair hangs over the manga in a Muv-Luv Alternative-esque fashion.

Posted in Anime | Tagged 12 days, chomp, shingeki no kyojin |
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 42, "mathjax_display_tex": 4, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.955089807510376, "perplexity_flag": "middle"}