摘要
本文首先从标准数独的条件与规则出发,引入三元0-1变量,建立标准数独的0-1整数规划模型,根据模型设计LINGO求解程序,用一个数独难题进行验证,说明程序计算的准确性;然后将标准数独的LINGO求解程序推广到窗口数独、额外区域数独、奇偶数独等三种变形数独的求解;最后利用数独联盟五段段位考试训练题进行验证,运算时间不超过2秒,准确率达到100%,说明这些LINGO程序求解数独问题,速度快且结果准确可靠。
Based on the standard Sudoku rules, the ternary 0 - 1 variables was introduced to build a 0 - 1 integer programming of stand- ard Sudoku. The LINGO solution program was developed based on the model, and its accuracy was verified by a Sudoku puzzle. Then, the solution method of standard Sudoku was extended to window Sudoku, extra area Sudoku and odd - even Sudoku. The operation time and accuracy of the LINGO programs are validated by Sudoku puzzles in the Grade Five Exam of Sudoku League. The operation time were all less than 2 seconds, and the accuracy rate were 100%, these LINGO programs can be used to solve Sudoku problems with short operation time and highly reliable results.
出处
《长春师范大学学报》
2016年第12期8-13,共6页
Journal of Changchun Normal University