我试过你说的算法,但是无法保证在有限时间内得出解啊。附件是我的解法
--Problem: Finding the Restaurant in the ParkThe Ruritanian National Park is covered by a network of hiking trails. The trails form a finite connected graph in which each node (that is, each junction of trails) is of degree 3. The junctions are indistinguishable one from another: it is impossible to know which junction one has arrived at, to identify the trails meeting there, or to recognise whether one has been there before. There is a strict rule against leaving litter in the park, so it is not permissible to mark junctions or trails in any way. There is another strict rule that if you enter a junction by one trail you must leave it by a different trail. Initially you have arrived at some node by one of its incident paths.* Give an algorithm by which you will find the junction at which the restaurant is located.
--
中科院开源软件协会
----------------------------------------------------------------------------------------------------------------------
发帖请发电子邮件到 open...@googlegroups.com
也可以直接通过 http://groups.google.com/group/open-cas?hl=zh-CN 访问论坛发贴
----------------------------------------------------------------------------------------------------------------------
开源协会的宗旨:自由软件精神——“自由开放分享”
望协会的各位成员能够发扬ubuntu精神—— "具有 ubuntu 精神的人心胸开阔,乐于助人,见贤思齐而不忌妒贤能,因为他或她拥有适度的自信,而这源自如下认识:自己属于一个更大的整体,当他人受到伤害或死去时,当他人受到折磨或压迫时,这个整体就会消失。"
----------------------------------------------------------------------------------------------------------------------
---
您收到此邮件是因为您订阅了Google网上论坛中的“中科院开源协会”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到open-cas+u...@googlegroups.com。
要查看更多选项,请访问https://groups.google.com/d/optout。
有人有确定性算法么,在有限时间内找到目标,求帮忙啊