

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Assignment; Professor: Bosworth; Class: Algorithm Analysis and Design; Subject: Computer Science; University: Columbus State University; Term: Fall 2008;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!
A “word trail” is a sequence of words, each formed from the previous word by a single letter change. The following is a word trail from “CAT” to “TAR” “CAT” “CAR” “TAR” Define the distance between two words as the number of letters that differ. Thus dist (“CAT”, “CAR”) = 1 as the third letter differs dist (“CAR”, “TAR”) = 1 as the first letter differ dist (“CAT”, “TAR”) = 2 as the first and third letters differ. The programming assignment is to use the Breadth First Search. Specifically, the requirements for the program include: Read in the following list of words from a text file. Keep the words in UPPER CASE. BAG BOW DOG MOB BAR BOX EAR NOW BAT CAT EAT ROB BIG COW FAT ROW BOG DIG FOX TAR You may use either the adjacency matrix or adjacency list method or representing the graph. See page 30 of the textbook for details on this. Each of the 20 vertices in the graph is to be labeled with the three letter word associated with it. The edges in the graph are to connect vertices with a single letter difference in the label. Thus, there is an edge from “BAG” to “BAT” and “BAG” to “BAR”, but not “BAT” to “BOX”. The program is to find a word trail from “DOG” to “CAT” by doing a BFS, beginning at the node labeled “DOG”. All program output is to be to a text file. Required output for this program includes.
Here is my adjacency matrix.