how is sudoku np-complete?

和自甴很熟 提交于 2019-12-11 06:24:22

问题


how is Sudoku an np-complete problem? according to wiki, to be classed as an np-complete problem it must satisfy 2 conditions

  1. problem must be in np
  2. every other problem in np must be reducible to given problem in polynomial time

how is the second condition satisfied? can you give an example? for instance, I don't see any correlation between Sudoku problem and the travelling salesman problem or knapsack problem

(kindly forgive poor formatting as I'm typing this question on my mobile device)


回答1:


NP-completeness of SUDOKU notes in part:

This result was first shown in this master’s thesis by reduction from the NP-complete problem LATIN SQUARE COMPLETION. Sudoku wikipedia page.

Here is how it works (simplified, without reference to ASP-completeness, which I don’t cover in this course).

Suppose we have a n×n instance of LATIN SQUARE COMPLETION. We construct a n2×n2 instance of SUDOKU, that encodes the instance of LATIN SQUARE COMPLETION. Moreover, the encoding is very direct.

http://www-imai.is.s.u-tokyo.ac.jp/~yato/data2/MasterThesis.pdf being a link to the thesis in PDF.



来源:https://stackoverflow.com/questions/40390131/how-is-sudoku-np-complete

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!