Overview | Schedule | Resources | Assignments | Home |
cd /home/libs/dataStr/students/YOURNAMEHERE mkdir pp2 cp /home/libs/dataStr/pp2/* pp2
Final Project and Take-Home Exam: For the project, write a Word Ladder program. Using the file
words.txt
(all files are located in /home/libs/dataStr/pp3/
), which contains
over 100,000 english words, search for the shortest way to turn one given word into another, by only
changing one letter at a time. There is a demo version in the file pp3demo
; here is an
example of using it:
$ ./pp3demo love hate Found a path of length 3 love hove have hate
You are free to decide what the interface should be, although to get full credit there will need to
be a way to specify the starting and ending words without having to recompile the program (that is,
don't compile them in as constant strings). If you wish, you may (without penalty) restrict the
program to only work on words of a given length -- I have provided files named words04.txt
through words17.txt
which only contain the words of length 4 through 17 (although I doubt
there are any interesting word ladders with 17 characters...). The program should let the user know
how to specify the first and last words (for example, running ./pp3demo
without any
arguments produces the error message Usage: ./pp3demo first last
, which is a common way
for unix command-line programs to behave).
While the project may be done in groups of two or three (I have changed my mind on this), the rest of the exam should be completed individually. There are two parts:
The written parts should be turned in to me, either in my office or by email, by noon on Friday, December 15. The project should be completed by that time as well -- send me email as usual, telling me who worked on the code and where it is saved.
Overview | Schedule | Resources | Assignments | Home |
DePauw University,
Computer Science Department,
Fall 2006
Maintained by Brian Howard
(bhoward@depauw.edu
).
Last updated