It is both a blessing and a curse not to be formally trained in a field like mathematics. The blessing is that every once in a while, I get to enjoy the sublime delight of figuring out something on my own. The curse is that when I go to share these exciting discoveries with others, as I'm about to do in this posting, it's almost certain that I'm putting my grave ignorance of the field on display for everyone who knows anything about the subject to see. Fortunately, I'm quite shameless in my ignorance, and after all, admitting you have a problem is the first step towards a solution.
Anyway, I was thinking about Mersenne primes a while ago, prime numbers that take the form 2^n-1, where n is a prime number. I remember testing it out: 2^3-1 is 7, which is prime. 2^5-1=31, also prime. 2^7-1=127, ALSO prime. Hmmm. Now, I remember reading that not all numbers of this form will be prime, and as it turns out, 2^11-1=2047, which is divisible by 23 and 89, but it is certain that if 2^n-1 is prime, then n must also be prime.
That's the part that puzzled me. What was so special about 2, and what is it about prime numbers that gave rise to other prime numbers this way? However, I did figure it out, and it's that proof that I want to share with you here.
Forget about powers of 2 for the time being, and consider a number like 13,131,313. Is it prime? Actually, you can tell that it's not, because its digits show a repeated pattern: 13 repeated four times. So it ought to be divisible by 13, and sure enough, you get 1,010,101 when you divide by 13.
The same principle can be generalized to any number that consists of a repeating pattern of digits. Simply take the pattern once, and the full number must be divisible by it. So 123456712345671234567 is necessarily divisible by 1234567 (you get 100000010000001).
Now, take a number that is made up of nothing but repeated 1s. Obviously, that means it's divisible by 1, but all numbers are, so let's ignore that pattern, and look for longer ones. If the number of digits is even, then the number's pattern can be described as a repeated "11", and thus the number itself must be divisible by 11. If the number of digits is a multiple of 3, then it can be described as a repeated "111". And so on. So we can see, for example, that 111,111,111,111 must be be divisible by 11; 111; 1111; and 111,111. (Of those, only 11 is actually a prime factor; you can see that for both 1111 and 111,111 must also be divisible by 11. 111 is divisible by 3, but that's due to a different divisibility test; its digits add up to a multiple of 3.)
So let's get back to the Mersenne primes, the ones that are expressible as 2^n-1. The thing to notice about the formula 2^n-1 is that if you write out the number in binary, you get a sequence of nothing but 1s. 2^n will give you a 1 followed by n zeros, so subtracting 1 you just get a sequence of n 1s.
And so, if n is an even number, 2^n-1 will be divisible by 11 in binary, which is 3. If n is divisible by 3, then 2^n-1 will be divisible by 111 in binary, which is 7. n=6 give us 63, which is divisible by both 3 and 7.
Tada! That's it. I can't tell you how pleased I was when this hit me. It was one of those aha! moments that make life good. But it also led me to some other interesting questions that I'm still thinking about today.
In particular, I'm thinking about how it applies in other bases besides 2. Now, 10^n-1 just gives you a series of n 9s in a row, which is obviously divisible by 9, so we need to tweak the formula a little to cancel that out and give us a series of n 1s instead of 9s. Easy enough. I'm interested in number of the form (a^n-1)/(a-1). Obviously they must be composite when n is a composite number, but how many are primes when n is prime?
So, in atonement for depriving you of the opportunity to figure out that Mersenne prime thing on your own, I leave you with that question. And if you're a mathematician for whom this is already all well known, I hope you at least enjoy the opportunity to tell me something new in the comments section.
Maybe we've been thinking about this the wrong way. An assortment of idle and not-so-idle thoughts on law, philosophy, religion, science and whatever else comes up.
Tuesday, 10 July 2012
Saturday, 7 July 2012
Straight Talk on DHMO
By now you've probably heard from some of those agitating for a ban on DHMO (dihydrogen monoxide). I'm somewhat distressed at the misinformation and distortions offered by these activists, and felt it was high time someone provided a more balanced perspective.
Where does DHMO come from?
Although it is frequently and easily synthesized in laboratories and as a by-product of industrial processes, most DHMO is actually extracted from naturally occuring deposits. In fact, Canada is blessed with some of the most abundant and high-quality DHMO of any country in the world, and although most of it is consumed domestically, we do export a fair bit of it, both in pure form and as an additive to other products.
Is it dangerous?
The dangers described by the anti-DHMO activists are real. DHMO can be very dangerous indeed. Inhalation of DHMO can interfere with the lungs' ability to absorb oxygen. Prolongued exposure to DHMO in any form can cause harm, and although that caused by the gaseous and solid forms are more severe, even liquid DHMO is known to cause skin to become prematurely wrinkled. The earthquake that hit Japan last year and damaged a nuclear powerplant was greatly exacerbated by a massive spill of contaminated DHMO.
I don't mean to downplay the seriousness of these and other dangers. However, as anyone who's ever worked with the stuff (as I have) knows, it's perfectly harmless when you take just a few common-sense precautions. You can literally drink a glass of pure, room-temperature DHMO and suffer no ill effects; your kidneys are actually more efficient at removing DHMO from your system than any other compound. Not only that, but a surprising amount of DHMO is excreted through your sweat glands.
To be sure, humans have an especially high tolerance for DHMO among land mammals, but most creatures do have considerable resistance to mild exposure. Marine creatures are even more resilient. I once kept a live goldfish alive in a jar of pure DHMO for a week.
It's true that we dump truly astonishing amounts of DHMO into our rivers and streams through sewage and industrial waste. However, exposure to solar radiation removes many times more DHMO from the ocean than we humans release into it. We could double, even triple our industrial and municipal output of DHMO, and the oceans would scarcely notice. Desert ecosystems are the most vulnerable to damage by DHMO dumping, but even there, sunlight quickly cleans it up; you'd have to dump an awful lot of the stuff to destroy the desert habitat.
Are there alternatives?
DHMO is one of the most useful compounds ever discovered. It is used as a coolant, a propellant, a solvent, a hydraulic fluid, a disinfectant, a fire retardant, and even as a food additive. It is a vital reactant, consumed in the production of concrete. It is widely used in health care. It is indispensible to modern agriculture, and is even heavily used by organic farmers. However, more than 90% of the world's DHMO is reserved for use in fisheries and transportation, to control the bouyancy and stability of ocean-going vessels. It is no exaggeration to say that without DHMO, there would be a lot of ships lying useless on the seafloor.
There are substitutes for DHMO for many of these uses, though not all. Unfortunately, we can't really reduce our reliance on DHMO by simply adopting substitutes, because in those cases where the substitute is as good or better than DHMO, it's already been adopted. In the remaining cases, the substitute is even more dangerous than DHMO. Most importantly from an economic point of view, DHMO is cheap and plentiful, and the substitutes simply cannot compete. And let's not forget how many jobs are dependent, directly and indirectly, on DHMO.
And those industries where there is no substitute at all are the most critical. Agriculture and fisheries are the most committed to using DHMO, and scientists have no idea of even where to look for a viable alternative. The cold, hard fact is that there are 7 billion people on this planet, and we have to feed them somehow. Without DHMO, even the most advanced modern agricultural and fishing techniques could never hope to feed more than a tiny fraction of that number.
So let's be realistic. Yes, DHMO has its dangers, but the dangers of doing without this vitally important chemical are greater still. There's no such thing as perfect safety, and while maybe someday scientists will find a better solution, that day is not here yet. Until then, we're stuck with DHMO.
Where does DHMO come from?
Although it is frequently and easily synthesized in laboratories and as a by-product of industrial processes, most DHMO is actually extracted from naturally occuring deposits. In fact, Canada is blessed with some of the most abundant and high-quality DHMO of any country in the world, and although most of it is consumed domestically, we do export a fair bit of it, both in pure form and as an additive to other products.
Is it dangerous?
The dangers described by the anti-DHMO activists are real. DHMO can be very dangerous indeed. Inhalation of DHMO can interfere with the lungs' ability to absorb oxygen. Prolongued exposure to DHMO in any form can cause harm, and although that caused by the gaseous and solid forms are more severe, even liquid DHMO is known to cause skin to become prematurely wrinkled. The earthquake that hit Japan last year and damaged a nuclear powerplant was greatly exacerbated by a massive spill of contaminated DHMO.
I don't mean to downplay the seriousness of these and other dangers. However, as anyone who's ever worked with the stuff (as I have) knows, it's perfectly harmless when you take just a few common-sense precautions. You can literally drink a glass of pure, room-temperature DHMO and suffer no ill effects; your kidneys are actually more efficient at removing DHMO from your system than any other compound. Not only that, but a surprising amount of DHMO is excreted through your sweat glands.
To be sure, humans have an especially high tolerance for DHMO among land mammals, but most creatures do have considerable resistance to mild exposure. Marine creatures are even more resilient. I once kept a live goldfish alive in a jar of pure DHMO for a week.
It's true that we dump truly astonishing amounts of DHMO into our rivers and streams through sewage and industrial waste. However, exposure to solar radiation removes many times more DHMO from the ocean than we humans release into it. We could double, even triple our industrial and municipal output of DHMO, and the oceans would scarcely notice. Desert ecosystems are the most vulnerable to damage by DHMO dumping, but even there, sunlight quickly cleans it up; you'd have to dump an awful lot of the stuff to destroy the desert habitat.
Are there alternatives?
DHMO is one of the most useful compounds ever discovered. It is used as a coolant, a propellant, a solvent, a hydraulic fluid, a disinfectant, a fire retardant, and even as a food additive. It is a vital reactant, consumed in the production of concrete. It is widely used in health care. It is indispensible to modern agriculture, and is even heavily used by organic farmers. However, more than 90% of the world's DHMO is reserved for use in fisheries and transportation, to control the bouyancy and stability of ocean-going vessels. It is no exaggeration to say that without DHMO, there would be a lot of ships lying useless on the seafloor.
There are substitutes for DHMO for many of these uses, though not all. Unfortunately, we can't really reduce our reliance on DHMO by simply adopting substitutes, because in those cases where the substitute is as good or better than DHMO, it's already been adopted. In the remaining cases, the substitute is even more dangerous than DHMO. Most importantly from an economic point of view, DHMO is cheap and plentiful, and the substitutes simply cannot compete. And let's not forget how many jobs are dependent, directly and indirectly, on DHMO.
And those industries where there is no substitute at all are the most critical. Agriculture and fisheries are the most committed to using DHMO, and scientists have no idea of even where to look for a viable alternative. The cold, hard fact is that there are 7 billion people on this planet, and we have to feed them somehow. Without DHMO, even the most advanced modern agricultural and fishing techniques could never hope to feed more than a tiny fraction of that number.
So let's be realistic. Yes, DHMO has its dangers, but the dangers of doing without this vitally important chemical are greater still. There's no such thing as perfect safety, and while maybe someday scientists will find a better solution, that day is not here yet. Until then, we're stuck with DHMO.
Sunday, 1 July 2012
Homophobia: My Excuse
It's very fashionable to condemn homophobia these days, but I don't think anyone has ever clearly articulated the very good reasons why some of us are terrified by homosexuality. Not all of us, of course, but not all of us have as much to lose.
It's all very well for ordinary people to be tolerant. They have nothing to fear at all. They can just live and let live, because whether or not someone is gay really doesn't affect how they can get along. It's none of their business.
But me, I'm a very handsome man. I'm unspeakably charming, witty and just generally attractive beyond all description. So naturally, if homosexuality is to be openly accepted, I'm going to have men hitting on me all the time. ALL THE TIME. You just don't know what it's like, if you're not as stunning as I am, and you probably aren't.
This is more than a mere inconvenience. If it were simply a matter of saying "No, thank you," and being done with it, then I'd be fine with it, as simply part of the cost of being so fabulous. We all have our burdens to bear, after all. But as we know from movies and novels, it's never simply a matter of just saying no and being done with it. No, as a general rule, we know that once a man sets his sights on a woman (or a man, I assume, though I haven't seen a lot of movies where a man chases a man romantically), he just has to be persistent, and in the end the girl will realize she's in love with him, and they'll live happily ever after. As the cliché goes, her lips may say no, but her eyes say yes. Eventually, anyway. Right?
Oh, sure. I'm heterosexual, not sexually interested in men at all. The idea of being intimate with a man in that way, well, it even kind of creeps me out a little, no offense intended. But if you pay attention to the movies, that's not really much of a factor. The woman often starts out even being actively disgusted by the man, but over time she is no match for his relentless, determined pursuit. And in fact, it even helps if he's kind of unpleasant in a way, if his charm is unconventional and hard to perceive. It's just a matter of time before she discovers that he's the man she's always wanted, even if she never thought she wanted a man at all. And so, well, I think I don't want a man, and I'm even pretty sure of it, but I don't think there's a defence against romantic persistence. Not in any of the movies or novels I've seen, anyway. Eventually he'll win me over in spite of myself, and I really don't want that to happen.
So you see, the reason I'm so frightened of homosexuality is because, like many homophobes, I'm such a delightfully attractive and wonderful human being. And we let you know we're homophobes because otherwise you'd have no way whatsoever of knowing how intensely desirable we are.
It's all very well for ordinary people to be tolerant. They have nothing to fear at all. They can just live and let live, because whether or not someone is gay really doesn't affect how they can get along. It's none of their business.
But me, I'm a very handsome man. I'm unspeakably charming, witty and just generally attractive beyond all description. So naturally, if homosexuality is to be openly accepted, I'm going to have men hitting on me all the time. ALL THE TIME. You just don't know what it's like, if you're not as stunning as I am, and you probably aren't.
This is more than a mere inconvenience. If it were simply a matter of saying "No, thank you," and being done with it, then I'd be fine with it, as simply part of the cost of being so fabulous. We all have our burdens to bear, after all. But as we know from movies and novels, it's never simply a matter of just saying no and being done with it. No, as a general rule, we know that once a man sets his sights on a woman (or a man, I assume, though I haven't seen a lot of movies where a man chases a man romantically), he just has to be persistent, and in the end the girl will realize she's in love with him, and they'll live happily ever after. As the cliché goes, her lips may say no, but her eyes say yes. Eventually, anyway. Right?
Oh, sure. I'm heterosexual, not sexually interested in men at all. The idea of being intimate with a man in that way, well, it even kind of creeps me out a little, no offense intended. But if you pay attention to the movies, that's not really much of a factor. The woman often starts out even being actively disgusted by the man, but over time she is no match for his relentless, determined pursuit. And in fact, it even helps if he's kind of unpleasant in a way, if his charm is unconventional and hard to perceive. It's just a matter of time before she discovers that he's the man she's always wanted, even if she never thought she wanted a man at all. And so, well, I think I don't want a man, and I'm even pretty sure of it, but I don't think there's a defence against romantic persistence. Not in any of the movies or novels I've seen, anyway. Eventually he'll win me over in spite of myself, and I really don't want that to happen.
So you see, the reason I'm so frightened of homosexuality is because, like many homophobes, I'm such a delightfully attractive and wonderful human being. And we let you know we're homophobes because otherwise you'd have no way whatsoever of knowing how intensely desirable we are.
Thursday, 28 June 2012
Streaking and Peeking: A Paradox of Privacy
Here's something that always used to puzzle me. If I get a ladder and climb up to peer in your second-floor bedroom window to watch you changing your clothes, I commit an offense against you. Yet if I'm walking down the sidewalk, and you appear there nude, you commit a offense against me. In each case, the same thing happens: I see you naked. Yet in the first instance, I'm the bad guy, and in the second, you are.
I don't deny the moral intuitions here. I do feel that intruding on someone's privacy is wrong, and so peering through someone's bedroom window ought to be condemned. I am less comfortable treating public nudity as a criminal offence, but there is some logic to things. In our culture, at least, there is embarrassment all around when one person sees another person nude in all but a few contexts. The difference between these two cases is whose wilful act instigates the embarrassing incident.
But I think it's worth paying some attention to how privacy seems to work in things like this, and why we are usually embarrassed when it's violated. Rationally speaking, there really ought not to be anything embarrassing about using a toilet. It's not as if it's a secret; as the title of the book says, everybody poops. Similarly, everyone has a nude body under their clothes. Almost everyone has some kind of sexuality, as well. So the privacy interest can't really be about preventing other people from knowing these shocking truths. And yet, it would undeniably be a violation of my privacy for you to walk into my bathroom while I'm taking a perfectly ordinary shower. And likely you would feel embarrassed as well, inadvertently walking in like that.
It seems to me that the realm of privacy is not exactly one of secrecy as such, but of polite ignorance, so to speak. You know I poop, and I know you poop. But unless we are very intimate with each other, it's very awkward for both of us to have concrete images of each other engaged in that perfectly normal biological exercise. We don't need to know the details, and it's unseemly and undignified to be interested in them. That's why I'd be embarrassed to walk in on you in the bathroom. I don't wish to appear as if I am interested in such things.
I found myself reflecting on this while reading the Supreme Court's decision in R. v. Butler. In that case, the Court articulated that the test for obscenity is "concerned not with what Canadians would not tolerate being exposed to themselves, but what they would not tolerate other Canadians being exposed to."
Ah, so close, I thought! There's one little distinction that I feel they missed. Is it that I wouldn't tolerate someone else being exposed to something, or is it that I wouldn't tolerate knowing that someone else is exposed to it? I don't have a problem with you going to the bathroom; I just don't want to know the details. I would prefer to remain politely ignorant of it, because it is none of my business, and ought not to be made such. Likewise, I don't really care what your sexual fetishes are or what kind of pornography you may be interested in, but I'd really rather not know what turns you on (unless we're very intimate).
And so here's the paradox. If we treat obscenity as something we won't tolerate other people being exposed to, then it becomes the state's business to inquire into what they're being exposed to. But the thing that makes me object to what other people look at is precisely that I don't think it's my business and I don't want to know. So investigating and prosecuting obscenity simply exacerbates the problem for me. There's no dignified way for me (whether directly myself or collectively through the state) to concern myself with your private matters. I feel that to intrude on your privacy through obscenity legislation is just as degrading to me as it would be were I to be caught hiding a closed-circuit camera in your bedroom.
So, I feel ashamed for the moralizing prudes who go on crusades against pornography. I felt ashamed for, well, pretty much the whole of the U.S. Congress when they became so profoundly interested in President Clinton's privately sleazy behaviour. I feel ashamed for those who are expressing outrage that a Manitoba Queen's Bench Justice has a sex life. And I feel ashamed when I see gossip magazines in the checkout line, boasting about the intimate details of celebrity's lives revealed within. These are things are none of our business, and not only should we not be interested in them; we should be studiously, politely ignorant of them when they are revealed to us.
Last week, an image was being circulated on Facebook, ostensibly by some honourable fellow who had rebuffed some woman's indiscreet advances to him while her brave husband was off at war. "Make her famous" said the caption. And some people joined in, in righteous indignation, forwarded it to help the shameless disloyal slut get her richly deserved public embarrassment. Yet I felt immediately ashamed for those forwarding it, not because it turned out to be a hoax, but because they were showing a disgraceful and inappropriate interest in someone else's private life, just as if they'd climbed up a ladder to peer in a window.
Decorum, people, decorum.
I don't deny the moral intuitions here. I do feel that intruding on someone's privacy is wrong, and so peering through someone's bedroom window ought to be condemned. I am less comfortable treating public nudity as a criminal offence, but there is some logic to things. In our culture, at least, there is embarrassment all around when one person sees another person nude in all but a few contexts. The difference between these two cases is whose wilful act instigates the embarrassing incident.
But I think it's worth paying some attention to how privacy seems to work in things like this, and why we are usually embarrassed when it's violated. Rationally speaking, there really ought not to be anything embarrassing about using a toilet. It's not as if it's a secret; as the title of the book says, everybody poops. Similarly, everyone has a nude body under their clothes. Almost everyone has some kind of sexuality, as well. So the privacy interest can't really be about preventing other people from knowing these shocking truths. And yet, it would undeniably be a violation of my privacy for you to walk into my bathroom while I'm taking a perfectly ordinary shower. And likely you would feel embarrassed as well, inadvertently walking in like that.
It seems to me that the realm of privacy is not exactly one of secrecy as such, but of polite ignorance, so to speak. You know I poop, and I know you poop. But unless we are very intimate with each other, it's very awkward for both of us to have concrete images of each other engaged in that perfectly normal biological exercise. We don't need to know the details, and it's unseemly and undignified to be interested in them. That's why I'd be embarrassed to walk in on you in the bathroom. I don't wish to appear as if I am interested in such things.
I found myself reflecting on this while reading the Supreme Court's decision in R. v. Butler. In that case, the Court articulated that the test for obscenity is "concerned not with what Canadians would not tolerate being exposed to themselves, but what they would not tolerate other Canadians being exposed to."
Ah, so close, I thought! There's one little distinction that I feel they missed. Is it that I wouldn't tolerate someone else being exposed to something, or is it that I wouldn't tolerate knowing that someone else is exposed to it? I don't have a problem with you going to the bathroom; I just don't want to know the details. I would prefer to remain politely ignorant of it, because it is none of my business, and ought not to be made such. Likewise, I don't really care what your sexual fetishes are or what kind of pornography you may be interested in, but I'd really rather not know what turns you on (unless we're very intimate).
And so here's the paradox. If we treat obscenity as something we won't tolerate other people being exposed to, then it becomes the state's business to inquire into what they're being exposed to. But the thing that makes me object to what other people look at is precisely that I don't think it's my business and I don't want to know. So investigating and prosecuting obscenity simply exacerbates the problem for me. There's no dignified way for me (whether directly myself or collectively through the state) to concern myself with your private matters. I feel that to intrude on your privacy through obscenity legislation is just as degrading to me as it would be were I to be caught hiding a closed-circuit camera in your bedroom.
So, I feel ashamed for the moralizing prudes who go on crusades against pornography. I felt ashamed for, well, pretty much the whole of the U.S. Congress when they became so profoundly interested in President Clinton's privately sleazy behaviour. I feel ashamed for those who are expressing outrage that a Manitoba Queen's Bench Justice has a sex life. And I feel ashamed when I see gossip magazines in the checkout line, boasting about the intimate details of celebrity's lives revealed within. These are things are none of our business, and not only should we not be interested in them; we should be studiously, politely ignorant of them when they are revealed to us.
Last week, an image was being circulated on Facebook, ostensibly by some honourable fellow who had rebuffed some woman's indiscreet advances to him while her brave husband was off at war. "Make her famous" said the caption. And some people joined in, in righteous indignation, forwarded it to help the shameless disloyal slut get her richly deserved public embarrassment. Yet I felt immediately ashamed for those forwarding it, not because it turned out to be a hoax, but because they were showing a disgraceful and inappropriate interest in someone else's private life, just as if they'd climbed up a ladder to peer in a window.
Decorum, people, decorum.
Monday, 25 June 2012
Rodney King, Karen Klein and the Global Village
Like most people, I was appalled and disappointed at the video of a group of junior high school students taunting bus monitor Karen Klein this past week. To be sure, I wasn't exactly shocked; there's nothing new about such cruelty, and it's been with us for as long as we've had feelings to hurt. At least, I wasn't surprised by the cruelty; I was amazed at something else, the unseen upside to this story: that it's even a story.
Not so long ago, cameras were expensive, both to buy and to operate, what with all that film and processing stuff. Things that happened in your daily life were thus ephemeral and, for the most part, had an illusion of privacy. Things you did in public places went mostly unnoticed, and if they were noticed, they were often politely ignored and generally remained anonymous. Vicious acts of cruelty like the taunting of Ms. Klein happened all the time, but they were mostly invisible to us, often by our own choice through our amazing ability not to see or "get involved" in something that makes us uncomfortable.
But now, cameras are everywhere, and they are changing things. This past week also saw the passing of Rodney King, whose beating at the hands of LAPD officers was (unbeknownst to those officers) videotaped by one of those video cameras that were just beginning to become inexpensive enough to be in the hands of random passersby. Although the aftermath of the video included a disastrous riot, the longer term consequences have had a positive side, which grows as private cameras become ever more ubiquitous: wrongdoers (including police) can no longer rely on the public at large not to notice something. An eyewitness, present on the scene, may feel vulnerable and be trusted to just look the other way, but a camera, especially one no one else knows is there, changes all that.
The students who tormented Ms. Klein may have known they were being taped; apparently bullies like to record their victims. But like the officers who beat Rodney King, they clearly didn't expect the public to notice. But we did, and we were outraged, possibly even a little disproportionately so because the boys involved are now facing a great deal of harassment themselves. (Also, the fund set up to take donations for Ms. Klein has taken in more than half a million dollars. Arguably both the punishment and the compensation are way beyond the magnitude of the incident itself, but maybe that's one of the lessons here.)
So that's what I find remarkable about this story, the way it's part of a trend where otherwise unremarkable acts of cruelty (and of kindness) now find their ways to our collective consciousness in ways that they never did before. Marshall McLuhan's Global Village is here, though not necessarily exactly in the way he expected it to manifest. We all live in the same little village now, where if you act like a jerk in public, someone will tell your parents and you'll be shamed and learn your lesson and behave better next time. That's one of the most basic parts of growing up; we do things as kids we end up being ashamed of, because we just hadn't learned to think about other people yet. I'm pretty sure the kids who taunted Ms. Klein have had that epiphany, which is great, and it's nice that so many people have chipped in to give her a bit of compensation, but to me the bigger picture is that there must be thousands of kids out there who saw this whole thing and suddenly understood their own behaviour in a new light, and who have become a lot nicer to their classmates, teachers, lunch ladies and bus monitors as a result.
In a very few small but encouraging ways, I really think the world is becoming a better place.
Saturday, 23 June 2012
Alan Turing
Today is the 100th birthday of Alan Turing, and a lot of my friends are circulating graphics on Facebook honouring the great computer scientist. Many of these graphics also mention the grave injustice committed against Turing (and against many others whose names are largely unknown, other than Oscar Wilde) when he was prosecuted for homosexuality. As a computer user, of course, I am in debt to Alan Turing for his contributions to the foundations of this technology. But when I think of Alan Turing, what comes to mind for me most often is the Turing Test.
Early in the emergence of computers, people spoke of them as "electric brains", and excitedly speculated about how one day soon, computers would be able to think like humans. Well, that's not materialized quite yet, as it turns out human brains work quite differently from binary computers. But it may yet happen, and so the question they asked back then is still worth asking: How could we tell?
Turing suggested a fairly simple way to answer, which became known as the Turing Test, and works like this. You put the computer in one room, and a human in another, and you allow them to communicate via a teletype machine. (Nowadays, we'd just say to use a chat client or something like that, but it's pretty much the same thing.) The human is not told who or what is on the other end of the machine, but asked to form an opinion as to whether or not it's a human based on the conversation they have over the teletype. If, after a sufficiently lengthy conversation, the human is unable to tell if she's talking to a computer or a human, the computer has passed the Turing Test, and may be considered an actual thinking being.
Turns out this is a lot harder than it seemed at first. Writing a program just to understand natural language is an amazingly complex task, let alone a program that can formulate an intelligible and relevant response. But it's actually relatively easy to make something that superficially looks like it's doing both. You may have heard of ELIZA, a program written in the mid 1960s which took input in the form of typed English sentences and generated an output (also usually a complete English sentence) that appeared to be an appropriate response to the input. For example, if you typed in something like, "I feel like nobody understands me," ELIZA might respond, "Why do you feel like nobody understands you?"
Of course, that's not really an intelligent response. All you have to do is strip out every instance of "I" and "me" and replace them with "you", and put "Why do " in front of the resulting string, replacing the final period with a question mark. You'd be surprised how often that works for sentences beginning with the word "I". And ELIZA was programmed with a few similar, simple transformational rules that allowed it to produce surprisingly natural-sounding responses.
Yet you never got any kind of spontaneous independent thinking from ELIZA. True, there were a couple of tricks built-in to simulate a couple of semi-spontaneous observations. For example, if there were no mentions of any of a list of keywords ("mother", "father", etc.) for some length of time, ELIZA would say something like, "I notice you are avoiding the subject of your family." But even with this, something was always missing. It wouldn't take very long for a most people to decide ELIZA was not actually human, assuming they were aware of the possibility it wasn't. It'd be even faster today, with the variety of chatterbots out there on the web.
I have on occasion had the very great privilege to teach philosophy at the university level, and every time I've done so, I've used the Turing Test to explain what it is I want from my students when they write essays. Some students think that the ticket to a good grade is to agree with whatever the professor's opinion seems to be, and I suppose that's actually the case with some professors, but that's not what I wanted from my students. A computer program like ELIZA could repeat or paraphrase what was copied down in notes from lectures, or parsed from the readings. I didn't want that. I told my students I wanted them to pass a Turing Test, to convince me that the papers I was going to grade were written by intelligent, independent thinkers. And I'm pleased to say that most of the time, they were.
Early in the emergence of computers, people spoke of them as "electric brains", and excitedly speculated about how one day soon, computers would be able to think like humans. Well, that's not materialized quite yet, as it turns out human brains work quite differently from binary computers. But it may yet happen, and so the question they asked back then is still worth asking: How could we tell?
Turing suggested a fairly simple way to answer, which became known as the Turing Test, and works like this. You put the computer in one room, and a human in another, and you allow them to communicate via a teletype machine. (Nowadays, we'd just say to use a chat client or something like that, but it's pretty much the same thing.) The human is not told who or what is on the other end of the machine, but asked to form an opinion as to whether or not it's a human based on the conversation they have over the teletype. If, after a sufficiently lengthy conversation, the human is unable to tell if she's talking to a computer or a human, the computer has passed the Turing Test, and may be considered an actual thinking being.
Turns out this is a lot harder than it seemed at first. Writing a program just to understand natural language is an amazingly complex task, let alone a program that can formulate an intelligible and relevant response. But it's actually relatively easy to make something that superficially looks like it's doing both. You may have heard of ELIZA, a program written in the mid 1960s which took input in the form of typed English sentences and generated an output (also usually a complete English sentence) that appeared to be an appropriate response to the input. For example, if you typed in something like, "I feel like nobody understands me," ELIZA might respond, "Why do you feel like nobody understands you?"
Of course, that's not really an intelligent response. All you have to do is strip out every instance of "I" and "me" and replace them with "you", and put "Why do " in front of the resulting string, replacing the final period with a question mark. You'd be surprised how often that works for sentences beginning with the word "I". And ELIZA was programmed with a few similar, simple transformational rules that allowed it to produce surprisingly natural-sounding responses.
Yet you never got any kind of spontaneous independent thinking from ELIZA. True, there were a couple of tricks built-in to simulate a couple of semi-spontaneous observations. For example, if there were no mentions of any of a list of keywords ("mother", "father", etc.) for some length of time, ELIZA would say something like, "I notice you are avoiding the subject of your family." But even with this, something was always missing. It wouldn't take very long for a most people to decide ELIZA was not actually human, assuming they were aware of the possibility it wasn't. It'd be even faster today, with the variety of chatterbots out there on the web.
I have on occasion had the very great privilege to teach philosophy at the university level, and every time I've done so, I've used the Turing Test to explain what it is I want from my students when they write essays. Some students think that the ticket to a good grade is to agree with whatever the professor's opinion seems to be, and I suppose that's actually the case with some professors, but that's not what I wanted from my students. A computer program like ELIZA could repeat or paraphrase what was copied down in notes from lectures, or parsed from the readings. I didn't want that. I told my students I wanted them to pass a Turing Test, to convince me that the papers I was going to grade were written by intelligent, independent thinkers. And I'm pleased to say that most of the time, they were.
Friday, 22 June 2012
I Find Your Lack Of Faith Disturbing: Musing on the Invisible Hand
A few months ago, a friend of mine told me of a question on an exam he took in an economics course. I'm paraphrasing, but it was something like "Government intervention can only harm the efficiency of the market: True or false?" The "correct" answer was "true". Well, I found this troubling for a couple of reasons, most obviously because the underlying ideology (that government is bad for the economy) is so absurdly false.
It's obviously false if you stop to think about it in any detail because there are forms of government interference without which most of our modern economy would be completely impossible. We have laws, police and courts not only to enforce the property rights that libertarians value so much, but also to enforce the contracts that make up the economy in the first place. Government also flagantly intervenes in the market by creating artificial forms of rights, such as intellectual property, that dramatically transform the economic landscape. And perhaps most pervasively, there is money. Money, a system of currency that enormously facilitates transactions by providing a simple, uniform unit of value, is a service created and provided by government, and it is almost impossible to describe how much that single piece of government intervention enhances the efficiency of the market.
Okay, so maybe those kinds of government interventions in the economy are necessary, the laissez-faire ideologue might concede. But they're just to ensure the basic requirements of free trade. OTHER kinds of intervention, like taxes and regulations on who can do what with their property, those are always bad. Free markets have to be free, and any time you interfere with that freedom, you lose the benefit of the free market which always axiomatically produces the most efficient possible allocation of resources.
Hey, I'm totally into that Invisible Hand thing. Free markets are, generally, the best way of finding prices for things, and they tend to produce efficient solutions to allocation problems. Markets adapt to changes in costs of production, availability of substitute goods, and all those unpredictable vicissitudes of the real world. Price of oil goes up? Well, watch as ripples through the markets spread, and prices of everything else adjust to an optimum distribution given the new cost of energy. Oh look, the rising price of oil has made it economical to invest in that new form of solar energy! Solar electricity becomes cheaper, ripples spread through the market, and a new equilibrium forms.
So when free market ideologues complain about how the government shouldn't interfere with the free market by imposing taxes on this vice or subsidizing that public good, for fear that it will distort the pure functioning of the Invisible Hand, I am baffled. The Invisible Hand isn't some fickle faerie who will only work its magic if we leave out the right kind of milk and cookies, and will run away and leave us helpless if we offend it. It's a powerful statistical principle, almost on the order of a Law Of Nature. Markets will be free, regardless of how hard we might try to constrain them, because markets are made up of independent individuals, some of whom exercise a great deal of creativity to find a way to exploit them. The Invisible Hand is far, far more powerful than conservatives give it credit for.
Now, you can argue about whether or not a particular government policy is a good idea. If the government decides to impose a tax on pollution, for example, to try to internalize that externality (to use economist-speak), you can argue about whether or not the tax is the right amount or the best way to address the problem or even whether there's a problem at all. There's lots of valid reasons to favour or oppose any given government policy. But whenever someone starts talking about how it will interfere with the efficiency of the market, I wanna reach out and force-choke them.
It's obviously false if you stop to think about it in any detail because there are forms of government interference without which most of our modern economy would be completely impossible. We have laws, police and courts not only to enforce the property rights that libertarians value so much, but also to enforce the contracts that make up the economy in the first place. Government also flagantly intervenes in the market by creating artificial forms of rights, such as intellectual property, that dramatically transform the economic landscape. And perhaps most pervasively, there is money. Money, a system of currency that enormously facilitates transactions by providing a simple, uniform unit of value, is a service created and provided by government, and it is almost impossible to describe how much that single piece of government intervention enhances the efficiency of the market.
Okay, so maybe those kinds of government interventions in the economy are necessary, the laissez-faire ideologue might concede. But they're just to ensure the basic requirements of free trade. OTHER kinds of intervention, like taxes and regulations on who can do what with their property, those are always bad. Free markets have to be free, and any time you interfere with that freedom, you lose the benefit of the free market which always axiomatically produces the most efficient possible allocation of resources.
Hey, I'm totally into that Invisible Hand thing. Free markets are, generally, the best way of finding prices for things, and they tend to produce efficient solutions to allocation problems. Markets adapt to changes in costs of production, availability of substitute goods, and all those unpredictable vicissitudes of the real world. Price of oil goes up? Well, watch as ripples through the markets spread, and prices of everything else adjust to an optimum distribution given the new cost of energy. Oh look, the rising price of oil has made it economical to invest in that new form of solar energy! Solar electricity becomes cheaper, ripples spread through the market, and a new equilibrium forms.
So when free market ideologues complain about how the government shouldn't interfere with the free market by imposing taxes on this vice or subsidizing that public good, for fear that it will distort the pure functioning of the Invisible Hand, I am baffled. The Invisible Hand isn't some fickle faerie who will only work its magic if we leave out the right kind of milk and cookies, and will run away and leave us helpless if we offend it. It's a powerful statistical principle, almost on the order of a Law Of Nature. Markets will be free, regardless of how hard we might try to constrain them, because markets are made up of independent individuals, some of whom exercise a great deal of creativity to find a way to exploit them. The Invisible Hand is far, far more powerful than conservatives give it credit for.
Now, you can argue about whether or not a particular government policy is a good idea. If the government decides to impose a tax on pollution, for example, to try to internalize that externality (to use economist-speak), you can argue about whether or not the tax is the right amount or the best way to address the problem or even whether there's a problem at all. There's lots of valid reasons to favour or oppose any given government policy. But whenever someone starts talking about how it will interfere with the efficiency of the market, I wanna reach out and force-choke them.
Subscribe to:
Posts (Atom)