It's a problem of reachability. Either you show it's reachable or prove it's not. For the simple case of 9 boxes, there are only 9! vertices in the graph so brute-force search will work. Otherwise you need some heuristics like a* search.
【在 c*****z 的大作中提到】 : 为什么是穷举啊,难道在一定步数内肯定可以解出?
c*z
7 楼
cool, i haven't thought it in that way, can you give some more details about how to detect reachability? or give a link, thanks!
【在 p***o 的大作中提到】 : It's a problem of reachability. Either you show it's reachable or : prove it's not. For the simple case of 9 boxes, there are only 9! : vertices in the graph so brute-force search will work. Otherwise : you need some heuristics like a* search.
【在 c*****z 的大作中提到】 : cool, i haven't thought it in that way, can you give some more : details about how to detect reachability? or give a link, thanks!