Two Guys Arguing

Wrong Word, Right Key Strokes Challenge

Posted in challenge by benjaminplee on 04.07.09

Back in the metaphorical “day” I remember an incident where I tried to quickly type a message to someone and only after hitting Enter, noticed that in my haste my fingers were not lined up in their normal position.  The strange thing was that despite my fingers being off my a key (I can’t remember which direction), I had succeeded in typing a real word.  Unfortunately I can’t remember what the word was (intended or accidental).

Therefore, I put forth this challenge write a script which based on a English word list and the standard QWERTY key layout, find all of the real words that can be accidentally typed if another real word is typed with each keystroke offset by one key.  (e.g. if the word SAD was typed with your hands shifter right one key, it would come out DSF … which isn’t a word but you get the idea).  Key offset should be only one key distance, but I will leave it up to the implementer to decide what to do about moving up and down.

I fully intend to write this up at some point, but just haven’t had the time yet.  If anyone wants to take a stab at it, please let me know.

FYI … the National Puzzlers’ League has some nice word lists under “Solving Tools of the NPL”.

About these ads

5 Responses

Subscribe to comments with RSS.

  1. kooz said, on 04.07.09 at 7:16 pm

    are you sure there -are- any?
    strike that, i can already see RIB -> TON, SIN -> DOM, FIR -> GOT, RUN -> TIM. more than that and who the heck knows.

    i’d be curious about if thiw was set up so that you had only one hand in the wrong position. i especially wonder that because i use my left hand to type the letter Y.

  2. benjaminplee said, on 04.09.09 at 10:38 pm

    Because no one has yet to answer my challenge, I threw together a quick script in Ruby to see how it might be done. If anyone is interested, I put the code up on DZone Snippets here.

    Using the unix and scrabble dictionary word lists from the NPL site and a couple handle commands to sort/combine/remove duplicates in the result files I was left with a file containing 129 unique combinations of words which if the finders were either LEFT/RIGHT/ABOVE/BELOW their normal position would result in another “real” word. An abreviated version of the result word list is posted below. Many are not words I know or would use … but its still interesting.

    escort – waxier
    bored – views
    derry – sweet
    drest – sewar
    feuar – grist
    minos – nubia
    agio – shop
    auks – sild
    aura – sits
    awed – serf
    ayes – surd
    bien – norm
    biff – nogg
    bobs – viva
    bods – visa
    bore – view
    bort – vier
    boys – vita
    bura – nits
    byes – nurd
    dibs – fond
    dies – ford
    dins – suba
    dirt – suer

    • benjaminplee said, on 04.09.09 at 10:40 pm

      Because I don’t really know Perl and I know I will need this handy script again some day, here is the line I used to sort the result files by line length:

      perl -e ‘print sort {length $a length $b} ‘ file.name

      ** taken from here.

  3. youngnh said, on 04.10.09 at 10:39 am

    I wrote a unix script to solve this using just sed, sort, uniq and cat, I’ll post on it later, but my favorite was:
    gyno -> hump

    • youngnh said, on 04.10.09 at 10:39 am

      I know, I’m 12 years old.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.