마방진 문서 원본 보기
←
마방진
둘러보기로 이동
검색으로 이동
문서 편집 권한이 없습니다. 다음 이유를 확인해주세요:
요청한 명령은 다음 권한을 가진 사용자에게 제한됩니다:
사용자
.
문서의 원본을 보거나 복사할 수 있습니다.
{{위키데이터 속성 추적}} [[파일:Magicsquareexample.svg|frame|right|3×3 마방진]] '''마방진'''(魔方陣, {{llang|en|magic square}}) 또는 '''방진'''(方陣)은 n<sup>2</sup>개의 수를 가로, 세로, 두 대각선 방향의 수를 더하면 모두 [[마법 상수|같은 값]]이 나오도록 n × n [[행렬]]에 배열한 것이다. 일반적인 마방진(pure/normal magic square)의 각 칸에는 1부터 n<sup>2</sup>까지의 수가 모두 들어간다.<ref>{{웹 인용 |성1=Heinz |이름1=Harvey |제목=Magic Squares index page |url=http://www.magic-squares.net/magic_squares_index.htm |웹사이트=www.magic-squares.net |확인날짜=2020-11-13 |archive-date=2019-10-20 |archive-url=https://web.archive.org/web/20191020013612/http://www.magic-squares.net/magic_squares_index.htm |url-status=dead }}</ref><ref name=":00">{{웹 인용 |제목=Magic Square |url=https://mathworld.wolfram.com/MagicSquare.html |웹사이트=[[매스월드]]}}</ref> 마방진은 n이 2일 때를 제외하고 항상 존재한다.<ref name=":01">{{웹 인용 |제목=How to show there is no magic cube of order 2? |url=https://math.stackexchange.com/questions/3341608/how-to-show-there-is-no-magic-cube-of-order-2 |웹사이트=math.stackexchange.com}}</ref> <div>__TOC__</div> == 역사 == [[파일:Jiushutu.png|섬네일|최초의 마방진으로 여겨지는 낙서]] 중국 [[하나라]]의 [[우 (하나라)|우 임금]] 시절 (약 4000년 전) 우왕은 매년 범람하는 [[황하]]의 물길을 정비할 때 이상한 그림이 새겨진 [[거북]]의 등 껍데기를 발견했다. 1부터 9까지의 숫자가 배열된 3차 마방진이었고, 가로, 세로, 대각선의 어느 방향으로 더해도 그 합([[마방진 합]])이 15였다. 이를 [[하도낙서|낙서]]라고 한다.<ref>{{웹 인용 |제목=[역사속 수학이야기](9) 마방진 이야기 |url=http://news.khan.co.kr/kh_news/khan_art_view.html?artid=200703060921131&code=900314 |웹사이트=[[경향신문]]}}</ref><ref>{{웹 인용 |제목=[장선영의 수학이야기(17)]오일러를 앞선, 영의정 최석정 |url=http://www.ksilbo.co.kr/news/articleView.html?idxno=567066 |웹사이트=[[경상일보]]}}</ref> {{인용문| 天與禹洛出書,神龜負文而出,列於背,有數至於九。禹遂因而第之,以成九類,常道所以次敘。 | [[:s:zh:尚書正義/卷十二|상서정의 12권]] }} == 특성 == === [[마법 상수]] === {{본문|마법 상수}} 마방진에서 가로줄, 세로줄, 그리고 두 대각선의 합은 같은데, 그 값을 [[마법 상수]]라고 한다. 1부터 n<sup>2</sup>까지의 수가 한 개씩 들어가는 '일반적인'(normal) 마방진에서 모든 수의 합은 1부터 n<sup>2</sup>까지의 자연수 합으로 [[삼각수]] <math>\frac{n^2(n^2+1)}{2}</math>이다. n개의 가로·세로줄이 있으니 마법 상수는 이를 n으로 나눈 것과 같다.<ref name=":00" /> :<math>M(n) = \frac{n^2(n^2+1)}{2}\div n = \frac{n(n^2+1)}{2}</math> === 자명한 1차 마방진 === 1차 마방진(1×1 마방진)은 수가 '1' 한 개밖에 없다. 따라서 [[자명성|자명하다]]. === 불가능한 2차 마방진 === 일반적인 마방진은 2차 마방진 외에는 모두 가능하다.<ref name=":01" /><ref>{{웹 인용 |제목=Why there are no 2x2 magic squares |url=http://mathforum.org/alejandre/magic.square/adler/adler5.html |웹사이트=mathforum.org |확인날짜=2020-11-13 |archive-date=2018-03-02 |archive-url=https://web.archive.org/web/20180302092216/http://mathforum.org/alejandre/magic.square/adler/adler5.html |url-status= }}</ref> 다음과 같은 2차 마방진이 있다고 하면, {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |{{tmath|a}}||{{tmath|b}} |- |{{tmath|c}}||{{tmath|d}} |} {{tmath|a}} + {{tmath|b}} = {{tmath|a}} + {{tmath|c}} 이고, {{tmath|b}} = {{tmath|c}} 로 두 수가 중복된다. === 개수 === 2024년에 6차 마방진의 개수에 대한 검증이 끝나 6차까지 개수가 알려져 있다. ;1, 0, 1, 880, 275305224, 17753889197660635632. {{OEIS|id=A006052}} 2024년 12월에 7차, 8차 마방진의 개수가 시뮬레이션을 통해 산출됐습니다.'''<ref>{{웹 인용|url=https://systemwiz.com/ms/|제목=마방진 개수|날짜=2024-12-09}}</ref> ;7차 마방진의 개수는 3.54886E+34 개이고 ;8차 마방진의 개수는 5.20248E+54 개입니다. ;9차 마방진의 개수는 1.33581E+78 개로 2025년 02월 18일에 최세권 프로그래머가 계산했다. == 분류 == [[파일:4x4_magic_square_hierarchy.svg|섬네일|upright|4×4 마방진의 종류를 [[벤 다이어그램]]으로 표시한 것이다. 같은 색으로 표시된 부분에서 합이 [[마법 상수]]로 같다.]] n×n 마방진은 어떤 수들의 합이 [[마법 상수]]로 같은지에 따라 다음과 같이 분류될 수 있다. *'''[[준마방진]]'''(semi-magic square)은 가로줄과 세로줄만의 합이 마법 상수로 같다. *'''단순 마방진'''(simple magic square)은 가로줄, 세로줄, 그리고 두 대각선의 합이 마법 상수로 같다. '''일반적인 마방진'''(ordinary magic square) 또는 '''평범한 마방진'''(normal magic square)이라고도 불리고, 일반적으로 마방진은 단순 마방진을 말한다. *'''[[범마방진]]'''(汎魔方陣, pandiagonal magic square) 또는 범대각선 마방진(汎對角線 魔方陣)은 [[범대각선]](깨진 대각선)의 합도 마법 상수로 같은 마방진을 말한다. *'''[[가장 완벽한 마방진]]'''(most-perfect magic squrare)은 두 조건을 만족하는 범마방진이다. == 마방진 만들기 == 몇천 년 동안, 마방진을 만드는 다양한 방법이 발견되었다. === 홀수 차수의 마방진 === {{참고|시암의 방법}} 홀수 차수의 마방진을 만드는 방법은 [[프랑스]] 외교관 '[[시몬 드 라 루베르]]'(Simon de la Loubère)가 그의 저서 《[[시암]] 왕국의 역사적 관계(Du Royaume de Siam, 1693)》의 〈인도인들에 따른 마방진 문제(The problem of the magical square according to the Indians)〉에 나와 있다.<ref>''Mathematical Circles Squared'' By Phillip E. Johnson, Howard Whitley Eves, p. 22</ref> 그 방법은 다음과 같다. 첫 번째 행의 가운데 칸에 1을 넣는다. 그 다음 자연수를 [[대각선]] 방향으로 오른쪽 위 칸에 넣는 것을 모든 칸이 채워질 때까지 반복한다. 이때 해당하는 칸이 마방진의 위쪽으로 벗어난 경우에는 반대로 가장 아래쪽의 칸으로, 마방진의 오른쪽으로 벗어나는 경우는 가장 왼쪽의 칸으로 각자 한번 더 이동한다. 또 이때 칸을 채울 자리에 이미 숫자가 있다면 아래에 수를 넣는다. {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- |+ 1단계 |- | ||style="background-color: silver;"|1 || |- | || || |- | || || |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- |+ 2단계 |- | ||1 || |- | || || |- | || ||style="background-color: silver;"|2 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- |+ 3단계 |- | ||1 || |- | style="background-color: silver;"|3 || || |- | || || 2 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- |+ 4단계 |- | || 1 || |- | 3 || || |- | style="background-color: silver;"|4 || || 2 |} {{col-end}} {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- |+ 5단계 |- | ||1 || |- | 3 || style="background-color: silver;"|5 || |- | 4 || || 2 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- |+ 6단계 |- | || 1 || style="background-color: silver;"|6 |- | 3 || 5 || |- | 4 || || 2 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- |+ 7단계 |- | || 1 || 6 |- | 3 || 5 || style="background-color: silver;"|7 |- | 4 || || 2 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- |+ 8단계 |- | style="background-color: silver;"|8 || 1 || 6 |- | 3 || 5 || 7 |- | 4 || || 2 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- |+ 9단계 |- | 8 || 1 || 6 |- | 3 || 5 || 7 |- | 4 || style="background-color: silver;"|9 || 2 |} {{col-end}} 맨 윗 줄에 가운데 칸이 아닌 칸에서 시작해도 가능하지만, 가로줄과 세로줄은 [[마법 상수]]으로 나오고 대각선의 합은 다르다. 따라서 [[준마방진]](semimagic square)이 만들어지고, 진짜 마방진은 나올 수 없다. 또 대각선 오른쪽 위 방향이 아닌 방향으로 자연수를 계속 써도 마방진이 나올 수 있다. {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- |+ Order 3 |- | 8 || style="background-color: silver;"|1 || 6 |- | 3 || 5 || 7 |- | 4 || style="background-color: silver;"|9 || 2 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:10em;height:10em;table-layout:fixed;" |- |+ Order 5 |- | 17 || 24 || style="background-color: silver;"|1 || 8 || 15 |- | 23 || 5 || 7 || 14 || 16 |- | 4 || 6 || 13 || 20 || 22 |- | 10 || 12 || 19 || 21 || 3 |- | 11 || 18 || style="background-color: silver;"|25 || 2 || 9 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:18em;height:18em;table-layout:fixed;" |- |+ Order 9 |- | 47 || 58 || 69 || 80 || style="background-color: silver;"|1 || 12 || 23 || 34 || 45 |- | 57 || 68 || 79 || 9 || 11 || 22 || 33 || 44 || 46 |- | 67 || 78 || 8 || 10 || 21 || 32 || 43 || 54 || 56 |- | 77 || 7 || 18 || 20 || 31 || 42 || 53 || 55 || 66 |- | 6 || 17 || 19 || 30 || 41 || 52 || 63 || 65 || 76 |- | 16 || 27 || 29 || 40 || 51 || 62 || 64 || 75 || 5 |- | 26 || 28 || 39 || 50 || 61 || 72 || 74 || 4 || 15 |- | 36 || 38 || 49 || 60 || 71 || 73 || 3 || 14 || 25 |- | 37 || 48 || 59 || 70 || style="background-color: silver;"|81 || 2 || 13 || 24 || 35 |} {{col-end}} === 4차 마방진 === 위와 같이 4칸씩 나누어 흑색 칸과 백색 칸으로 칠한 뒤에, 힌 색 칸의 수들을 180도 뒤집어 옮기면 마방진이 된다. {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- |+ ''M'' = Order 4 |- | style="background-color: silver;"|1 ||2 ||3 || style="background-color: silver;"|4 |- |5 || style="background-color: silver;"|6 || style="background-color: silver;"|7 ||8 |- |9 || style="background-color: silver;"|10 || style="background-color: silver;"|11 ||12 |- | style="background-color: silver;"|13 ||14 ||15 || style="background-color: silver;"|16 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- |+ ''M'' = Order 4 |- | style="background-color: silver;"|1 ||15 ||14 || style="background-color: silver;"|4 |- |12 || style="background-color: silver;"|6 || style="background-color: silver;"|7 ||9 |- | 8 || style="background-color: silver;"|10 || style="background-color: silver;"|11 ||5 |- | style="background-color: silver;"|13 || 3 || 2 || style="background-color: silver;"|16 |} {{col-end}} == 변형 == === 2차원 === <gallery> 파일:Yang Hui magic circle.svg|[[마원진|원진]] 파일:Order 3 Magic Triangles.gif|[[다각진]] 중 하나인 [[삼각진]] 파일:MagicHexagon-Order3-a.svg|[[육각진]] 파일:Magic6star-sum26.svg|[[별진]] 중 하나인 [[육각별진]] 파일:hexagonal_tortoise_problem.svg|[[최석정]]의 [[지수귀문도]] </gallery> === 다차원 === <gallery> 파일:Simple Magic Cube.svg|[[입체마방진]] </gallery> == 같이 보기 == * [[입체마방진]]: 3차원 형태의 마방진 == 각주 == {{포털|수학}} {{각주}} == 외부 링크 == * {{위키공용분류-줄}} * {{언어링크|en}} [https://mathworld.wolfram.com/MagicSquare.html 매스월드의 마방진 문서] * {{언어링크|ko}} [https://web.archive.org/web/20160304132852/http://dairyong.com.ne.kr/index.htm 숫자놀이] {{마법진}} {{전거 통제}} [[분류:마방진| ]] [[분류:행렬]] [[분류:수학의 미해결 문제]] [[분류:마법]] [[분류:수비학]] [[분류:중국 수학]]
이 문서에서 사용한 틀:
틀:Col-begin
(
원본 보기
)
틀:Col-break
(
원본 보기
)
틀:Col-end
(
원본 보기
)
틀:Llang
(
원본 보기
)
틀:OEIS
(
원본 보기
)
틀:Tmath
(
원본 보기
)
틀:각주
(
원본 보기
)
틀:마법진
(
원본 보기
)
틀:본문
(
원본 보기
)
틀:언어링크
(
원본 보기
)
틀:웹 인용
(
원본 보기
)
틀:위키공용분류-줄
(
원본 보기
)
틀:위키데이터 속성 추적
(
원본 보기
)
틀:인용문
(
원본 보기
)
틀:전거 통제
(
원본 보기
)
틀:참고
(
원본 보기
)
틀:포털
(
원본 보기
)
마방진
문서로 돌아갑니다.
둘러보기 메뉴
개인 도구
로그인
이름공간
문서
토론
한국어
보기
읽기
원본 보기
역사 보기
더 보기
검색
둘러보기
대문
최근 바뀜
임의의 문서로
미디어위키 도움말
특수 문서 목록
도구
여기를 가리키는 문서
가리키는 글의 최근 바뀜
문서 정보