Wednesday, June 30, 2010

A proof that there is no onto homomorphism from S_5 to S_4

Warning: contains maths, algebra even.

This is probably one of the most satisfying proofs that I've ever come up with (or at least remember coming up with). This is partly due to the fact it is non trivial, and partly due to the amount of time it took to come up with it.

Anyway, here's how it goes:

Suppose there is an onto homomorphism \(\varphi\) from \(S_5\) to \(S_4\).

By the first isomorphism theorem, \(S_4 \cong \, ^{S_5}\!/_{\mathrm{ker} \varphi}\), so \(\left| \mathrm{ker} \varphi \right| = \frac{\left| S_5 \right|}{\left| S_4 \right|} = 5\).

As this is prime, \(\mathrm{ker} \varphi\) is cyclic.

Let \(x\) be an element that generates \(\mathrm{ker} \varphi\). \(x\) is an even permutation as \(x^5 = 1_{\mathrm{ker} \varphi}\), so \(\mathrm{sgn}(x)^5 = 1\) and \(\mathrm{sgn}(x) = 1\).

Therefore all elements of \(\mathrm{ker} \varphi\) are even, so \(\mathrm{ker} \varphi \subseteq A_5\), the alternating group.

But \(\mathrm{ker} \varphi \lhd S_5\), so \(\mathrm{ker} \varphi \lhd A_5\), which is a contradiction as \(A_5\) is simple.

So there does not exist such a homomorphism.

Sure, I assumed that \(A_5\) was simple, but we all know that, right?

Tuesday, November 24, 2009

Coding in my spare time now feels so blah

So I started work at my job for the Summer just over two weeks ago, which is great, I'm really enjoying it, but it has almost completely removed my motivation in my spare time. When I'm working all day coding, I really can't be bothered to do more at home, well at the moment at least. Though I have been quite busy lately and that could've been contributing to it.

Having used python almost exclusively at work so far, I'm really enjoying it, it seems to be a really nice programming language, and if I do go back to working on my project, I'll be sorely tempted to start again in python. Though I don't really know how to use its gui libraries, and I doubt I'll get any chance at that at work.

The other thing I find really annoying is that after getting used to my large, wide screen monitor at work, it's really frustrating to use eclipse with my small laptop screen. Though that's a fairly minor thing really.

Tuesday, November 3, 2009

Dimetric Land Rendering

So I got started on my game, I'm calling it BMAC (Build me a city). I've been playing around with the dimetric rendering (sort of like isometric, except instead of all 3 angles between the axes being the same, 2 are the same, and the third is different). I've got it to the point where with a grid of tiles, each with an elevation, it's drawing a fairly nice landscape. Without further ado I present to you my test picture.

As you can see, it's not quite perfect, some of those little moundy things should really merge with their neighbours, and at the top of the hill in the bottom two lines stick out a bit which is odd, but I plan on doing them soon.

That was quite a bit of effort, and quite a bit of drawing pictures to see how it should look. I plan on making it so it can draw from 4 directions looking down at it, but have only down one of these so far, the rest will come.

That's around 500 lines of code or so, which is less than I thought it'd be, but I suppose once I get all the special cases and directions and things that'll increase significantly. I'm quite chuffed though, I thought that would take much longer.

Monday, September 21, 2009

Yous

This is a word I find myself saying more and more. In current usage, the word you does not technically have a plural, but yous (and also you all) are becoming popular for that. I find myself saying it without thinking, and when I try not to say it, it sounds wrong. It's funny the way languages change.

I'm still not sure whether I want to try and stick with the more "correct" usage, or go with this new plural form. Generally I try and use proper grammar as much as possible, but there really isn't all that much point in casual usage. Words come in and out, meanings change, but sometimes it can be fun to go against that change. I still enjoy asking people, "Contemporary with what?" when they use the term contemporary to mean recent, because that's not its actual meaning. Most people don't even understand what I'm on about, sad as it may be. Ah well, I shouldn't spend too much time bemoaning this change, as I said, languages do change, and will keep changing.

Saturday, September 19, 2009

Welcome To The Masquerade

I bought Thousand Foot Krutch's new album on Monday, and it's awesome! Wasn't even all that long I had to wait to be able to get it here after the US release, less than a week which is much better than the about 2 weeks I had to wait for The Flame In All Of Us (TFIAOS). I had really been looking forward to this, the promotion TFK did for it, the teasers and all really had me hooked, though it's much better hearing it as the entire album than the few songs they had released.

The album just works so nicely as an album, the songs fit together, the sound is fairly consistent without being all the same. And it's heavier, much heavier than TFIAOS, which I like. I'm not sure whether in ranks above Phenomenon as my favourite TFK album (and favourite album of any band), but if it doesn't it comes close.

My favourite song on it (at least for the moment) is E for Extinction. It has a great quiet - loud - quiet sound which is always good, and a good message to go along with it. I particularly like the lyric When we move we camouflage ourselves. We stand in the shadows waiting. Which really hit me. I also like the song The Part That Hurts The Most (Is Me). Which also sounds great and has some good, hard hitting lyrics which I think is a must. I can never get too into a song with poor lyrics.

So well done TFK, you did a great job making an excellent album! Now come back to NZ.

Thursday, September 3, 2009

Laplace's Equation in 3D, polar coordinates

The title basically says it all. For a mere three marks (out of 50) in our take home test, we've been asked to Laplace's Equation in spherical coordinates. As you can see from that post it's a mission. I basically gave up around half an hour ago. It seems that I made a mistake when I was inverting the Jacobian (2 pages of working), which is a slightly different way from the linked article, but that's how we've been asked to do it. Tomorrow I suppose I'll go through it and find my error, which will be tedious. I did get maple to do it for me, so I know what I should get, and I was pretty close, but it appears I messed up one column.

The frustrating part is that even when I've inverted the matrix, I still need to do the ridiculous substitutions you see near the bottom of that page. I won't do them all at once like that, I'll be a bit smarter, but still, it's going to be tedious.

The thing that's really annoying is not that this is particularly hard - it isn't, it's just tedious and a huge amount of work. I won't be surprised if this question goes to 4+ pages. And it's not the kind of work you have to do by hand any. That's why people developed computer algebra systems, why we rely on the work of people who have gone before us, so we don't have to sit there doing tedious calculations. However, I do understand the point, so I'll strive to do it well, plus I want a good mark in this paper, and the test is worth 20% so it is fairly important. Maths Away!

Wednesday, August 26, 2009

Playing with Qt Jambi

Over the last couple of days I've been playing around with Qt Jambi, the Qt bindings for Java, which are pretty cool. I haven't used them that much so far, but they seem really nice. I'd been starting to write this little car game thing, which is more a proof of concept at the moment, which I've now ported to be able to use Qt.

Try it as an applet here (note this is using ordinary Java swing, not Qt as I'm not sure if you can embed a Qt widget in an Applet (or in any AWT or swing element). Then there'd be the trouble of having to download Jambi which is fairly big.

Use your arrow keys to drive around, Ctrl+R resets (in hindsight, not a good choice as it coincides with firefox's and epiphany's reload page shortcut (possibly other browsers too)). The physics is terrible, but I find it fun just driving around, making pretty patterns. You might need to click the applet to give it focus.

Or you can download it here. That includes the source. To run it using qt, it will need to find the Jambi jar file, and it looks in the current directory and "/usr/share/java/qtjambi.jar" (the latter is the default location in Ubuntu (and possibly other distros), so you just need to install the jambi package). You can download Qt Jambi here. Then you need to pass the command line option '--qt'. By default I try and use opengl (which is faster), if it doesn't seem to work, try '--qt --no-gl' to use the regular qt rendering engine.

The number in the top right corner is how many milliseconds it's taking to draw each frame (averaged over the last 100 frames I think). I found Qt with no opengl to be about the same speed as Java swing at 640x480, which I found surprising, I thought Qt would be significantly faster, though at full screen swing slows right down, while Qt only takes a little bit longer, and with opengl it's about 25% faster. YMMV.

I had to be a bit sneaky when writing this so that the swing version would run fine even without the Qt libraries. My first (which I thought was nicer) implementation didn't work, as there were references to the Qt classes in the classes that were being run, even though they weren't used. So when I redid it I had to split everything up, a swing version and a Qt version, so that when swing was being used there would be no references to the Qt classes. I wasn't sure that that would work, but it did, which is pretty cool. Enjoy.

Edit: It appears it's pretty hard for this thing to regain focus, I should probably look into that, enjoy it if you can get it to work, otherwise download the jar, that's more likely to work correctly.