摘要: 这个题是NP旅行商问题的简化版,求的是一个矩阵上的最短的路径。NP旅行商问题是Given a set of N towns and roads between these towns, the problem is to compute the shortest path allowing a salesman to visit each of the towns once and only once and return to the starting point.只不过这道题是将这N towns 放在了一个矩阵上,这样可以找到规律,如下:设矩阵为M*N,如果M和N都是奇数,那么最短的路径中 阅读全文
posted @ 2012-07-11 15:31 pushing my way 阅读(246) 评论(0) 推荐(0) 编辑