.

 

Big O

Word Rectangle

Write a program to find the largest possible rectangle of letters such that every row forms a word (reading left to right) and every column forms a word (reading top to bottom). Words should appear in this dictionary: WORD.LST (1.66MB). Heuristic solutions that may not always produce a provably optimal rectangle will be accepted: seek a reasonable tradeoff of efficiency and optimality.

That's a puzzle offered to people who want to work at ITA software, as a test of their nerd-mettle; ITA is a company that has, fame-ishly, used the computer language LISP to plug away at the traveling salesman problem at its most literal, for best I can tell they write software to find the shortest, cheapest, fastest airplane routes.

Not only do I have no desire to work at ITA, but I am in every regard unqualified to do so. There's nothing for me to gain by solving the puzzle. Except. It's like I'm drinking my coffee at breakfast and I want to read the movie reviews in the paper but there's a frog sitting on the Arts section croaking at me instead. I know the frog has something to teach me. What?

I know that you shouldn't just say to the computer, "here's a pile of words in WORDS.LST; go ahead and find me all the ones that line up," because the computer could hurt itself from the strain. Besides, it's a puzzle, not a research project--thus somewhere in there is a crisp little cracker of a solution, fairy functions dancing around the CPU with no global state to weigh them down. And then there are the words "heuristic," "efficiency," and "optimality"--words that mean simple loops won't do (the LISPish bias means the answer is likely small, unexpected, parenthetical). If I was desperate I could make some phone calls to people I know in Organized Math, genuine chipwits. In a half-hour: car pulls up, window rolls down, the puzzle goes into the ground.

But execution doesn't interest me. Admitting that I lack real talent for it, I've turned computer science into a hobby, like weekend landscape watercolorists or dabblers in piano. I mostly like it because I'm cheap. Piano, calligraphy, swinging, macrame--those require trips to special stores, catalog orders, lessons. Computer science is only there inside the machine, waiting for you to sit down with a copy of some heavy book or eager tutorial (the Web has many pushers trying to hook you on a syntax) and start twiddling. It seems that the discipline is entirely about cheapness. The glory goes to parsimony, to the algorithms that invest the fewest CPU cycles for the greatest return.

What scientists saved programmers squander. It must be disappointing to spend your college years cultivating a ponytail and a sense of superiority, discovering the inherent recursive nature of everything, only to wander into a cubicle farm where programmers like myself sit like veal calves, fattened on the candy-colored syntax served up by our platform IDEs, iteratively wasting what you've learned to prize. It must sting to see us burn tons of coal for a single cup of coffee. It stings me in a different way, because I've started to run into programming problems at work that can't be solved just by burning more coal. I've been moving mustard seeds of data with mountain-sized frameworks, and have hit limits personal and processorial. This must be why the puzzle calls to me.


[Top]

Ftrain.com

PEEK

Ftrain.com is the website of Paul Ford and his pseudonyms.

There is a Facebook group.

And six-words-only Twitter posts.

See also: Gary Benchley, Rock Star, a novel; Harper's Magazine; NPR's All Things Considered; The Morning News.

POKE


Syndicate: RSS1.0, RSS2.0
Links: RSS1.0, RSS2.0

Contact

© 1974-2007 Paul Ford

Recent

I'm on a Panel at SxSW. (March 8)

Elsewhere: Just Like Heaven. (January 11)

But melts just like a little girl. (August 26)

Panel/Unicode table for you. (August 21)

Been a while. (February 16)

Learning to Fear the Semantic Web, by Paul Ford. (October 15)

Fixed. (September 18)

NYU. (September 18)

Also. (September 11)

Steering Wheel. (September 11)

I never told you because I was kind of out of it for a while there but. (April 1)

Sasquatch. (March 26)

Over There. (March 24)

Signs. (March 21)

Eloquence Personified. (March 20)

Note. I wonder what the poor folks are doing tonight. (March 20)

The Wind Chest, by Paul Ford. (March 18)

Six-Word Reviews of 763 SXSW Mp3s. (March 13)

This Is Just To Say. (March 3)

Clouds. (February 27)

More...
Tables of Contents