sudoku - 数独如何np完全?

标签 sudoku np-complete

数独如何成为 np 完全问题?根据 wiki,要被归类为 np 完全问题,它必须满足 2 个条件

  1. 问题必须在 np 中
  2. np 中的所有其他问题都必须可以在多项式时间内还原为给定问题

第二个条件如何满足?你能给个例子吗?例如,我没有看到数独问题和旅行商问题或背包问题之间有任何关联

(请原谅我在移动设备上输入此问题时格式不当)

最佳答案

NP-completeness of SUDOKU部分注释:

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 PDF 格式论文的链接。

关于sudoku - 数独如何np完全?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40390131/

相关文章:

hadoop - 基准加入和数独

c - Sudoku C 递归函数无法正常工作

c - 数独生成器导致段错误

ruby - 高效的置换树算法

algorithm - bool 表达式的最小化是 NP-Complete 吗?

graph - 检查给定图是否是另一个图的子图的算法

c++ - 这个char数组代码有什么问题?

algorithm - 从 NP Complete 到其他问题的多项式时间缩减

algorithm - 在一个集合中查找一组数字,这些数字加起来等于另一个集合中的数字

computer-science - 3-cnf-sat有一个问题