Showing posts with label science. Show all posts
Showing posts with label science. Show all posts

February 24, 2012

Shame on you, CNR Rao

Plagiarism is a continuing bane. Young novelists with a Harvard pedigree do it, newspapers do it; sometimes newspapers plagiarize themselves with hilarious results. (If you catch them at it, that is).

Cricket-related examples that I ran into a few years ago: You left out dazzling, and Congratulations, Virender Sehwag.

The latest example to hit the news has nothing to do with cricket. It's from a paper co-authored by the eminent scientist CNR Rao. There's plenty of coverage in the press, and comment elsewhere by far more informed folks than me, so I won't try to duplicate it. (For example, see Abi's two posts The Rao Row and Prof Rao responds, and Rahul's three posts on his blog).

I'm only writing this to vent some steam: I'm just appalled by CNR Rao's reaction to this episode. If he had said nothing, it would have blown over as a relatively minor transgression that even the journal concerned was essentially willing to overlook. But instead, Rao chose to speak to PTI about it. And he says, first of all:

"This should not be really considered as plagiarism, but an instance of copying of a few sentences in the text."

Just what does that mean? In my dictionary, the word is defined as "the practice of taking someone else's work or ideas and passing them off as one's own." How does copying of a few sentences from another paper evade this description?

But if CNR did not quite cover himself with glory with that remark, he digs himself further in the mire with these:

"I myself had written to the Editor that it was best to withdraw the paper … I did not directly produce the manuscript which I normally do."

CNR is implying here that he didn't read the paper that carries his name on it (first), and that when he apparently did read it, he himself thought it wasn't worthy of publication. Both of which reflect extremely poorly on an eminent scientist.

But CNR sinks below mire, and into despicability, with one final remark. The "copying", he said, happened "because of X" (X being the student whose name appears on the paper). Instead of having the courage and decency to take the blame himself, CNR chooses to blame, by name, the student: thus likely leaving a permanent black mark on a young scientist's career.

Shame on you, CNR Rao. I can only hope you are the exception in Indian science, not the rule.

September 30, 2011

Recursively Yours

Yours to read, my new Mint column, Recursively Yours to read, my new Mint column, Recursively Yours to read, my new Mint column ... here.

(I called it "To Recurse, Perchance to Dream", Mint preferred "Recursively Yours").

In case the link does not work, the text is below. Comments, as always, welcome.

***

Our kittens have never stepped out of our flat. So I'm wondering about teaching them a foolproof method, call it the CatOut method, to find their way downstairs for a stroll. Now I'm sure they understand human-speak -- all right, I'm overly fond of felines -- so here's what I might whisper in their furry ears: "CatOut starts by checking if you're already on the ground floor. If so, you're done: race out to the road. If not, walk down one flight of stairs and do the CatOut from there."

Simple, right? So what happens when Aziz and Cleo do the CatOut at our fourth floor flat? They'll check: are we on the ground floor? No. Therefore, walk down one flight, to the third floor. Apply CatOut there. Meaning, they'll check: are we on the ground floor? No. Therefore, walk down one flight, to the second floor. Etc. In minutes, they'll shoot joyously out of the building, onto the road.

Look at it like this: We've defined their trip from a given floor in terms of the same trip from the floor below. We've defined it in a way that every computer science student will recognize: recursively.

Recursion is a profound and powerful idea. If you do it right, it works like a dream. But for me, its real appeal is that it's like saying: "You want to do this? Just go do it."

Or: "You want to learn how to swim? Jump in and start swimming." Best way to learn.

Because sometimes when you have a problem, detailed instructions get intense and complicated. Far better to just attempt a solution to a smaller but related problem, learning as you go. The power of recursion is precisely that it defines a task in terms of a simpler version of itself. By a clever bit of self-reference that, finally, reduces a daunting problem to a series of easy ones.

You specify an endpoint in which the task becomes trivial: if on the ground floor, run for the road. You specify a recursive case that reduces the task -- descend a flight of stairs -- because apart from the reduction the procedure is then identical: make the trip, but from one floor below.

Do this repeatedly, and CatOut becomes just a series of descents, one flight at a time. This way, you know Aziz and Cleo can reach the road from the ground floor, from the 10,679th floor, or even from the top of a building with an infinity of floors. (Though after descending a few million flights, you may hear a few yowls of protest. You have been warned.)

So yes, computer science students learn recursion, though not through the good offices of Aziz and Cleo. Instead, it works well, for example, for one of the earliest programming problems they tackle: calculating the factorial of a positive number.

The factorial, written with an exclamation mark, is what you get when you multiply all the numbers between 1 and the original number.

Thus 5! (read "five factorial") = 1 x 2 x 3 x 4 x 5 = 120.

And 100! = 1 x 2 x 3 x 4 x … x 97 x 98 x 99 x 100 = a number so large, I feel tired even trying to contemplate it, leave alone calculate it.

But while factorials quickly get large, you can tell a computer -- a stupid machine that can multiply two numbers, but no more -- how to calculate them via a short recursive procedure.

Note only that 5! = 5 x 4!, or 100! = 100 x 99! = 100 x 99 x 98!, etc -- you can break those down further. In English, the procedure looks like this: to calculate the factorial of a number, check -- is it 1? If so, the answer is 1 (the trivial case) and you're done. If greater than 1, the answer is the product of the number itself and the factorial of the number immediately below (the recursive step).

Do this repeatedly, and instead of an intimidating factorial calculation, the computer is left to do what it can: multiply pairs of numbers, a series of pairs. The power of recursion.

In my computer science days, my colleagues and I obsessed about writing what we called "elegant" software. We didn't always succeed, and it wasn't always clear what qualified as elegant in a particular situation. Yet we all recognized that it usually is clear, innovative and has a satisfying dash of panache.

And some of the most satisfyingly elegant stuff came from using this thing called recursion. Because if you get it right, recursion can substitute for chunks of clumsy programming.

"To recurse is divine", said the legendary computer scientist L Peter Deutsch. Me, I like learning by breaking things down, by doing, by simply getting going. That's what recursion's about, for me. Don't know much about divinity, but I'll take elegance every time.

September 16, 2011

Uncertainly yours, the cat

My new math/science effort for Mint is in the paper today: Uncertainly Yours, The Cat.

It's about Lajwanti the cat, errant electrons and a mirror too. I tried my usual -- work in the gratuitous mention of Lady Gaga -- but yet again, I wasn't able to manage it. So the count of Gaga mentions in my columns remains stuck at one, more's the pity.

And as usual, in case the link doesn't work, the text is below.

Your thoughts always welcome.

***

Postscript: Please read Rahul Siddharthan's debunking of my article, here. Live and learn.

***

With two cats at home, it's always a delight when they compete to rub themselves against my shin. So I sometimes wonder, why would anyone dream up a cat? "DD's lost it", you're thinking. But I would submit that the world's best-known cat, at least among physicists, is an imaginary one.

And get this: she never lived, but people say she's both dead and alive.

This feline was the creation of the great German physicist Erwin Schrödinger, who died 50 years ago. Seeking to understand Heisenberg's Uncertainty Principle, fundamental to modern physics, he thought of a cat. I mean, the last thing I expected to hear about in college was a purely hypothetical cat. Yet generations of students the world over know this one well.

Absent mathematical jargon, the Uncertainty Principle says something simple: the act of measuring something affects that measurement. For example, it is impossible to determine both the location of an electron and the speed at which it moves. If you measure its speed accurately, this process of measurement itself makes its location hard to pin down, and vice versa. The uncertainty in one measurement, Heisenberg tells us, depends on the uncertainty in the other.

Looked at another way, measurement decides the state of the electron.

This is not such a mysterious idea. Imagine an anthropologist visiting a tribal village to study its inhabitants. His very presence will disturb the state of the village: we all behave differently when strangers come visiting. By observing, the anthropologist affects what he wants to observe. He never gets a "true" picture of the village.

Sure, but why is this important? Traditionally, physics nurtured the idea that nature's laws tell us the past and future. If we can fully describe the state of the universe right now, for example, we can deduce its state at any other time. Heisenberg shattered this romantic notion. Not only is there uncertainty in the properties of things, the act of measuring properties itself increases uncertainty. You cannot determine the state of the universe at a given time; life is not predictable.

Now this is fine with tiny particles like electrons that nobody can see anyway. What about ordinary objects?

What about, say, cats?

That very question occured to Schrödinger. His famous thought experiment went something like this. Put Lajwanti the cat into a box. Also put in a device that, when turned on, might or might not emit a single electron. That is, over a minute, the chances are exactly 50-50 that it emits an electron. If it does, it also releases a poisonous spray, goodbye Lajwanti. If it doesn't, she lives to fight another minute.

Seal the box and put it far enough away that you can't tell what's going on inside. Turn on the device for exactly one minute. What happens to the cat?

Trivial question, right? The answer: we don't know. The Uncertainty Principle reminds us that we can't predict the behaviour of the device: even if we pinpoint the location of its every electron, we have no idea about their motions, no way to determine their behaviour during that minute, no way to tell if one will be emitted. Thus we don't know if Lajwanti is alive or dead.

Until, of course, we walk over to the box and open it to hear -- let's hope -- the loud miaow of a bewildered cat. Only then do we actually know that she survived her uncertain ordeal.

With the box sealed, we know only that Lajwanti is either alive or dead. This must seem blindingly mundane. But it is entirely consistent with the laws of physics to think of her, before opening the box, as simultaneously alive and dead. Here's the crucial idea: the act of opening the box and looking in on Lajwanti -- taking a measurement, in other words -- is what puts her definitely into one of those two states: alive, we hope.

What's the point? What's so profound about a cat shut into a box?

Well, there's the effect of measurement, the idea of uncertainty, and more. But perhaps the deepest yet simplest point is this: reality takes shape only when we observe it.

We know an electron is emitted only when we detect it. The anthropologist learns something about tribal customs only when he actually observes a tribe, even if that affects their behaviour. We find out poor Lajwanti's fate only when we open Schrödinger's box.

Haven't we all wondered on these lines before? If I turn my back to the mirror, is my image really there? If there's nobody to hear, does a tree that falls in a forest make a sound?

Is there reality without observation, existence without consciousness?

Schrödinger's cat shows that the laws of physics might answer those questions with "no". That may be too extreme for people who believe reality surrounds them without needing to be looked at.

Then again, Lajwanti herself isn't real.

July 22, 2011

Notes to myself

My new effort for my "A Matter of Numbers" column in Mint is up and running. It talks about Hertz (but not Avis), rubber bands and holding tight to a small dream.

Take a look: Notes to Myself.

Any comments welcome, as always

July 08, 2011

Short answer: 22

My "A Matter of Numbers" column in Mint is on air today (July 8). It talks about a recent fuss over 823, as also what one consequence of my having 37 fingers might be.

Take a look. Short Answer: 22.

Comments welcome.

July 04, 2011

823 and counting

What is it about the peculiar appeal of any random "numerological" claim to do with the calendar? The latest is here, a bit of flim-flam that's also making the sms and twitter rounds (and who knows, FB and blog rounds too).

Goes like this: There are five weekends (defined as Fri-Sat-Sun) this month. This is a once-in-823 years occurrence. Astrologers and numerologists and Feng Shui experts are being quoted left, right and centre about this wondrously rare event. One, a Ajay Bhambi, has it that this is a "mathematical rarity in the calendar". Another, a Sanjay Jumani, uses this as an opportunity to trumpet what he had "predicted": "This year … has been expensive right from the beginning. It will be expensive even till the end."

(Does anyone take these guys seriously? Really, anyone?)

What do you say about this stuff? I have to confess being nearly speechless on reading this 823 news. I mean, July 2005 had five weekends. July 2016 will be the same. 823 years? Where did they get that number from, this nonsense from? Why does triviality like this get gasped at and passed on in wonder?

All it takes is a little reflection, really, to know how routine a five-weekend month is. It can only happen in a month with 31 days (less than that, and you won't have three days all occurring five times in the month). There are seven such months in a year. For such a month to have five weekends, it must begin on a Friday (in which case the five weekends are 1st-2nd-3rd, 8th-9th-10th, 15th-16th-17th, 22nd-23rd-24th, 29th-30th-31st). There are seven days in a week. So it's a good bet that one of those seven 31-day months in the year will start on a Friday and will thus have five weekends.

In other words, it's a good bet that one month every year will have five weekends.

(Given the way the calendar is structured, the probabilities are not quite so straightforward, but the analysis is close enough).

And this is borne out, if you look at your calendar. In 2011, July has five weekends. In 2012, no month does. 2013: March. 2014: August. 2015: May. 2016: January AND July. 2017: December.

What was that about 823 years?

What really should happen only once every 823 years is any attention paid to astrologers and numerologists. Preferably, make that 8230 years.

Meanwhile, I have this to offer: this year has been 2011 right from the beginning. It will be 2011 even till the end.

June 28, 2011

Doppler (and a Renault Logan)

I've really fallen so behind on the attention this blog needs. The other day I ran across a pledge someone made: one post a day on their blog. Maybe it's something I can start (or re-start) with.

In the meantime, please do take a look at my latest "A Matter of Numbers" column in Mint, which was published last Friday June 24: Of Galaxies' Doppler shift.

Comments welcome.

June 12, 2011

Cicadas: ready for prime time

Last Friday (June 10 2011), Mint carried my next "A Matter of Numbers" essay. It's about cicadas and pleading with editors.

Do take a look: Cicadas: ready for prime time.

Comments welcome!

May 27, 2011

Collective complexity

Been on the road so much here in South Africa that I've not had time to keep my usual trip diary up to date, let alone blog about the experience. Perhaps I'll catch up once I'm back in India next week. That's a threat.

But meantime, my column on mathematical thingamajigs in Mint is on air for this fortnight, and it speaks of cormorants in Cape Town. Take a look: Collective complexity.

Comments, as always, welcome.

May 14, 2011

Room at the Lodge

I have just started a new fortnightly column for Mint, titled "A Matter of Numbers". This is a place where I hope to explore the wonders of mathematics and science. It will be a challenge to write, but a challenge I thoroughly look forward to. It should be a whole lot of fun.

The column will run on alternate Fridays. Given that it has to do with numbers, I'm absolutely delighted that it kicked off yesterday, Friday the 13th.

Take a look: Room at the Lodge.

April 24, 2011

Cannonball tree

Any tree lovers out there? One that I know rather well has sent me this query that I don't know much about. If you have any answers, please let me know.

The cannonball tree is fairly well known in Bombay. It is also known as Nagalingam in Tamil and Maheshwar or Kailaspati in Marathi.

Its botanical name is Couroupita guianensis which indicates its origins in Guiana.

The tree sends out woody tendrils on its main trunk, say about three or four feet above ground and continuing upwards till beore the branches. In our building compound we have some of these trees that were planted roughly around 1969 and they continue to grow and flourish.

In the last couple of years or so I have noticed that the woody tendrils are now apppearing above the branches and along the trunk, and they bear flowers. But there are flowers along the branches too now, and the flowering seems to be climbing upwards. Another nearby cannonball tree also has flowers blooming way up!

Is there a reason for this? Are there knowledgeable tree lovers who could explain this phenomenon?

April 20, 2011

Num8er My5teries

Really, that's the name of the book: Num8er My5teries. I'm still looking for creative ways to pronounce it. The Sunday Guardian asked me to review it, and they published what I came up with ten days ago, here.

Comments welcome.

February 25, 2011

Mouse embryo, bandaid, etc

Take six minutes to watch the images here. They are stunning and awe-inspiring. I particularly like the mouse embryo (about 4:45), but there isn't a false note here. Not even the used bandaid, which is like an Eliot Porter photograph.

Science. Always a marvel.

January 14, 2011

The sun turns

December 22, or the winter solstice, is the shortest day of the year. After that, the days get longer. So without thinking about it much, I grew up imagining two things: one, that in the days before December 22, the sun rises slightly later and sets slightly earlier every day, thus each day turns out to be shorter than the previous. And two, that after December 22, the sun rises slightly earlier and sets slightly later every day, thus each day turns out to be longer than the previous.

Well, things don't quite match that neat picture.

In the days before December 22, the sun actually does rise slightly later every day. But it also sets slightly later every day, though the daily increments are smaller than with the sunrise. The result: the days get progressively shorter.

In the days after December 22, the sun continues to rise slightly later every day. It also sets later every day, though now the daily increments are larger than with the sunrise. The result: the days start to lengthen, just as expected.

And this trend continues till … today, January 14. It is only after today that the sun starts rising slightly earlier every day.

Questions: Is this why January 14 is a marked day on Indian calendars (Pongal, or Sankranth)? And is this date a function of the earth's latitude? Or of its tilt on its axis? Or something else? In other words, can you explain this phenomenon to me in terms I can understand?

***

PostscriptThere should be a similar, but mirror-imaged, phenomenon around the summer solstice, June 22. Is July 14/15 a similarly marked date anywhere?

October 27, 2010

Evolutionary trail

When my brother, a doctor, worked in rural Orissa several years ago, he had an attack of malaria. While it lasted, it was a frightening episode. He had very high fever and a bout of convulsions. Just as frightening was that the malaria did not respond to treatment with the drug chloroquine -- a standard prescription for malaria. When he realized this, he switched to two other drugs -- sulfadoxine and pyrimethamine -- and recovered.

But for me, his experience was a revealing glimpse into the constant battle modern medicine must fight to control disease. Why was his malaria resistant to chloroquine?

To answer that, we have to go all the way back to Charles Darwin and his
theory of evolution, or natural selection. In essence, the theory says that as species evolve over time, they retain and develop those characteristics which promote their survival and reproduction. This means that evolution also suppresses the characteristics that retard survival and reproduction. Only the individuals who survive can reproduce. Their descendants tend to retain their capacity to survive, and pass them on in their turn. At the same time and in the same way, whatever characteristics acted against survival tend to vanish.

So what happened with malaria and chloroquine? In India, malaria comes in two main strains, caused by two different microscopic parasites carried by mosquitos: vivax and falciparum. The falciparum strain of malaria can affect the brain: when that happens it is called cerebral malaria. This is what my brother suffered in Orissa.

Chloroquine was an effective treatment, used heavily and widely, against falciparum. But today, in certain parts of the country, and precisely because chloroquine was used heavily in those parts, falciparum has become resistant to chloroquine.

When it was first used, chloroquine killed falciparum parasites -- it prevented their survival in our bodies. True to Darwin's theory, falciparum, in an evolutionary sense, recognized the threat chloroquine posed to its survival. In each succeeding generation, only those falciparum individuals that were somehow able to survive the chloroquine onslaught managed to reproduce. Doing so, they passed on to their descendants the characteristics that helped them to survive. Over several generations, these characteristics got strengthened -- selected for, in other words -- and a greater and greater proportion of the falciparum population had them. Eventually, a strain of falciparum appeared that was totally resistant to chloroquine.

There's evolution for you.

What happened to falciparum is a perfectly natural process, simple and with an inexorable logic. It happens to every species on the planet. Humans included. For example, archaeological evidence shows that we are today a taller, stronger race than we were at the dawn of our history. Why has this happened?

You might look at it this way: In each generation, across the whole human population, it was generally the taller and stronger people who had the best chance to reproduce. Thus these were favoured characteristics that were passed on and strengthened; they were selected for. Each generation was just that much sturdier than its predecessor. So today, many generations later, we would seem like giants to our ancestors. "Goliaths!" they might call us in derision. (Of course, we could always shoot back: "Lilliputs!")

But we were discussing falciparum, remember? Natural selection applies in exactly the same way to humans and to falciparum parasites. There is one crucial difference, however, and that takes us to the heart of the tussle between disease and medicine.

In humans, evolution is a slow, measured process. Over a few thousand years, we are only a few inches taller, on average, than our ancestors were. It takes several generations for evolutionary changes to be noticed, and among us, that means hundreds of years. We procreate some twenty or thirty years after we are born. That is how long it takes for a desirable characteristic -- height, for example -- to be passed on.

In contrast, falciparum lives and breeds at a rate measurable in hours and minutes. All micro-organisms do. Those that cause the plague, for example, live for just half an hour. Generation follows generation at breakneck speed. Naturally, evolution also proceeds at breakneck speed, not at the stately human pace. Traits that contribute to survival -- here, the resistance to chloroquine -- are passed on and reinforced swiftly. In some cases, it is just a few weeks before resistance begins to appear.

Evolution, you see, has turned around to bite us -- and in the case of malaria and mosquitos, quite literally so. Whenever a new drug to treat a disease is discovered, it is only a matter of time before the disease, inevitably, stops responding to it. Natural selection ensures that, just as it ensures that our descendants will be generally taller than we are.

Medicine, therefore, is on a perennial treadmill. To date, it has managed to stay one step ahead of disease by the constant discovery of new drugs. But it is a precarious tightrope we walk. Who knows when we will lose the advantage of being that small step ahead?

Which is why, in the long run, prevention and precaution are better bets than cures and treatments. That means good health, exercise, regular
habits, cleanliness in our homes and outside: simple, basic ideas that hold the key to our survival.

Now, if only they get passed on to our descendants as well.

August 30, 2010

My kingdom for that key, reprise

Given that tomorrow is a Blackberry deadline here in India, I thought I'd re-post this essay I did a few years ago in this space. Perhaps it might help explain Blackberry's dilemma for those who don't understand why it's a dilemma.

***

Just for fun, the wife once sent me an email message in code. I was intrigued. How had she done it? Meaning, how was I supposed to decipher and read it? I didn't want to wait to ask her, that would be too easy. Could I figure the code out for myself?

I managed it in the end, experimenting with the few clues the coded message offered. Swelling with code-breaking pride, I promptly made up what I thought was a more difficult code and dashed off a reply. The lady cracked it far faster than I had hers. So much for pride.

Of course, codes have long been used for more serious purposes than idle husbands trying unsuccessfully to outwit alert wives. Cryptography, the science of encoding and decoding messages, is a rigorous scientific pursuit by itself. In wartime, much energy goes into two efforts: making sure your communication is secure and trying to decode the enemy's. This is so crucial that the side that does a better job will usually win the war.

Till 1976, coding relied on secret keys. You use such a key to convert the message, usually called "plaintext" by cryptographers, into the "ciphertext" that is transmitted. At the other end, the same key is used to decode the ciphertext back into plaintext. The key can be a mere transposition of letters ("b" for "a", "c" for "b" and so on), variations of which are what my wife and I used; or a mechanism using pages in some agreed book; or any number of other possibilities.

But here's the crux of such a method: for communication to work, both parties have to agree on a key.

This turns out to be the flaw in the whole system. To thwart people intent on breaking the code (cryptographers are known to call them "attackers"), keys must be relatively complex, and must themselves be communicated between sender and receiver. That means they can get stolen or lost, or counterfeited by the enemy to confuse, or they may even arrive after the ciphertext itself. Sender and receiver have to find a communication channel they can trust -- a secure phone line, a reliable courier -- merely to get the key transmitted. How do you get around these problems?

In 1976, Whitfield Diffie and Martin Hellmann of Stanford University answered that question by attacking its root: by doing away with the idea of secrecy itself. They proposed a public key coding system, in which the sender and receiver never have to agree on a secret key. Two years later, three researchers at MIT, Ronald Rivest, Adi Shamir and Leonard Adleman, demonstrated such a public key system; it has become known as the RSA (Rivest-Shamir-Adelman) system.

Without a doubt, the public key system is the most significant and influential advance in modern cryptography. In 2002, Rivest, Shamir and Adleman were awarded the Turing Award -- computer science's greatest prize -- for the RSA system.

Public key systems rely on a simple mathematical idea: some functions are much easier performed in one direction than the other. For example, it's not too difficult to figure out that when you multiply 7, 11 and 13, the answer is 1001. But what if I asked you: "Which three distinct numbers produce 1001 when multiplied?" That harder problem will take you, or even a computer, much longer to solve.

With numbers much larger than 1001, this time difference becomes significant. Eventually, the slower direction of these "one-way functions" takes so long that it is effectively impossible to solve. If you took two prime numbers that are each 100 digits long, a computer could multiply them quite easily to produce another number about 200 digits long. But if you gave it that 200-digit number and ask it to find the two 100-digit factors, how long would it take? Not seconds or minutes, but perhaps years. Centuries. In effect, this is impossible.

So RSA works something like this. Let's say Shabnam wants to receive coded messages. She picks two secret prime numbers, preferably big ones, and multiplies them. She does some further manipulation to come up with two more numbers. She announces that her personal public key is the product of the primes and one of these two additional numbers. The third number remains her private key.

Monideepa, who wants to send Shabnam a coded message, uses Shabnam's public key in a formula to encrypt her plaintext. When Shabnam receives Monideepa's ciphertext, she uses her private key in another formula that restores the plaintext. Of course, Shabnam never reveals the two secret primes to anyone.

In theory, this is not a secure system: given an indefinite amount of time, attacker Pappu could take Shabnam's public key and calculate the two numbers that produced it. But of course, Pappu doesn't have indefinite time. Long before he found Shabnam's primes, he would be dead. So Shabnam's key is safe, Monideepa's message cannot be read; the RSA system is secure.

This was a giant leap: RSA opened up the possibility of cheap, yet completely secure communication available to all.

Which, of course, was a red flag to governments around the globe, many of whom want to listen in on what their citizens, or other governments, say to each other. In the USA, this governmental unease over public key cryptography led to an effort to produce a government-approved coding system, based on a secret encryption algorithm called Skipjack. The US government proposed that Skipjack would be built into communication devices that needed to be secure.

Naturally this met with much outrage and eventually the US government declassified Skipjack.

And I've always thought it a delicious aside to the whole RSA story that within a day -- yes, a day -- two researchers had substantially decoded Skipjack itself, and one of those two researchers was Adi Shamir.

Meanwhile, I have here two 100-digit primes. One of them is 4557898123798712347234898920109927481232347798726198764691200283623897221029374283764823764138973668. ... Hmm, what'd I do with the other one?

August 12, 2010

Ts and Hs

Imagine I'm a professor teaching the basics of probability. One day, I give the class this assignment: sit down at home, toss a coin a hundred times and write down each result, Heads or Tails. Bring me that sequence of Hs and Ts tomorrow.

Now I suspect most of the class is too lazy to toss a coin a hundred times. It's likely a lot of them will simply write out what looks like a random sequence of Hs and Ts and turn that in.

But I am almost sure that, with a quick look at each submitted sequence, I will be able to tell which ones were produced in this fake way, and which ones are actually a faithful record of a hundred coin tosses.

How do I tell the fake sequences from the genuine ones?

(Thanks to my charming cousin for reminding me of this last month.)

***

Kovendhan has a comment with the right answer: "In order to appear genuine, students will avoid long sequences (6 or more) of consecutive heads or tails. In reality, such long sequences almost always occur in long trials."

Which of course begs the bonus question: in a sequence of 100 coin tosses, what's the probability that there will be at least one sequence of 6 heads or tails?

All right, bonus question #2: what if I changed the "6" immediately above to "6 or more"?

August 11, 2010

P and NP

I really hope Vinay Deolalikar takes away the $1M Clay prize. That's the heart speaking. I really doubt he will. That's the head speaking.

Perhaps you know that Deolalikar, a researcher at HP Labs (one of the most-respected research places in the world) has just claimed to have answered one of the knottiest open questions in computer science and mathematics, the P=NP problem. He claims P is not equal to NP. (This is not the place to attempt an explanation of what that means, but some of the links below attempt that, and if you leave a comment with your email I can give it a shot too).

He has made his proof available online (PDF, 650K). I am in no way competent to understand, far less judge, his paper, though plenty of mathematicians are at work examining it (Richard Lipton, for one.) But I will admit that I am, right off the bat, sceptical.

Why?

For one thing, Deolalikar says he worked alone, "without the knowledge of others". Mathematics, and indeed much of science, simply does not work that way any more. It nearly never happens that a scientist plugs away for years on his own and then produces a stunning new result. Science depends on collaboration and criticism and bouncing your ideas off your colleagues.

For another, the sciences are littered with the corpses of proofs offered for various hard problems. Fermat's Last Theorem, which Andrew Wiles famously solved in 1993, was one such. I began a post about Fermat with these lines: "For many years, Edmund Landau, a German mathematician, had a form letter that looked like this: "Dear Sir/Madam: Your proof of Fermat's Last Theorem has been received. The first mistake is on page _____, line _____." Landau would assign the job of filling in those blanks to one of his students. They must have been busy, because crank "proofs" of Fermat were something of a cottage industry; if I recall right, Orissa was a minor breeding ground for them."

There's more, and much of it's explained far better than I can by Scott Aaronson here (not about Deolalikar specifically). Aaronson, incidentally, has offered $200K of his own money on top of the Clay prize to Deolalikar if the proof stands.

Like I said, I hope to hell it does stand. If it does, it's a truly fabulous result. All of us who've studied some mathematics and computer science know something about P vs NP, about how complex an issue it is and yet how surprisingly beautiful, almost magnificently challenging it also is.

I'm trying to draw analogies here: If Deolalikar has solved it, it would be as if he came home from the 2012 Olympics with 50 individual gold medals; or as if he had found an easy way to beat gravity; or as if he had found a peaceful, lasting solution to the Kashmir issue. A proof of P vs NP would be exactly as earth-shaking as those.

And that's also why I am sceptical. Though I dearly wish I wasn't.

August 09, 2010

Alone, or maybe not

Mention extra-terrestrial intelligence and most people will perk up and say "E.T.!", or maybe more likely in Bollywood-obsessed India, "Krrish!" (Forgive me, but what a painful movie). How firmly that ugly-but-cute puppet, or a perfectly muscled Hrithik Roshan, has been etched into our brains. So when we hear that there are people actually looking for signs from outer space of an intelligence other than ours -- assuming, for the time being, that we are intelligent -- it's almost amusing. What are they looking for, little green men? The Man in the Moon? Hrithik leaping from planet to planet?

Ha ha, but actually, none of those. The search for extra-terrestrial intelligence (SETI) is a serious scientific endeavour that many dedicated researchers have pursued diligently for years. It's a pity to think of it in terms of images from films.

But when you do give SETI some serious thought, a fundamental question comes up right away: How do you go about doing it? Answering it turns out to be extraordinarily difficult.

A major problem is the unimaginably vast distances in space. Our known means of travel are far too slow for humans to bridge them. Even our speediest spacecrafts would take 40,000 years to reach Alpha Centauri, the nearest star to us on Earth. And we don't even know if there is any life, let alone intelligent life, in the vicinity of Alpha Centauri.

Some scientists have suggested that we find other means to power such a spacecraft than chemical fuels. They imagine one that will slowly accelerate to close to the speed of light. At that speed, it would reach Alpha Centauri in a little over 4 years -- which is how long it takes light to reach us from there. But the energy required for such a trip would be enough to supply India's electricity needs for at least 100,000 years. Who has that kind of money to spend on a spaceship?

Clearly, manned travel is a thoroughly impractical way to carry out SETI. What about sending out unmanned probes? A good idea, you might think, but where would we send them? In just our own corner of our own medium-sized galaxy, we have thousands of stars, and we have no idea which of them, if any, might harbour an ETI. So sending probes to each of those stars would be an enormously expensive project. Yes, who has that kind of money?

What about transmitting radio signals on our own? Clearly a better option than travel, there are people who have tried this. But it will be a long time before we get any kind of reply -- again, from Alpha Centauri alone we'd have to wait over 8 years for one, if it comes at all. Also, we have to listen constantly for that reply, hoping that when it comes, we will be able to filter it out of the random radio noise that fills space anyway.

For all these reasons, scientists have decided that listening for evidence of an ETI is a better strategy than sending out either spacecraft or signals.

But even just listening presents hard, fundamental problems to address. For one, where do we turn our ears?

We can start by aiming radio telescopes at nearby sun-like stars. There are about 1000 of these within 100 light years from us. We can search them carefully for even weak signals, then work outwards to stars that are more distant. Another possibility is to scan the entire sky slowly, looking only for strong signals. The proper SETI strategy is likely a mix of these two methods.

Still, these are just the mechanics of carrying out SETI. Once we start listening systematically, we're up against even more fascinating challenges: What exactly are we listening for? What kind of signal would we recognize as the transmission of intelligent beings? If we get one, how do we interpret it? Once we do, should we respond? How?

A candidate ETI signal would be obviously artificial, to distinguish it from radio noise. Perhaps it would be a pattern of pulses and spaces broadcast over a period long enough to leave us in no doubt that it was produced by intelligent beings.

What would it mean, though?

Speculation is easy, sure. But there are some things we might be able to deduce from such a signal. A good first guess would be to treat each pulse as a one and each space as a zero (or vice versa). That would give us a message coded in binary, the simplest number system we know. But what do we do with this stream of ones and zeros? All kinds of things, really. We might look for patterns in the stream, then see if we can hit upon a code that explains them. Or we might arrange the digits in a rectangle instead of a line. If this is what the ETI had intended for us to do, and if we can hit upon the right dimensions for the rectangle, the numbers might form a picture, or some other information, that tells us more about these beings and where they live.

This is a plausible enough way to proceed that we ourselves have sent out just such pictures. One went out from the Arecibo radio telescope in Puerto Rico (an awe-inspiring machine by itself, filling an entire valley) when it was inaugurated in 1974. We aimed that transmission at a cluster of stars in Hercules, where it will arrive in about 27,000 years. That is, let's not worry too much about getting a reply.

Several SETI efforts have used these ideas for years now, but they have found no candidate signals yet. Is that discouraging? Well, they have only searched a little over 0.01% of the sky. There's plenty of reason to keep hoping.

But assuming we receive an ETI message one day, what should we do then? To me, it seems entirely possible that political, religious or economic compulsions will keep us silent. We might even be scared of replying. But if we do find the imagination to reply, we will probably send back a similarly coded message on the same radio band, and then wait for another message from the ETI. With the exchange of a few such messages, we will work out a logical way to send information back and forth.

Of course, given the distances involved, this "conversation" will be extremely slow. Again, with an ETI near Alpha Centauri it would be eight years before we got a reply to our message. With further stars, those who hear the first ETI signal on Earth might be dead by the time the next one arrives.

The constraints of space and time are a serious barrier to direct contact with any intelligent galactic neighbours we might have. Talking to them will be a slow, tedious affair; meeting them will remain a dream.

So you might wonder: why do SETI at all? Ah, but that has to do with our perpetual wonder about the unknown. All through history we have set off to explore dark corners of the world. Today, when there are pretty much no dark corners left on this planet, we turn to space. How can we not stop to wonder: is there anybody out there? Are we unique? Are we alone?

Answering those questions poses totally new challenges that need totally new thinking. How can we travel faster than our painfully slow spacecrafts now manage? Can we find a better medium than radio waves to carry our messages? How do we send out a signal that will not seem threatening to an ETI?

What's fascinating about all this is that it makes us consider ourselves more closely. Do we have the patience, the vision, the courage, to sustain a long and frustrating SETI? If we can't resolve our own petty quarrels, how will we seem intelligent and friendly to an ETI? If we ignore lessons our own history teaches us, what will we learn from an ETI?

For me, this is the most compelling thing about SETI: that a search for something entirely outside our home planet, even our imaginations, eventually makes us look at ourselves anew. In the end, there's the greatest reason to do it at all.

April 20, 2010

Poor, with beauty

Fabulous photos of something fierce and fantastic here (best seen by clicking where it says "FULL SCREEN").

But I also like the last four words: "We’re poor, with beauty."