Dual Formulations of Magic Squares

msra(2008)

引用 23|浏览2
暂无评分
摘要
The problem of finding an n × n magic square can be represented as a constraint satisfaction problem (CSP). It can be modelled as a permutation problem, and hence there are dual viewpoints in which the roles of the variables and values are reversed. In modelling problems as CSPs, choosing between different viewpoints and the resulting models usually requires taking the constraint solver into account, to decide which model will lead to better performance; but in this case, one viewpoint is clearly better than the other simply because of the number of constraints. For the viewpoint in which the variables represent the cells of the s quare, the number of constraints is linear, whereas the dual viewpoint leads to a model in which the number of constraints is exponential in n. In modelling a problem as a constraint satisfaction problem (CSP), there is often more than one possible viewpoint (giving the variables and values of the CSP) that could be used as a basis. Often, it is hard to choose between possible viewpoints without trying them out, and in fact the relative performance of models based on different viewpoints can depend on the search algorithm and search heuristics used to solve the CSP (1), so that neither viewpoint is inherently better than the other. Even when one viewpoint can be seen a priori to be better than an alternative, this is often because the co nstraints that can be expressed in one viewpoint will propagate better than those in the other; hence, the comparison between the viewpoints depends on the detail of how constraints propagate in the chosen constraint solver. Usually, there seems no unequivocal reason to prefer one viewpoint to another that does not depend on considering how the resulting CSP will be solved. In this paper, two viewpoints for the problem of finding a magi c square are discussed and it is shown that in this case one viewpoint is far preferab le to the other, irrespective of the constraint solver. The problem is a permutation problem, and it is well-known that permutation problems can be modelled in two dual viewpoints, in which the roles of the variables and values are opposite. In this case one of the two viewpoints is inherently worse than the other, and in fact unusable except for small instances, because the number of constraints grows at least exponentially with the instance size, whereas the dual viewpoint gives a CSP in which the number of constraints increases linearly.
更多
查看译文
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要