首页 | 官方网站   微博 | 高级检索  
     

幻方的实现方法研究
引用本文:李冠林,顾大权.幻方的实现方法研究[J].微型电脑应用,2010,26(1):17-18.
作者姓名:李冠林  顾大权
作者单位:解放军理工大学气象学院,江苏南京,211101
摘    要:用3种不同的构造法可以生成奇阶、单偶阶和双偶阶三类不同的幻方。以全排列为基础,可以求出全部8个三阶幻方。为了求出全部四阶幻方,先找出1至16中和为34的四个数字组合,共有2064组。该文提出了两个求解全部四阶幻方的算法。算法一先确定一列,再确定4行。算法二先确定两列,再确定4行。四阶幻方共有7040个,其中880个无重复。算法二比算法一效率高得多,表明增加循环之前的检验之后,程序运行的速度大大提高了。

关 键 词:四阶幻方  构造法  全部解  无重复解

Research on Magic Square Method for Programmer
Li Guanlin,Gu Daquan.Research on Magic Square Method for Programmer[J].Microcomputer Applications,2010,26(1):17-18.
Authors:Li Guanlin  Gu Daquan
Affiliation:Li Guanlin,Gu Daquan (Institute of Meteorology,PLA University of Science , Technology,Nanjing 211101,China)
Abstract:Three different methods are used to structure three different kinds of magic squares in this paper: odd order, single-even order and doubly even order. Based on full permutation, All the third-order magic square are found, a total of 8. In order to get all the fourth-order magic square, firstly, identify the group containing 4 elements the sum of which is 34. There are 2064 such groups. This paper provides two algorithms to calculate all the fourth-order magic squares. Algorithm I first determine one column...
Keywords:Fourth-order Magic Squares  Structure Method  All Solutions  No-repeat Solutions  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号