|
Bill Teter email: william.teter@plattsburgh.edu |
|
|
project 4 -- Graphs and a word game 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: 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. |