没有合适的资源?快使用搜索试试~ 我知道了~
asa_2011_midterm.pdf
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 161 浏览量
2023-06-18
13:11:18
上传
评论
收藏 69KB PDF 举报
温馨提示
试读
1页
asa_2011_midterm.pdf
资源推荐
资源详情
资源评论
http://people.sc.fsu.edu/∼jburkardt/presentations/asa 2011 midterm.pdf
Midterm
Algorithms II
Problem 1:
In the game of word ladders, we are given a starting word and a target word, and asked to transform the
starting word into the target word by changing one letter at a time, each time creating a new, legal word.
The sequence of words formed in this way is the “ladder”.
For instance, given the starting word foe and the target word hat, we might find the following ladder:
foe
fox
fax
fat
hat
Your task is to write a program that tries to solve the word ladder game. You will be given a list of
about 1,000 three letter words that are legal “moves” in the game. Your program should allow the user to
type in a starting word and a target word.
If no word ladder can be found between the two words, then the program should report this. Otherwise,
it should print out the word ladder that it found to connect the two words.
Your list of three letter words is available on Blackboard as wordlist threes.txt, or on my webpage as
http://people.sc.fsu.edu/∼jburkardt/datasets/words/wordlist threes.txt
A) Describe your approach to this problem in words. A paragraph or two will be enough. In particular:
1. Explain what this problem has to do with graph algorithms;
2. Describe the algorithm you will implement;
3. Explain how you dealt with the special features of this particular problem in order to implement the
algorithm;
B) Demonstrate your program on the following pairs of starting and target words by displaying the
output from your program:
1. from yes to nay;
2. from fox to gnu;
3. from oca to cub;
1
资源评论
卷积神经网络
- 粉丝: 337
- 资源: 8460
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功