Friday, January 30, 2015

Bad Johnny, Cont'd

When last we saw Bad Johnny, he had written out all of the number words from ONE to ONE MILLION. Reader jeff correctly analyzed the situation in his comment. In Johnny's work there were 999,000 instances of the letter A. Moreover, the G's, X's, and W's were equinumerous, in view of the fact that EIGHT/EIGHTEEN/EIGHTY, SIX/SIXTEEN/SIXTY, and TWO/TWELVE/TWENTY are the only number-naming words that use these respective letters (one occurrence of the given letter in each case), and since the rules for assembling number names treat all three cases symmetrically.

That's a hand-waving argument, of course. A proof might go something like this:
  1. Start by showing that for a number N with number word [N], the number of w's in [N] equals the number of 2's in N.
  2. Hence, the total number of w's in the sequence ONE to ONE MILLION equals the total number of 2's in the sequence 1 to 1,000,000.
In like fashion,
  1. Show that for a number N with number word [N], the number of x's in [N] equals the number of 6's in N.
  2. Hence, the total number of x's in the sequence ONE to ONE MILLION equals the total number of 6's in the sequence 1 to 1,000,000.
  1. Show that the total number of 2's in the sequence 1 to 1,000,000 equals the total number of 6's in the sequence from 1 to 1,000,000.
  2. Hence, the number of w's in the sequence ONE to ONE MILLION equals the number of x's in the sequence ONE to ONE MILLION.
Some notes:

Step 1 can be approached in cases. First show that the proposition holds for the numbers 0–9. Proceed next to consider numbers 10–19. Next, 20–29. Next, 30–99. Then (using the foregoing results) 100–999. From that point, the extension to higher numbers is fairly easy, since the numbering system for long numbers proceeds by (1) naming the three-digit chunks as if they were amounts of hundreds, and (2) replacing commas with "period words" (..., BILLION, MILLION, THOUSAND—none of which will affect the w count).

(The only wrinkle here arises when the last three digits of the number are all 0. In a case like this, we don't say "ONE MILLION ZERO," for example. But since the absence or presence of ZERO doesn't affect the number of w's, this feature of the naming system doesn't affect the conclusion.)

Step 5 can be proved in lots of ways. For example, picture an old-fashioned car odometer that starts at 000000, goes all the way up to 999999, and then rolls over to 000000. All in all, the leftmost wheel turns once, the next wheel turns ten times, and so on down to the rightmost wheel, which turns a hundred thousand times. The point is, each wheel turns an integral number of times. On any one of these turns, on any one of these wheels, 2 faces outward once and 6 faces outward once; hence, 2 and 6 face outward the same number of times altogether.

Saturday, January 24, 2015

Bad Johnny

As punishment for misbehaving, Johnny's teacher made him write out the number words from ONE to ONE MILLION. When Johnny was finished, the teacher asked him how many times he had written the letter A. "That one's easy," Johnny said. "A more interesting question is why I wrote the same number of Gs as Xs."

"Smarty pants," said the teacher. "You forgot to mention W."

Monday, January 19, 2015

How to Use "Utilize" (And How Not to Utilize It)

Just avoid the word utilize, advises David Foster Wallace in the first entry of his "Twenty-Four Word Notes":
Utilize     A noxious puff-word. Since it does nothing that good old use doesn't do, its extra letters and syllables don't make a writer seem smarter; rather, using utilize makes you seem either like a pompous twit or like someone so insecure that she'll use pointlessly big words in an attempt to look sophisticated. ... What's worth remembering about puff-words is [that] "formal writing" does not mean gratuitously fancy writing; it means clean, clear, maximally considerate writing.
Here is Grammar Girl saying much the same thing.

Now here's a rare exception—a case where utilize does precisely the work the writer wants it to do:
...recently a small boy, washed overboard in the Atlantic, was rescured hours later clinging to a large sea turtle which was swimming on the surface at a stately, level pace. Presumably this act of keeping him afloat was not an act of mercy on the turtle's part (though some turtles do know about "drowning"—they drown ducks, catching them from below by the feet and pulling them underwater). The turtle probably just felt comfortable in company with the boy, animal-to-animal, felt a sort of rudimentary comradeship, so that it made no objection to being utilized as a life-ring.
This is from "The War in the Woods," by Ted Hoagland, written in 1971. Hoagland is a craftsman who chooses every word carefully. Utilize, here, conveys something beyond mere use: a sense of transforming the default role of a thing; of making useful a thing that did not necessarily exist to be used so.

My primary dictionary, The American Heritage Fourth Edition, provides this usage note:
... It is true that many occurrences of utilize could be replaced by use with no loss to anything but pretentiousness, for example, in sentences such as They utilized questionable methods in their analysis or We hope that many commuters will continue to utilize mass transit after the bridge has reopened. But utilize can mean "to find a profitable or practical use for." Thus the sentence The teachers were unable to use the new computers might mean only that the teachers were unable to operate the computers, whereas The teachers were unable to utilize the new computers suggests that the teachers could not find ways to employ the computers in instruction.
David Foster Wallace was actually a member of the usage panel for this dictionary, although it would seem this usage note was not written by him. Wallace's advice strikes me as best. To avoid tripping silent cringe-alarms all around you, make utilize rare in your lexicon. Habitually use use, reserving utilize for the rare case where it is precisely the right word.

Thursday, January 15, 2015

Hangman Challenge - Answer Revealed

I've enjoyed playing Hangman with all of the readers who took me up on the challenge. Without further ado, the winners of the 2014/2015 Hangman Challenge are...

My two daughters, ages 5 and 7! Playing as a team, they guessed the mystery word, WILL, with only 7 misses. Reader Cristian won in the grownups category with 9 misses.


How did I choose the word WILL in the first place? What sorts of words are difficult to guess quickly in Hangman?

One principle to consider is that a guesser will often make rapid progress once the first letter has been identified. One way to delay that event is to use a four-letter word. Short words offer few targets for the guesser to hit by chance.

For longer words, repeated letters can be valuable because they keep the number of distinct targets small. However, this is a high risk / high return strategy, and a poorly chosen repeated letter reveals far too much (as in C?CC??, for example).

In general, uncommon letters are hard on the guesser. However, an opponent who knows what you're up to could guess uncommon letters with somewhat higher frequency than their dictionary frequency. (Many of the readers who responded to the Hangman Challenge seemed to be playing along these lines—choosing Y as their first vowel, for example, which they probably don't do when playing Hangman against their niece or nephew.)

Common letters should appear in positions where they reveal little. For example, S at the end of a word gives the guesser less information than in other positions, because S occurs at the end of so many words. (The guesser does learn that the resulting (n−1)-letter word has no S.)

Another strategy is to come up with a word that has the property that even after all of the common letters have been guessed, and there's just one letter left to go, there are still enough possibilities to make life difficult for the guesser. For example, ?ARE could be any of 12 different possibilities (BARE, CARE, DARE, FARE, GARE, HARE, MARE, PARE, RARE, TARE, WARE, or YARE).

I used some of these principles to come up with my Hangman challenge word. A computer program that I wrote to play Hangman racked up 17 misses along the way to guessing WILL. That score was also about average for the adults who played the game. (Not sure what algorithm my kids were running....)

For a slightly longer word, one might use something like WILLET. This word uses relatively uncommon letters, although the letters aren't so uncommon as to be exotic (meaning that they aren't too tempting for an iconoclastic guesser, and they aren't too informative once they appear). The one common vowel, E, is in a pretty uninformative place. There's a double letter, too.

Presumably it pays to use a word outside your opponent's vocabulary. For this reason one might prefer WILLET to WILLED, although it might be a close call because of the letter frequencies (T more common than D). For what it's worth, my computer program solves WILLET one step faster than it solves WILLED; then again, its vocabulary is much better than any single person's.

Of course, if you apply all of these strategies as ruthlessly as possible, then people might not want to play with you!


Surprisingly, a quick online search turned up no definitive articles about the game theory of Hangman. All I found was some blog posts and forum discussions, the most interesting of which were these two:

"A Better Strategy for Hangman" at

"25 Best Hangman Words" at

Thanks again to all who played the Hangman Challenge!

P.S. Congrats as well to reader Jeff, who correctly solved the Change for a Dollar puzzle!

Sunday, January 4, 2015

Book Review: The Siege, by Arturo Pérez-Reverte

The Siege, by Arturo Pérez-Reverte

English translation by Frank Wynne

Random House, 2013

594 pages

Arturo Pérez-Reverte writes intellectual thrillers. I bought his latest, The Siege, to read during the Christmas holiday. By way of reviewing it, I'll present a series of quotations from the book and let you decide on that basis if this is a book you might like to read. (N.B., a more conventional review is here.) 

Who is staring at the corsair?
Lolita Palma dismisses her maid, who walks off with the packages toward the Calle del Baluarte and stands, staring at the corsair as though it is now his turn to make the decisions.
Here are three opportunities to learn what a mesa camilla is:
page 68: The drawing room is cozy, with shuttered windows that overlook the Alameda, carved wood chairs and sofas upholstered in damask, a mesa camilla—a table with a small brazier underneath—and, set against one wall, a piano no one has played for eleven years.

page 281: The center of the room is taken up by a mesa camilla—a table with a heater underneath—on which stands a brass candlestick....

page 316: "...already people are having to light the little braziers under the tables known as mesas camillas."
How's this for a very long fragment:
Leaning against the wall, his slightly battered summer hat, white straw with a black ribbon, tilted slightly forward; one thumb hooded into the pocket of his waistcoat, his other hand gripping the bronze handle of his cane.
Before this, I don't think I'd ever before seen a two-colon sentence in a professionally edited book:
The bootblack, who shines shoes in the center of the city, is one of his informants: pimps, prostitutes, beggars, drudges, barmen, maids, stevedores, sailors, coachmen and sundry petty criminals: pickpockets, highwaymen, watch thieves, fingersmiths, and cutpurses.
There seem to be some verbs missing:
This is the moment when casual confidences are made, fleeting conversations, meaningful glances; seemingly banal details which, when reconsidered in the calm of his office, with the list of registered foreigners in local inns and boardinghouses, decide his daily routine. Dictate the day's quarry.
How do you confirm that someone is fifteen just by looking at their face?
He hopes that this is how it was, that the girl was unconscious the whole time. Fifteen years old, he confirms, kneeling down and bringing the lantern closer so he can study her face, the glassy half-open eyes gazing into the nothingness of death.
Concerning a woman whose face resembles a colorless liquid and who is also suspicious of chickpeas:
He comes around the counter and Tizón leads him to the back of the shop near the sacks of chickpeas and crates of dried cod. The woman eyes them suspiciously, her face like vinegar, her ears pricked.
In each of these cases, ask yourself whether the writing would be better with or without the text that I have set off with square brackets: 
Lolita cannot forget his firm, tanned hands; his chin, though freshly shaved that morning, already showing signs of dark stubble. His thick hair and long whiskers, bushy but impeccably trimmed. [Masculine.]
Lolita Palma barely recognizes in him the gentle, shy young man who visits her family. The subject confers on him a self-assured dignity, an old-fashioned gravitas. [Authority.]
They stare at each other a moment longer, silent once more. [Studying one another.]
The quiet walks through the countryside, collecting and identifying plants with old Professor Cabrera, [who taught her about botany].
His [filthy] black fingernails poke through his [threadbare] gloves. (As well, the adjective "filthy" appears twice on this page and once on the next.)
When the captain puts his head above the parapet again, he sees several soldiers carrying the screaming artilleryman, the stump of his thigh—[the rest of his leg has been blown away]—gushing blood.
It is a city whose physical form—the streets, the squares and the buildings—Rogelio Tizón can no longer see; he sees only a mysterious terrain, menacing and abstract as a fretwork of whip marks[: that same disturbing tracery he glimpsed on the skin of the murdered girls, and which he recognized—or thought he recognized—in the map Gregorio Fumagal says he burned in the stove of his workshop].
"Yes," Pépé Lobo says, [thinking about Lolita Palma]. "Back to Cádiz."
Not so silent then after all:
there is a silence, broken only by the distant thunder of battle
Not much of a trump card then after all:
His trump card tonight is the professional sangfroid of a man accustomed to danger—something, Lobo knows, that is equally true of his opponent.
Doing everything, it seems, but actually dancing:
Despite the ban on dancing out of doors—a fine of ten pesos for men and five for women, according to the latest municipal edict—people are out of their balconies throwing water and bags of powder on passersby or out in the street in animated groups, playing guitars, bandurrias, trumpets, whistles, and rattles. 
Can you read his face, or can't you?
Insolent little shit—he can read the words in Tizón's tight-lipped expression—I hope I have the opportunity to settle the score with you.

I only hope, thinks Pépé Lobo, that I never have to play cards with these two. It would be impossible to tell their hands by looking at their faces.

A pileup of clichés:
It is as if he is pounding his head against a wall....
The time has come, he thinks coldly, to pay someone a little visit.
He has a strong, aquiline nose, like the beak of some bird of prey....
The strong aquiline nose recalls a bird of prey.... (Both bird-of-prey descriptions refer to the same character.)
...forced to serve as auxiliaries to a Navy which, like the Royal Customs, they would ordinarily avoid like the plague...
Like a thoroughbred racehorse impatiently champing at the bit....
A sentient cape:
...the thick, brown mire through which the skirts of his cape trail carelessly.
There is also some nice language in the book. Here are the passages I noted:
Though it is hot outside, in here it feels cold, as though the hallway leads to a different season of the year. 

A confrontation in a tavern; a character who has been drinking exhibits dangerous calm: Maraña's pulse has not quickened, Pépé Lobo notices; it is as regular as that of a snake sleeping in the sun. He has just taken a deep swig of aguardiente and replaced the empty glass precisely on the ring of moisture he had lifted it from a moment before.

After visiting a wounded man in a military hospital: Mojarra picks up his cloak, his gamebag and his hat, walks past the rows of straw mattresses and leaves the hospital, fleeing the horrors hidden in the folds of the flag.

A character gives money to a beggar, a crippled navy soldier: Then he slips a hand into his pocket and takes out a duro on which the head of old King Carlos looks off somewhere to the right as through all this has nothing to do with him.

They have stopped by the city walls, next to the first trees and the stone benches on the Alameda. From here, the bay seems like a gray, cold, gently rolling extension of the square.

For the most part these men are smugglers and the sort of port rabble who sign a roster or a police confession with a cross.

A character seeking redress in a government office: He remains standing, since no one offers him the chair that languishes in a corner: it has been put there deliberately, to make sure that those who enter do not sit on it.

Every man is a slave to what he says, and master to what he leaves unsaid....

Her words, as melancholy as the violet light fading on the bay, quavered with an age-old tremor from down the centuries; the keening of a woman in an ancient city looking out over the sea wall.
I have to confess that I modified the first quotation. In the original, it reads as follows:
Though it is hot outside, in here it feels cold. As though the hallway leads to a different season of the year.