Word patterns by typing on left and right
18 April 2005

It was an idle question, “What’s the longest word you can type using only the top row of the keyboard?”

The answer (to be found at the end of this entry, and many puzzle websites) was found with a little intuition, and a lot of trial and error. But it’s a good question, with an interesting answer. However, it is now a standard word puzzle and finds its way onto many “101 things you know you didn’t know” email circulars. Most people now know the answer.

I then posed an alternative question, “What’s the longest word you can type using only the middle row of the keyboard?”

This proved more tricky since there’s only one vowel (the ‘a’) and no obvious consonant pairs (‘g’ and ‘h’, or ‘g’ and ‘l’ are perhaps the only two.) I therefore took to cheating and enlisted the help of my local friendly Linux box, loaded with text processing goodies such as grep and awk. I rustled up this code:

steev$ grep -i -E "^([asdfghjkl])+$" /usr/share/dict/words | awk '{ printf( "%5d: %s\n", length( $0 ), $0 ) }' | sort -r | head

Answer at the end.

I then got to thinking about the bottom row. And the left hand side of the keyboard only. And the right hand side. And the left hand side, followed by the right hand side. And the right hand side, followed by the left. And so on. I had many ideas, all solved by changing the regular expression in the above code, as the following example (which deduces the “left, then right” words) shows:


steev$ grep -i -E "^([qwertasdfgzxcvb][yuiophjklmn])+[qwertasdfgzxcvb]?$" /usr/share/dict/words | awk '{ printf( "%5d: %s\n", length( $0 ), $0 ) }'| sort -r | head

Ok – so the bottom row has no vowels (and I was unprepared to compromise by using the period as an ‘o’) and so resulted in a trivial solution. The other solutions were more interesting.

Note that I split the keyboard into left and right along the ‘t’, ‘g’ and ‘b’ axis. Note also that the dictionary doesn’t include every word in the English language, which is why “lollipop” isn’t included for “right only”. Nor does it include plurals that can increase the length by one or two letters. If plurals were allowed, the best answer for “left only” would actually be “Stewardesses”.


Answers:

Top line: Typewriter
Middle line: Galahad (or alfalfa)
Left only: vertebrates (with 7 others)
Right only: monopoly or Honolulu
Left then right: authenticity
Right then left: proficiency