 So this lecture is part of an online mathematics course on group theory and will be about the symmetric and alternating groups. So we will start just by recalling what these are. So the symmetric group SN is all permutations of N points. And we may as well call these points 1, 2, up to N. And its order is N factorial because it can take 1 to any one of these N points. And the permutation can then take 2 to any of the N minus 1 points that aren't in the image of 1 and so on. So we get N times N minus 1 times N minus 2 and so on. It's got a subgroup AN called the alternating group, which is index 2 and order N factorial over 2, at least if N is not equal to if N is greater than 1. And AN is the group of all permutations fixing the following polynomial. You just take the product over nought less than i, less than j, less than n, of xi minus xj. So for instance, for N equals 3, this looks like x1 minus x3, x2 minus x3, x1 minus x2. And you can see if you permute these numbers 1, 2, and 3, you will permute these factors, except you may change the sign of some of these factors. So any permutation of the symmetric group maps this polynomial either to this polynomial or minus this polynomial. And we actually get a homomorphism from SN to the group with two elements plus or minus 1, depending on whether it multiplies this polynomial by 1 or minus 1. And AN is just the kernel of this homomorphism. So we get a little exact sequence of groups like this. And this map is onto, if N is at least 2, so AN has half the order of SN. And we notice that AN is normal in SN because it's the kernel of a homomorphism. So we'll now just quickly recall what the symmetric groups look like for small values. So the symmetric group S1 is kind of uninteresting. It's just a trivial group, as is A1. S2 has ordered 2, so it's just isomorphic to the cyclic group of order 2, and A2 is again trivial. S3 is isomorphic to the dihedral group of order 6, consisting of all symmetries of a triangle. And the alternating group A3 is, of course, just the rotations of a triangle, which is just a cyclic group of order 3. So far, nothing very much is going on. S4 is a bit unusual. It contains the alternating group A4, but the alternating group A4 has an extra normal subgroup, z over 2z times z over 2z. So this is normal. You remember this group here is generated by the permutations 1, 2, 3, 4, 1, 4, 2, 3, and 1, 3, 2, 4. And this is the only case in which an alternating group has a normal subgroup other than the trivial subgroup and the whole group. So the alternating group is A4. It's also rotations of a tetrahedron. You can think of these four points as being the four corners of a tetrahedron. The group S4 has an extra normal subgroup. It's got this normal subgroup z2 times z2. And again, it's the only symmetric group that has a normal subgroup other than the symmetric group and the alternating group and the trivial group. And it's equal to rotations of a cube or an octahedron. So you can see this. If we've got a cube, a cube actually has four diagonals. And any rotation of a cube acts on these four diagonals. And by fiddling around with a cube, you can convince yourself that the rotations of a cube give you exactly all permutations of these four diagonals. S4 is also equal to all symmetries of the tetrahedron where you allow reflections as well as rotations. And then we get to S5, which only contains A5 and contains one. And A5 is rotations of an icosahedron, as we will see later when we talk about it in more detail. A5 is an example of a simple group. So this is no normal subgroups other than one and itself. So groups with no normal subgroups other than one of themselves are, of course, called simple groups. So some simple groups are the cyclic groups of prime order. And A5 is the smallest simple group that isn't cyclic of prime order. We'll probably say more about those later. Symmetric groups. Beyond this, we get S6 and A6. S6 is unusual because it has some extra automorphisms, which aren't at all obvious. So any group has automorphisms called inner automorphisms given by conjugacy by an element. So if you match x2, gx, g to the minus 1, this is an automorphism of the group. And S6 is rather unusual in that it's got some extra automorphisms, not of this form, as we will see a bit later. Maybe. So next, we want to look at conjugacy classes of Sn and An. And the conjugacy classes of Sn are quite easy to describe. In fact, the symmetric groups are one of the very few groups where the conjugacy classes are easy to describe. So let's look at a typical element of Sn. So it might do something like this. So I suppose it takes, let me number these, 1, 2, 3, 4, 5, 6. So it might take the element 1 to 3, 3 to 5, 5 to 6, 6 back to 1. And then it might take 2 to 4 and 4 to 2. And you see any permutation of these six points can be split up into cycles. So we write this permutation in shorthand notation like this. We write 1, 3, 5, 6. This just means the cycle taking 1 to 3, 3 to 5, 5 to 6, 6 to 1. And then we've got another cycle 2, 4. So any element of Sn is a product of disjoint cycles. So a cycle is just where you cyclically permute the elements as if they were sort of around the edges of a circle or something. Also, if A is this element here, if we conjugate A by some element g, all that's doing is it's renaming these elements according to g. So this has the same cycle shape. So it will be a cycle of four elements and a cycle of two elements. So we see that a conjugacy class gives us a cycle shape, where a cycle shape is something of the form 1 to the n1, 2 to the n2, 3 to the n3, and so on. Meaning we've got n1 cycles of length 1, n2 cycles of length 2, and so on. So this would be a cycle shape, 1 to the 0, 2 to the 1, 3 to the 0, 4 to the 1. And of course, you usually miss out 1 to the 0 and 3 to the 0 out of laziness. Conversely, any two elements of the same cycle shape are conjugate. And this is sort of obvious if you remember that saying two things are conjugate just means you're relabeling the things you're permuting. So let's do an example. Suppose A is equal to 1, 2, 3, 4, 5, 6, 7. And B is equal to 6, 4, 3, 2, 1, 7, 5. And the problem is find G. So G, A, G to the minus 1 equals B. So we want to actually, I mean, we can sort of see informally that A and B are conjugate because all we have to do is to find G relabeling the elements to get from there to there. And you do it like this. All we have to do is do this permutation. So this is the permutation G in blue. So in other words, G takes 1 to 6, then it takes 6 to 7, then it takes 7 to 5, then it takes 5 to 1, and it takes 2 to 4, and it takes 4 to 2, and it takes 3 to itself. And now you can check that G to the minus 1, A, G equals B. So if I start with this element 6, I apply G to the minus 1, I go up to here, then I apply A, I get to 2, then I apply G, and I get to 4. You see, I've met 6 to 4, which is what B is. So this sort of makes it obvious that if two elements have the same cycle shape than they're conjugate and gives you a constructive way of finding an element mapping one to the other. Of course, G is not unique because I could have written B as say 4, 3, 6, 1, 2, 5, 7. And then I would get a different element conjugating A to B. So for example, we can now work out the conjugacy classes of any symmetric group. So the conjugacy classes of Sn just correspond to cycle shapes of length n. In other words, we want 1 to the n1, 2 to the n2, k to the nk, with n1 plus 2n2 plus 3n3 plus knk equals n. And if you think about it, this is the number. It's just the number of partitions of n because this is just the number of ways of writing n as a number of smaller integers. For example, let's find the conjugacy classes of S4. So we can write 4 is equal to 4 or it's 3 plus 1 or 2 plus 2 plus 1 or 2 plus 1 plus 1 or 1 plus 1 plus 1 plus 1. And this gives us the conjugacy classes either a 4 cycle, a 3 cycle. So this might be A, B, C, D, or A, B, C, or it might be 2, 2 cycles that might look like A, B, C, D, or it might look like A, B, or it might just be the identity element, where I'm not bothered to write the cycles of length 1 because they're just trivial and uninteresting. The next question is, how many elements are there in each conjugacy class? Well, again, this is fairly easy to work out. The size of the conjugacy class is equal to the size of an orbit under G because the conjugacy class is just acted on by G. So you can think of it as being an orbit of G acting on itself by conjugation. And the size of an orbit is just G over the size of the subgroup fixing a point. And the subgroup fixing a point of this conjugacy class is just G over the subgroup commuting with one permutation. So we've got to figure out what the subgroup fixing a permutation is. So let's write down a permutation and figure out what its subgroup is. So here's a permutation. We might fix a few points. And then we might have a few points that are mapped to each other. Let me do these all in the same direction. Then we might have some triples. We might have some cycles of length 3 and some cycles of length 4 and so on. So here's a typical permutation. So this particular one is cycle shape 1 cubed 2 squared, 3 to the 1, 4 squared. And now let's try and find permutations that commute with this. Well, first of all, we can permute any of these three points. So we get a subgroup S3 of order 3 factorial permuting these. Then this cycle here commutes with this permutation. So we also get a 2 cycle like this. This gives us a group of order 2. And we've got another group of order 2 here because this cycle of order 2 commutes with everything. But then we can permute these two. We can act on these two with a symmetric group S2. And this gives us another factor of 2 factorial. And here we've got a cycle of order 3 commuting with everything. So that gives us a factor of 3. And then we can commute this 1 element, which gives us a symmetric group S1 of order 1 factorial. And similarly, here we get a factor of 4 from this. So I guess that should be going that way around. And a factor of 4 from this. And we can permute these with a symmetric group S2. So we get an element of order 2 factorial. So we see that this element here commutes with a group of order 1 to the 3 times 3 factorial times 2 squared times 2 factorial times 3 to the 1 times 1 factorial times 4 squared times 2 factorial. And you can check that these, in fact, give you all things commuting with this particular cycle. So the order of the centralizer of a permutation of shape 1 to the n1, 2 to the n2, 3 to the n3, and so on, is just 1 to the n1 times n1 factorial, 2 to the n2 times n2 factorial, and so on. So the size of the conjugacy class is equal to n factorial divided by 1 to the n1 times n1 factorial, 2 to the n2 times n2 factorial, and so on. So this gives us an easy way to work out the size of every conjugacy class. So let's do this for S4. Just work out the size of the conjugacy classes. So the permutations have cycle-shaped 4, 3, 1, 2 squared, 1 squared, that doesn't sound right, 2 squared, 2, 1 squared, and 1 to the 4. And then the order of the centralizer is 4, or 3, or 2 squared times 2, or 2 times 1 squared times 2, or 4 factorial, which is 24. So the size of the class is just 24 divided by this number here, which is 6, or 8, or 3, or 6, or 1. And now, as a reality check, we should check that these numbers here add up to 24, which is the size of the group. So we have, indeed, found all the conjugacy classes and their sizes. Conjugacy classes in the alternating group are similar, but slightly trickier, or similar. But classes of Sn sometimes split into two classes of An. Let's look at A3 contained in S3. So the conjugacy classes of S3, there's 1, there's 1, 2, 3, and 1, 3, 2, and there's 1, 2, 2, 3, 3, 1. So these are the three conjugacy classes. Now these elements aren't in An, so we can forget about them. But in A3 has three conjugacy classes. There's 1, 1, 2, 3, and 1, 3, 2. So this class of S, the symmetric group, has split into two different conjugacy classes of the alternating group. And the problem is the element that conjugates this class into this class is one of these elements, which isn't actually in the alternating group. Similarly, if we look at A4 contained in S4, we find that there's one conjugacy class of elements of cycle shape like that. But if we think of A4 as a group of rotations of a tetrahedron, it's got two conjugacy class of elements of order 3 because we can point a vertex towards us and either rotate clockwise or anticlockwise. So this again has two classes of order 3. This only has one class order 3. So you might think, well, maybe classes of elements of order 3 are always going to split into two classes, but that doesn't hold because if we look at A5 contained in S5, this contains one class of elements of order 3. But A5 also contains one class of elements of order 3. Well, how come? Well, you might say, why are these two in the same conjugacy class? Well, we can actually conjugate this element into this element by using the permutation 2, 3. Well, that's no good because 2, 3 isn't in the alternating group, but now I can multiply it by the element 4, 5. And this is equal to g times 1, 2, 3 times g to the minus 1. So these two elements are conjugated in A5 because you've now got these two spare elements, 4 and 5, that you can use to make this odd, this element not in the symmetric group into an element of the symmetric group. So conjugacy classes of alternating groups are a bit tricky. The conjugacy classes of the symmetric group sometimes split into two classes and sometimes they don't. And there's a rule for telling you when it doesn't, when it doesn't, but I can never remember what this rule is because I won't bother giving it. Next, we want some generators for the group SN. So generators mean we want to find some particularly simple elements such that any element of SN can be written as a product of them. And the generators are going to be these transpositions 1, 2, 2, 3, 3, 4, 4, 5, and so on, up to n minus 1n. These are called transpositions. So transposition is a permutation that just exchanges two elements and nothing else. And we want to show that every permutation is a product of these. And to do this, we use the notorious bubble sort. So the bubble sort algorithm is the following problem. Suppose you've got a collection of objects which are not in order and you want to put them in order. For instance, suppose I've got several pens and I want to put them in order of putting the lightest colors to the left. So I want yellow, orange, red, and blue. And what I do is I keep switching the order of two of them so I can switch orange and red and then I can switch these two and then I can switch these two and then I can switch these two and then I can switch these two and I finally got them in order. So I can get them all in order just by switching two neighboring elements. The bubble sort, this is called bubble sort and it's kind of notorious for being a really awful sorting algorithm. It's much, much, much slower than the best sorting algorithms. But I mean, writing bubble sort used to be given as an exercise and introductory programming classes. And the problem with this is that bubble sort ended up being used as a sorting algorithm in actual computers which made them all rather slow in a way fortunately bubble sort has been more or less eradicated from computing but it's still very useful in the theory of the symmetric group. So you see bubble sort is really just using these particular transpositions to change the order of some object. In other words, give you a permutation. So I think rather than give a formal proof of these generate S and I'll just give an example which should hopefully make it obvious. So suppose you want to change one, two, three, the permutation one. Suppose you want to have the permutation that takes one, two, three, four, five to three, four, two, five, one. Then I can sort of do a sort of bubble sort. So I take one, two, three, four, five and now I'm going to switch one and two and now I'm going to switch one and three to get two, three, one, four, five. So I'm bringing one up to the last position two, three, one, four, one. Now I switch these two and then I switch one to here, two, three, four, five, one. And now you see by switching adjacent ones I brought the element one to this position here. And now nearly everything is in the right position. Now I've got to get, I want to move three up a bit. So I can, so I want to move three down to here. So I can switch two and three and now I want to switch the order of two and four. So I get three, four, two, five, one. And it's kind of obvious that by doing this you can change this to any other permutation. And now if you look at this, what has happened is this is the transposition one, two. This is the transposition two, three. And that's a bit confusing. So what this means is if I do one, two. So if I do the transposition one, two, followed by two, three it means it's a function that takes one to position two and then this function takes two to three. So it's rather confusing because this is acting on positions not on the actual element. So this isn't the transposition one, three. It's the transposition two, three. And then I do three, four and four, five and then one, two and two, three. So this permutation is equal to one, two, two, three, three, four, four, five, one, two, two, three. And it's sort of fairly obvious that you can get any permutation of any symmetric group by doing something similar. What we want to do now is discuss relations between these transpositions. And I think I'll leave that for next lecture since this has gone on for about half an hour. So next lecture we will be doing the Cox sort of TOD algorithm.