当前位置:文档之家› 三阶幻方问题的代数解法

三阶幻方问题的代数解法


九子斜排, 上下对易, 左右相反, 四维挺出。 图 1 为三阶幻方的一种形式, 或称为幻方的
[1 - 7 ] , 一个解, 后人对幻方的研究也一直没有停止 [8 - 15 ] , 对幻方的解法一直在改进 那么三阶幻方是
பைடு நூலகம்
否存在其他解? 下面采用线性代数办法解决这个 问题。
1
三阶幻方的解
b, c, d, e, f, g, h, i} = { 1, 2, 3, 4, 5, 记 M = { a, 6, 7, 8, 9} , 设三阶幻方的一种形式为图 5 , 易知 a, b, c, d, e, f, g, h, i 诸元满足下列方程组: a + b + c + d + e + f + g + h + i = 45 a + b + c = 15 d + e + f = 15 g + h + i = 15 a + d + g = 15 b + e + h = 15 c + f + i = 15 a + e + i = 15 c + e + g = 15 对其增广矩阵 B 实施初等变换, 得: 1 1 1 1 1 1 1 1 1 45 1 1 1 0 0 0 0 0 0 15 0 0 0 1 1 1 0 0 0 15 0 0 0 0 0 0 1 1 1 15 B= → 1 0 0 1 0 0 1 0 0 15 0 0 1 0 0 1 0 0 1 15 1 0 0 0 1 0 0 0 1 15 0 0 1 0 1 0 1 0 0 15 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 1 1 0 0 1 -1 -2 0 2 1 0 0 100 -5 -10 5 = B' ( 1) 20 15 0 0
Abstract: This paper introduces a constructor of third - order magic square put forw ard by the tw o ancient Chinese mathematicians Yang Hui and Zhen Luan. 56 groups of integer solutions correspond the equations in total,w hen the third - order magic square constraint equations are constructed in a linear algebra w ay and the freedom unknow ns are taken by 1 , 2, 3, …, 9 respectively. To find all solutions in the magic square, restrictions of the freedom unknow n values are to be ascertained. Thus,the values of the freedom unknow n in the equations are discussed in classifications to calculate all the solutions of third - order magic square. The method of exploring the solutions of third - order magic square by using linear algebra methods is obviously not the simplest, how ever, it can be guaranteed by a complete theory. In addition, the article provides an example of how to use linear algebra to solve practical problems and briefly introduces the w onderful properties of the third - order magic square. . Key words: magic square; constraint equations; integer solutions 世界上公认幻方为中国人所发明, 早期称九 宫算, 也叫三行纵横图或洛书。 文献记载最早见 《数术记遗 》 , 于汉朝徐岳所著 说的是在三行三列 九个格子的排列图中, 填入 1 —9 这 9 个数 ( 每格 一个数) , 使其位于各行列及对角线上的三个数 之和相等。北周的甄鸾在该书的注释中给出的解 “九宫者, 即二、 四为肩, 六、 八为足, 左三右七, 为
a = 8, b = 3, c = 4, d = 1, e = 5, f = 9, g = 6, h= 7, i = 2 。得幻方解如图 7 所示。 ( 2 ) 当 i = 4 时, 此时 h 只能取 3 或 9 ( h 若取 1 或 7 将产生矛盾) 。 若 h = 3, 则 a = 6, b = 7, c = 2, d = 1, e = 5, f = 9, g = 8, h= 3, i = 4 。得幻方解如图 8 。 当 h = 9 时, a = 6, b = 1, c = 8, d = 7, e = 5, f = 3, g = 2, h= i = 4 。得幻方解如图 9 。 9,
90 法如下:
沈阳航空航天大学学报 1 。杨辉的构造方法可归结为:
第 29 卷
2, ……9 排列成图 2 所示。 第一步: 将 1 , 第二步: 将图 2 中每一条对角线顶点的两个 — — > 9, 7 <— — — > 3, 数对调, 即 1 <— 得图 3 所 示。 4 两数沿斜上方和将 8 、 第三步: 将图 3 中 2 、 6 两数沿斜下方移动至图 4 , 则图 4 实际上就是图
第29 卷 第2 期 2 012 年4 月
沈阳航空航天大学学报 Journal of Shenyang Aerospace University
V o l. 29 No. 2 Apr . 2 0 1 2
文章编号: 2095 - 1248 ( 2012 ) 02 - 0089 - 04
三阶幻方问题的代数解法
收稿日期: 2011 - 06 - 24 基金项目: 国家自然科学基金资助项目( 项目编号: 10471096 ) ; 辽宁省高等学校科学研究项目( 项目编号: 20060842 ) E - mail: lixy@ synu. edu. cn。 作者简介: 郑长波( 1954 - ) , 男, 辽宁大连人, 教授, 主要研究方向: 应用数学,
则 B' 对应的方程组即为( 1 ) 的同解方程组: a = - i + 10 b = - h + 10 c = h + i - 5 d = h + 2 i - 10 ( 2) e = 5 f = - h - 2 i + 20 g = - h - i + 15 h = h i = i i 中为自由未知量。当自由未知量分别 其 h, 1 , 2 , 3 , ……, 9 时, 取 对应的方程组 ( 2 ) 共有 56 组整数解, 但这些解大部分都不是幻方的解。 为 需要确定自由未知量 h 和 i 了找出幻方的全部解, 取值的限制条件, 为此给出如下定理。 定理: 设图 5 是三阶幻方的一个解, 则幻方 4 c, g, i 只能取偶数。 个角位置 a, 证明: 若有一角为奇数, 不失一般性, 设a为 奇数, 则 a 所在对角线的另一对角位置 i 也是奇 由于中心位置 e = 5 , 则该对角线 3 数。如若不然, 数之和为偶数, 此与 3 数之和为奇数相矛盾, 故当 a 取奇数时, 其所在对角线另一对角 i 只能取奇 数; 此时余下的两个奇数中若有一个位于另一条 由同样道理可知, 该对角线的 对角线上的某一角, 另一角只能取剩下的一个奇数。这样 4 个奇数都 处于四角位置。 但这是行不通的, 因为此时 4 条 边上的 3 数之和都将是偶数, 故此余下的 2 个奇 数不能处在另一条对角线的两顶点位置 ; 这样余下的 2 奇数只能位于 4 条边上的非顶 角位置。但容易发现, 在 4 条边中, 无论哪条边中 间位置放置奇数, 都将使该条边 3 数之和是偶数,
Algebra approach to solve third - order magic square question
ZHENG Changbo 1 ,LI xiaoyi2
( 1. Dalian Fisheries University , Dalian Liaoning 116300 ; 2. School of M athematics and System Science, Shenyang Normal University ,Shenyang 110034 )
第2 期 矛盾。
郑长波, 等: 三阶幻方问题的代数解法 i = 2 。得幻方解如图 6 所示。 9, 当 h = 7 时,
91
于是可知 a 取奇数是错误的, 即 4 个顶角位 置只能取偶数, 证毕。 4, 6, 8 由定理可知, 自由未知量 i 只能取 2 , 其中之一。由于四个偶数都处在四角位置, 因而 d, f, h 只能取奇数, 于 处在四条边中间位置的 b, 3, 7, 94 个数之一。 是另一自由未知量 h 只能取 1 , i 的取值情况来探求幻方 以下根据自由未知量 h, 的解。 ( 1 ) 当 i = 2 时, 3, 3 易知 h 不能取 1 、 若取 1 、 9 将导致矛盾, 故 h 只能取 7 、 若 h = 9, 则由方程组( 2 ) 可得 a = 8, b = 1, c = 6, d = 3, e = 5, f = 7, g = 4, h=
相关主题