All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Algorithms
Word Ladder Construction (Posted on 2004-01-15) Difficulty: 3 of 5
Write an algorithm to create word ladders such as any of the following:
hard bard bird bind bins
hard ward word wood wool
hard herd head dead dean
hard hand band bind bins
hard harp hasp wasp wisp

where a word is given which must be transformed into some other word (not specified in advance) with the same number of letters, but each letter position changed from its original value, in as many steps as there are letters in the word, each step also being a valid word. This is similar to the various Word Meld puzzles on this site, except there are as many steps as there are letters in the word and each letter is changed, with each letter position being changed exactly once.

Input consists of the starting word only. It is assumed that the number of steps will be the same as the number of letters in the word. Available are files containing lists of words of any given length; call one such file, say WORDS5.TXT containing a list of words of 5 letters each, and so on. The program will find all the eligible word ladders given the words in the list.

The program will, of course, terminate without finding any results if in fact a word ladder cannot be constructed starting with the input word.

See The Solution Submitted by Charlie    
Rating: 3.0000 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
The program posted above produces.... | Comment 6 of 7 |

...for the beginning word "and", the following word ladders, based on my unabridged wordlist dataset:

and add ada aba
and add ada ade
and add ada ado
and add ada ads
and add ada ady
and add ada adz
and add ada aga
and add ada aha
and add ada aka
and add ada ala
and add ada ama
and add ada ana
and add ada apa
and add ada ara
and add ada asa
and add ada ata
and add ada ava
and add ada awa
and add ada ida
and add ada oda
and add ade abe
and add ade ace
and add ade ada
and add ade ado
and add ade ads
and add ade ady
and add ade adz
and add ade age
and add ade ake
and add ade ale
and add ade ame
and add ade ane
and add ade ape
and add ade are
and add ade ase
and add ade ate
and add ade aue
and add ade ave
and add ade awe
and add ade axe
and add ade aye
and add ade ede
and add ade ide
and add ade ode

..... etc......

and ind ino iao
and ind ino ibo
and ind ino ido
and ind ino igo
and ind ino ijo
and ind ino ina
and ind ino ing
and ind ino ink
and ind ino inn
and ind ino ins
and ind ino iso
and ind ino ito
and ind ino iyo
and ind ins ens
and ind ins ids
and ind ins ifs
and ind ins ina
and ind ins ing
and ind ins ink
and ind ins inn
and ind ins ino
and ind ins its
and ind ins ons
and ind ins uns

 


  Posted by Penny on 2004-11-07 08:00:04
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information