Bill Teter
Office:          149 Redcay
Telephone:    2782
Office Hours:  Tuesday, Thursday 9:00-12:00

email:  william.teter@plattsburgh.edu

       

 

project 4 -- Graphs and a word game
                    (due 9/30)

Use the Graph class that is available in the directory of code down-loaded from Weiss's web page.  Write a program that solves the following puzzle.  Given two five letter words, determine if you can change one word  to the other by changing one letter at a time.  All words produced must be in the English dictionary /usr/share/dict/words.  For example: bleed converts to blood via:
bleed
blend
blond
blood

Estimate the complexity of your program as a function of n, the number of 5 letter words in the dictionary.  Answer this question in two parts, first the complexity of building the graph and second of finding the shortest path.

Test your program with a test class called Test.java that accepts two command line arguments and prints out the word sequence to convert the first word to the second or state that it can't be done.