Monday, May 30, 2005

Math Post the First: Dividing and Primes

Well, here goes... math post the first. Not background, real stuff.

I thought we'd start off with a little number theory; most people do actually know what integers are, and it's not as though this early chunk of math is hard or anything. It should be easy enough to understand what I'm saying here without anything like background.

The basic object of study here is the collection of integers: zero, one, two, three, and so on. Negatives, but not fractions. For at least the next while, I'll never even hint that fractions exist (much though it pains me to not be able to share with you, right now, the simple, brilliant, unforgettable, and world-shaking for the ancient Greeks at least, proof that the square root of 2 is irrational). This is important, because it's required to sensibly parse our first term, "divides," which is the same concept you called "divides evenly" back in elementary school. Formally, we say that a divides b if there is a number k such that ak=b. Two divides six because 2*3=6, for instance. Five doesn't divide six, as I'm sure is clear.

There are a few first easy results to be deduced. First, if a given number a divides a number b, a also divides any multiple of b. This follows more or less immediately from the associative law, a property of multiplication and addition that you probably learned without thinking about it in middle school. Multiplication and addition are binary operations: two numbers go in, one comes out. But you can also multiply or add a big line of things: 1+2+3+4+5, for instance. If I were being completely technical, this is utterly incorrect; should we add the two and three first, or start from the left, or what? Handily, it doesn't matter. As you almost certainly already know, the order in which I do the adding doesn't matter, just which numbers are involved, and this is the associative law. If you toss in the distributive law (that is, a(b+c)=ab+ac), you can also see that if a divides two numbers, it divides their sum. These two facts together are the "linear comination lemma."

Some numbers don't divide any number not themselves: zero, for instance, can never be multiplied by anything to make something other than zero. Zero is actually the only number with this property, as should be pretty clear. Other numbers divide every number: since for any x, 1*x=x, one is one of these. Similarly, negative one divides all the numbers because every number has a negative; such numbers are called "units." I mention this seemingly trivial situation because I'll need it soon, but also because some large number of posts down the road the concept of unit will become deep and interesting and important, but only after it gets generalized to the many more complex objects on the docket.

The reason I bring all this up at the moment is the concept of a prime number, whose elementary school definition is a number only divisible by itself and one. We'll have to go slightly further: a non-unit p is prime if whenever ab=p, either a or b is a unit. We need this extension because I also want to talk about negative numbers; seven is divisible by minus seven, so "itself and one" isn't quite going to cut it. I want to exclude units because the nice property of integers we all remember is that they uniquely factor into products of primes. I'll say a bit more about it on Wednesday, but for now I'll just give the basic property of primes: if a prime divides a product, it divides one of the factors. It's not that hard to understand why, but I'll leave it as an exercise until next time.

Saturday, May 28, 2005

Math Post the Zeroth: Fundamentals

I have now lost this post twice. So I'm going to keep it short, in the hopes it'll actually get posted. This is the traditional (in basically all math books) "chapter zero," where all the stuff you're supposed to already know is quickly reviewed. Since you're not supposed to know much of anything, I'm going to say a very short word about explanations. This will be short and very easy and might be somewhat insulting-sounding, but just in case someone hasn't heard I need to say it all anyway. It's also very late because of losses and frustration -- rest assured the next/first installment will arrive on Monday.

I'm not going to give a lot of proofs of things in the usual sense -- formalisms often seem to hide the issue for non-mathematicians, even when they shouldn't really. I am, however, planning to give lots of basic explanations. The philosophy here is to say enough words that a student of mathematics could turn whatever is being said into a proof without difficulty, but not enough to break away from an explanation a non-mathematician can understand. There are just two principles I'll need: proof by contradiction and proof by induction. Contradiction is simple: you assume whatever you're trying to show is not true, then deduce something false. For example, if I wanted to show I haven't eaten today, I could say that if I had eaten my stomach would be full -- since it is empty, i couldn't have eaten recently.

Induction is somewhat subtler, but not a lot. The basic idea is probably best regarded as an aid to avoid writing arbitrarily long proofs, but maybe not best explained that way. Imagine you have to say how to walk from one end of a straight line to the other. To describe how to do this, you might say "take one step" the number of times required to get from one end to the other, but that would end up being a bit long-winded. More simply, you might say "walk in that direction, and when you get there stop." This is what induction is: you say how to do a little bit of the problem, and then you say to keep doing that until you're done. People also talk about it as a line of dominos: if you know that if one falls then the next one does and you push the first one over, they all must fall.

The formal version is this: if you have something you want to prove about all integers, say the proposition P, you would start by proving P(0), that is to say that P holds for zero. Then you show that P(n) implies P(n+1) for all n; in words, if P of one number, then P of the next. This second proposition sets up the line of dominos (true for zero implies true for one, true for one implies true for two, and so on) and the first pushes them all over.

There's a nice combination of these ideas that I hope to use with cavalier abandon: minimal counterexample. Whenever you're trying to show something about positive integers by contradiction, you can always assume you've got your hands on the smallest number that doesn't work. This is exactly the same as induction (since if you've got the smallest counterexample, the next smallest number isn't one; the nonexistence of a smallest is then the induction principle above), but applications of it look a little bit different, as you'll no doubt see soon enough.

Monday, May 23, 2005

Math Post the Minus First

...I was thinking of this great proof of something you already know yesterday, and I wish I could tell you...

Most people have some idea what money is. Most people can identify what an interest rate is, and most people have an understanding of what it means to go into debt.

Most people have at least a vague notion of DNA -- it's that stuff that makes you a person rather than a chimpanzee, or vice versa. Most people know what an animal is, and most people know about cells.

Most people know about molecules. Most people (with kitchens) have worked with acids and bases, and most people understand that cold things freeze.

Most people have absolutely no idea about groups. Most people have no idea about varieties, and most people have no idea about manifolds, rings, sheaves, or differential equations.

Such are the plagues of the mathematician. When most other scientists talk about their profession, understandings of some of the basics can be assumed of anybody asking "what do you do?" We lose pretty hard on this score; even if I say "prime number," a notion hardly more complicated than "number" itself, I already lose half my listeners. Hrmph.

So, between now and (forever, probably), I'm going to try to write the gentlest possible introduction to advanced mathematics, particularly focusing on my advanced mathematics because I'm horribly egocentric. I'd love to eventually be able to post about the interesting things I hear in talks or classes or read in papers, but before I can even think about doing that I have to give a million back definitions and bend every reader's mind in at least twelve ways to make them care. I'm trying anyhow.

A few ground rules: I'm not requiring background, per se, but I am asking that readers be willing to think, since even the (relatively florid) stuff I want to write will require pondering to understand. I'll start with warmups, but I want to get to genuine stuff soon. I'll try to avoid proofs, much to my chagrin, because I recognize that most readers care much less than I do about what's really happening and really want to just get a vague idea of what's going on; also it cuts down on the writing to only give that vague idea. I'll try to sneak in some stuff about philosophy and methodology (since induction, for instance, really is interesting in its own right) in interludes here and there, but mostly I'll try to leave well enough alone. I'll ask that you be comfortable with symbols and equations, but I'll try to keep the optimal balance -- symbols only when they make things clearer. Lastly, I'll try to build in complexity, starting with the familiar so that reading the archives will get you ready for the exotic, but I want to start almost agonizingly simple and I therefore have to ask that you don't take my tone as too condescending. I'll feel really stupid explaining prime numbers, and many readers, I don't doubt, will feel condescended to, but if I don't start the discipline of talking slow with small words now I'll just start launching into discussions of positive-definite nodegenerate symmetric bilinear forms assuming everybody knows what I'm talking about, which would distinctly be a bad thing.

Well now. Time to commit before it gets too late. First, a brief interlude on symbols and logic; then, the beginnings of number theory.

This will be interesting...

PS: For the record, I'm aiming for Monday-Wednesday-Friday as a posting schedule until I'm remotely up to date. Also for the record, the proof was of why casting out nines works. It's really cute, and I do genuinely wish I could tell you.

Edit: I'm not so clever with the date-time settings sometimes -- this is supposed to be recent, not old. Sorry.

Sunday, May 22, 2005

Meme again

So Neil, having done another meme, has inspired me to finally complete the much-overdue Caesar's Bath meme handed me by Julie what is now quite a long time ago. I should beg some excuse, but the best I can come up with is that I have genuinely been thinking about it the whole time, and unfortunately I chose to interpret it fairly strictly: for me "I just don't get it" is not synonymous with "I don't like it." The game is finding something whose very appeal you simply don't see, which makes it rather harder. But without further ado:


  • Fantasy. As a genre. Science fiction I get, power fantasy I get -- the imaginary world that could never be and shows nothing special about the people that live in it just isn't obvious in its appeal from my perspective. This may be because my perspective is somewhat limited, but I genuinely don't think so.
  • Dancing. It occasionally happens that people I know want to go out dancing for the sake of dancing and not for the sake of something else (a reason to get drunk, getting play, what have you), and this boggles my mind. I get dancing as a social event, I get dancing as community, I even get dancing in some complicated fashion (English, line, etc.), I just don't get dancing for its own sake.
  • BDSM. Pain, restraint, power, just not appealing to me in an actual sexual situation and I don't even see why they could be. Sorry.
  • Lesbians as an object of male sexual desire. Say it along with me: lesbians aren't interested in you. By definition! That's what it is to be a lesbian! It could be that I've known a few too many lesbians too closely to even imagine lesbians as attractive to men anymore, but that's the way it is.
  • Personal relationships with God. This may be the only one that's even a minor cheat. Agnostic though I am (and unlike PZ over at Pharyngula, I'm a mathematician and not a scientist and therefore can't reject God merely based on a perponderance of the evidence), I do see at least the external signs of having deep belief, and they seem pretty good, so in that sense I understand the attraction. What I don't get is how a sensible person could possibly get to the point where they can accept such a seemingly crazy thing.


I toss the ball to Neil, Tony, and whoever comments first on this post, thus proving that they might actually see such a baton-passing...

Friday, May 20, 2005

Star Wars

Hrm. Tony seems to think I should say things about Star Wars, and indeed I've got a few thoughts. I promise that only half of them will be nitpicky or snarky. They'll be plenty spoilerific though, but since I have no idea how to hide it below a fold, it's just going to be up top.

Firstly, my primary nitpick/snark: of course the film had a liberal bias, since none of the bad stuff could possibly have happened if the Jedi had access to non-abstinence-only sex ed. Or even decent reproductive health technology. Either way. Also of course the obvious takehome point: if he force-chokes you, leave him.

In reality, there's no strong political drive to the film -- epic is epic, and even the little bits of dialog that can be snipped out to pretend things swing one way or the other ("only a Sith thinks in absolutes," "from my point of view, the Jedi are evil!") can be snipped out in more or less equal proportion. The only good argument I can think of one way or the other is that the film definitely hews to the axiom that whichever side is committing the atrocities is the bad guys, and this is only left or right in the crazy version of politics. We may be living in crazy politics now, but that part of the movie was very much written in the eighties with the rest of the outline, before this axiom was twisted (like "we should listen to government policy experts," "reporters should ask everybody hard questions" or "evolution exists") into a partisan opinion, so I think we're safe on that score.

From having seen my esteemed college science fiction association's MSTing of Phantom Menace, I'm reminded of the parking shot phenomenon. For those not in the know, the parking shot is just that: a shot of something parking. While they can be establishing shots like any other, oftentimes, particularly in action movies, shots of planes, cars, spaceships, or whatever parking or coming in for a landing are just used gratuitously to add time. Phantom Menace features an approach to Coruscant involving eight separate parking shots with no dialog at all. Sith, at least, has relatively little parking, and is a relatively good movie, suggesting the value of "number of parking shots" as a measure of goodness of movie (what we might call a "cinemetric").

A nitpick more or less equal to the first is that Bail Organa seems to have forgotten to take the jets off of R2 when he had C3PO mindwiped. Funny he never gets to use them again... but that's not really the point. It seems to me that one thing that Lucas seems to get more and more into over time is slapstick. I can remember none in A New Hope, little in Empire, a bit more with Ewoks and Boba Fett in Jedi, and scads and scads in the new trilogy, all of which I've seen quite recently. In Episode III, there's a fair bit of gratuitous slapstick, and even though Lucas appears to have figured out how to make it work again after forgetting for the previous two movies, there's still enough dumb battledroid humor to bring things down. Humor is really important to the Star Wars films, but slapstick in the large sticks out unpleasantly. Most of the funny bits of episodes one and two were slapstick, so seemed annoying and out of place; episode three moved back to more character humor, which worked a lot better.

Even major points seemed, under further consideration, better than other recent movies -- even when characters seem to be carrying the idiot ball (most notably when Mace Windu spontaneously changes his mind about whether to arrest Palpatine or kill him, just in time for Anakin to see it go down) they basically act within the bounds of plausibility. I might want to shoot them for behaving in ways the movie doesn't quite motivate properly (particularly the rate at which Anakin turns evil, though smart people can disagree) but they basically don't do dumb things. So good on that.

When the apocalyptic battle between Yoda (who is, as always, awesome, not to mention the only character who should ever be permitted to say "youngling") and the Emperor starts up with the tossing around of flying donuts, y'think there's a metaphor of some sort going on? Heavy-handedness aside, the real issue for me here is that the Jedi don't have a place in the political structure. In Doc Smith's Lensman series, the Lensman (on whom the Jedi are based) are more or less in charge of everything, but nobody minds because they're also incorrruptible by authorial stipulation.* But here, who knows? Are the Jedi more or less the military? Are they in fact charged with protecting democracy? It seems like lots and lots of the plot hinges on Jedi not having a clear place in the political culture, and the exact meaning of the "Jedi code," in the sense that most of the issues seem like they'd go away if there were answers to these questions, almost regardless of what those answers are.

I think, on balance, that I liked it. Characters make hard choices, and that always wins points. Friends seem to like each other. Nobody has a thought quite as ridiculous as "I like you because you're not like sand." I'm not sure it's wholly redeeming, but it's definitely worth seeing.

*You might not want to read the Lensman novels, but let me at least say that they're kinda right-wing, very 30's, and probably the only piece of science fiction I've ever read that took science seriously (very seriously, actually) but didn't know about relativity. The really notable thing is the crazy level of homosocial stuff going on when our heros first become lensmen and see how incorruptible they all are. It's like they're lusting after each other's moral sensibility.