A Niente

I was seriously tormented by the thought of the exhaustibility of musical combinations. The octave consists only of five tones and two semitones, which can be put together in only a limited number of ways, of which but a small proportion are beautiful: most of these, it seemed to me, must have been already discovered, and there could not be room for a long succession of Mozarts and Webers, to strike out, as these had done, entirely new and surpassingly rich veins of musical beauty. This source of anxiety may, perhaps, be thought to resemble that of the philosophers of Laputa, who feared lest the sun should be burnt out.

— John Stuart Mill, Autobiography, 1873

“Scooping the Loop Snooper”

Given a particular input, will a computer program eventually finish running, or will it continue forever?

That sounds straightforward, but in 1936 Alan Turing showed that it’s undecidable: It’s impossible to devise a general algorithm that can answer this question for every possible program and input.

The most charming proof of this was published in 2000 by University of Edinburgh linguist Geoffrey Pullum — he did it in the style of Dr. Seuss:

No program can say what another will do.
Now, I won’t just assert that, I’ll prove it to you:
I will prove that although you might work til you drop,
You can’t predict whether a program will stop.

Imagine we have a procedure called P
That will snoop in the source code of programs to see
There aren’t infinite loops that go round and around;
And P prints the word “Fine!” if no looping is found.

You feed in your code, and the input it needs,
And then P takes them both and it studies and reads
And computes whether things will all end as they should
(As opposed to going loopy the way that they could).

Well, the truth is that P cannot possibly be,
Because if you wrote it and gave it to me,
I could use it to set up a logical bind
That would shatter your reason and scramble your mind.

Here’s the trick I would use — and it’s simple to do.
I’d define a procedure — we’ll name the thing Q —
That would take any program and call P (of course!)
To tell if it looped, by reading the source;

And if so, Q would simply print “Loop!” and then stop;
But if no, Q would go right back to the top,
And start off again, looping endlessly back,
Til the universe dies and is frozen and black.

And this program called Q wouldn’t stay on the shelf;
I would run it, and (fiendishly) feed it itself.
What behaviour results when I do this with Q?
When it reads its own source, just what will it do?

If P warns of loops, Q will print “Loop!” and quit;
Yet P is supposed to speak truly of it.
So if Q’s going to quit, then P should say, “Fine!” —
Which will make Q go back to its very first line!

No matter what P would have done, Q will scoop it:
Q uses P’s output to make P look stupid.
If P gets things right then it lies in its tooth;
And if it speaks falsely, it’s telling the truth!

I’ve created a paradox, neat as can be —
And simply by using your putative P.
When you assumed P you stepped into a snare;
Your assumptions have led you right into my lair.

So, how to escape from this logical mess?
I don’t have to tell you; I’m sure you can guess.
By reductio, there cannot possibly be
A procedure that acts like the mythical P.

You can never discover mechanical means
For predicting the acts of computing machines.
It’s something that cannot be done. So we users
Must find our own bugs; our computers are losers!

Pullum, Geoffrey K. (2000) “Scooping the loop snooper: An elementary proof of the undecidability of the halting problem.” Mathematics Magazine 73.4 (October 2000), 319-320.

(Thanks, Pål.)

Misc

  • There’s no “u” in solipsism.
  • Wagner said the saxophone “sounds like the word Reckankreuzungsklankewerkzeuge.”
  • FDR was related by blood or marriage to 11 other presidents.
  • 3909511 = 53 + 59 + 50 + 59 + 55 + 51 + 51
  • “If you can’t stand the heat, stay out of the chicken.” — Ted Giannoulas, San Diego Chicken

(Thanks, Eric.)

Fashion Victim

http://commons.wikimedia.org/wiki/File:1835-Wiener-Zeitschrift-fashion-plate.png

Effects of lightning on Mrs. T.T. Boddington, struck as her post-chariot departed Tenbury on April 13, 1832, as reported in the Lancet:

The … electric fluid … struck the umbrella she had in her hand; it was an old one made of cotton, and had lost the ferule that is usually placed at the end of the stick, so that there was no point to attract the spark. It was literally shivered to pieces, both the springs in the handle forced out, the wires that extended the whalebones broken, and the cotton covering rent into a thousand shreds. From the wires of the umbrella the fluid passed to the wire that was attached to the edge of her bonnet, the cotton thread that was twisted round that wire marking the place of entrance, over the left eye, by its being burnt off from that spot all round the right side, crossing the back of the head and down into the neck above the left shoulder. The hair that came in contact with it was also singed; it here made a hole through the handkerchief that was round the throat, and zigzagged along the skin of the neck to the steel busk of her stays, leaving a painful but not deep wound, and also affecting the hearing of the left ear. … There were marks of burning on the gown and petticoat above the steel; and the inside of the stays, and all the garments under the stays, were pierced by the passage of the fluid to her thighs, where it made wounds on both; but that on the left so deep, and so near the femoral artery, that the astonishment is, that she escaped with life;–even as it was, the hemorrhage was very great.

It also magnetized her corset:

http://books.google.com/books?id=fao-AAAAYAAJ&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false

“Both ends attract strongly the south pole of the needle, the upper part for some considerable way down; it then begins to lose power over the south pole, and the point of northern attraction is at about one third of the length of the busk from the bottom; so that by far the greatest portion of the whole has acquired southern attraction.”

Ranks and Files

From Ross Honsberger via Martin Gardner: Deal cards into any rectangular array:

2012-01-26-ranks-and-files-1

Put each row into numerical order:

ranks and files 2

Now put each column into numerical order:

ranks and files 3

Surprisingly, that last step hasn’t disturbed the preceding one — the rows are still in order. Why?

Future Perfect

http://commons.wikimedia.org/wiki/File:Friedrich_Adolf_Hornemann_Lesender_M%C3%B6nch.jpg

While browsing around the library one day, I notice an old dusty tome, quite large, entitled ‘Alvin I. Goldman.’ I take it from the shelf and start reading. In great detail, it describes my life as a little boy. It always gibes with my memory and sometimes even revives my memory of forgotten events. I realize that this purports to be a book of my life and I resolve to test it. Turning to the section with today’s date on it, I find the following entry for 2:36 p.m. ‘He discovers me on the shelf. He takes me down and starts reading me …’ I look at the clock and see that it is 3:03. It is quite plausible, I say to myself, that I found the book half an hour ago. I turn now to the entry for 3:03. It reads: ‘He is reading me. He is reading me. He is reading me.’ I continue looking at the book in this place, meanwhile thinking how remarkable the book is. The entry reads: ‘He continues to look at me, meanwhile thinking how remarkable I am.’

I decide to defeat the book by looking at a future entry. I turn to an entry 18 minutes hence. It says: ‘He is reading this sentence.’ Aha, I say to myself, all I need do is refrain from reading that sentence 18 minutes from now. I check the clock. To ensure that I won’t read that sentence, I close the book. My mind wanders; the book has revived a buried memory and I reminisce about it. I decide to reread the book and relive the experience. That’s safe, I tell myself, because it is an earlier part of the book. I read that passage and become lost in reverie and rekindled emotion. Time passes. Suddenly I start. Oh yes, I intended to refute the book. But what was the time of the listed action?, I ask myself. It was 3:19, wasn’t it? But it’s 3:21 now, which means I have already refuted the book. Let me check and make sure. I inspect the book at the entry for 3:17. Hmm, that seems to be the wrong place, for there it says I’m in a reverie. I skip a couple pages and suddenly my eyes alight on the sentence: ‘He is reading this sentence.’ But it’s an entry for 3:21, I notice! So I made a mistake. The action I had intended to refute was to occur at 3:21, not 3:19. I look at the clock, and it is still 3:21. I have not refuted the book after all.

— Alvin I. Goldman, “Actions, Predictions, and Books of Life,” American Philosophical Quarterly, 1968

Goldman’s point is not that determism is true, but that it could be. It’s possible to imagine a determined universe, even one in which your own actions are accurately predicted, that unfolds in a way that makes it appear quite similar to our own. “The fact that this imagined world is determined and contains predictions of acts, and yet resembles the real world very closely, suggests to me that the real world may also be determined,” Goldman writes. Might it?

Even Odds

A bag contains 16 billiard balls, some white and some black. You draw two balls at the same time. It is equally likely that the two will be the same color as different colors. What is the proportion of colors within the bag?

Click for Answer

Tempest-Tost

http://books.google.com/books?id=FWdNAAAAYAAJ&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false

As the hurricane of August 1915 approached Galveston, Texas, it encountered a buoy in the Gulf of Mexico.

Investigators later found the buoy nearly 10 miles west of its original location.

It weighed 21,000 pounds and had been anchored with a 6,500-pound sinker and 252 feet of chain weighing 3,250 pounds.