규칙은 세 줄The whole rule is three lines
네 자리 수 하나를 잡고, 이렇게 합니다.
Take a four-digit number and do this.
- 자릿수를 큰 순서로 늘어놓는다. 1234 → 4321
- 자릿수를 작은 순서로 늘어놓는다. 1234 → 1234
- 큰 쪽에서 작은 쪽을 뺀다. 4321 − 1234 = 3087
- Write the digits in descending order: 1234 → 4321
- Write the digits in ascending order: 1234 → 1234
- Subtract the smaller from the larger: 4321 − 1234 = 3087
이제 3087로 같은 일을 반복합니다.
Now repeat the same thing on 3087.
6174에 닿으면 더는 움직이지 않습니다. 7641 − 1467 = 6174, 자기 자신으로 돌아오기 때문입니다. 이 수를 카프레카 상수라고 부릅니다.
Once at 6174 nothing moves again: 7641 − 1467 = 6174, it maps to itself. That number is Kaprekar's constant.
🔢 직접 돌려 보기🔢 Run it yourself
예외는 정말 하나도 없을까Are there really no exceptions?
몇 개 해보고 "되네" 하는 건 증명이 아닙니다. 다행히 이 문제는 후보가 유한합니다. 네 자리 수는 0000부터 9999까지 만 개뿐이고, 자릿수가 모두 같은 열 개를 빼면 9990개입니다. 전부 돌려 보면 됩니다.
Trying a few and saying "it works" is not a proof. Happily, here the candidates are finite. There are only ten thousand four-digit strings from 0000 to 9999, and dropping the ten with all digits equal leaves 9990. So run them all.
📊 전부 세어 보기📊 Count every one of them
왜 그런지 증명해 봅시다Now let's prove it
만 개를 다 돌려 본 건 증명이 맞습니다. 다만 손으로는 못 합니다. 그런데 이 문제에는 훨씬 짧은 길이 있습니다. 한 걸음만 지나면 남는 후보가 몇십 개로 줄어듭니다.
Running all ten thousand is a valid proof, just not one a person can do by hand. But there is a much shorter road: after a single step, only a few dozen candidates are left.
① 뺄셈은 자릿수를 기억하지 못한다① The subtraction forgets the digits
세 자리부터 봅시다. 자릿수를 큰 순서로 a ≥ b ≥ c라고 두면, 두 수는 abc와 cba입니다. 빼면 이렇게 됩니다.
Start with three digits. Sorted descending they are a ≥ b ≥ c, so the two numbers are abc and cba. Subtracting:
가운데 자리 b가 완전히 사라졌습니다. 결과는 오직 가장 큰 자리와 가장 작은 자리의 차이 하나로 정해집니다. 그 차이는 1부터 9까지뿐이고요(0이면 세 자리가 다 같은 수라 제외했습니다). 그러니 첫 걸음을 밟는 순간, 남은 수는 딱 아홉 개입니다.
The middle digit b vanished entirely. The result depends on nothing but the gap between the largest and smallest digit, and that gap runs only from 1 to 9 (a gap of 0 means all three digits are equal, which we excluded). So the moment the first step is taken, only nine numbers remain.
② 아홉 개를 전부 적어 봅시다② Write down all nine
아홉 개가 각각 어디로 가는지 적으면 세 자리 증명은 그것으로 끝납니다.
Write where each of the nine goes, and the three-digit proof is finished right there.
아홉 개가 한 줄로 이어져 495로 흘러들고, 495는 자기 자신으로 갑니다. 빠져나갈 곳도, 맴돌 고리도 없습니다. 첫 걸음까지 세면 세 자리는 최대 6걸음입니다.
The nine form a single line that drains into 495, and 495 maps to itself. There is nowhere to escape to and no loop to get stuck in. Counting the first step, three digits take at most six steps.
③ 네 자리도 똑같은 방법③ Four digits, same method
자릿수를 a ≥ b ≥ c ≥ d로 두고 같은 뺄셈을 하면 이렇게 됩니다.
Sort the digits as a ≥ b ≥ c ≥ d and do the same subtraction:
이번에도 자릿수 넷이 통째로 사라지고 차이 두 개만 남습니다. 큰끝과 작은끝의 차이 p = a − d, 가운데 둘의 차이 q = b − c입니다. p는 1부터 9까지고, q는 p보다 클 수 없습니다. a − d = (a − b) + (b − c) + (c − d)인데 앞뒤 두 항이 0 이상이니까요.
Again the four digits collapse into two gaps: the outer gap p = a − d and the inner gap q = b − c. Here p runs from 1 to 9, and q can never exceed p, because a − d = (a − b) + (b − c) + (c − d) and the outer two terms are never negative.
그런 (p, q) 쌍을 세어 보면 54가지입니다. 만 개짜리 문제가 54개짜리 문제로 줄었습니다.
Counting those (p, q) pairs gives 54. A problem about ten thousand numbers just became a problem about 54.
④ 54개를 전부 적어 봅시다④ Write down all 54
아래가 그 54개 전부입니다. 가로는 q, 세로는 p이고, 각 칸의 작은 숫자는 거기서 6174까지 남은 걸음입니다.
Below are all 54. Rows are p, columns are q, and the small number in each cell is how many steps remain from there to 6174.
남은 걸음의 최댓값이 6입니다. 첫 걸음을 더하면 7이고요. 54칸 어디에도 6174로 안 가는 칸은 없고, 서로 맴도는 고리도 없습니다. 증명 끝입니다.
The largest remaining count is 6. Add the first step and it is 7. No cell among the 54 fails to reach 6174, and none of them loop. That is the proof.
콜라츠는 왜 아직도 안 풀렸을까So why is Collatz still open?
두 문제는 겉모습이 닮았습니다. 규칙 한 줄을 반복하면 한 점으로 빨려든다는 것이죠. 그런데 한쪽은 표 한 장으로 끝났고, 다른 쪽은 90년째 미해결입니다. 차이는 도망갈 곳이 있느냐입니다.
The two problems look alike: repeat a one-line rule and everything drains to a single point. Yet one ends with a table and the other has been open for ninety years. The difference is whether there is anywhere to run.
카프레카의 규칙은 네 자리 수를 네 자리 수로만 보냅니다. 값이 커질 수가 없어요. 게다가 정렬 때문에 차이 두 개로 한 번 더 접힙니다. 상자가 유한하니 결국 다 확인할 수 있습니다.
Kaprekar's rule sends a four-digit number to another four-digit number. It cannot grow. And sorting folds it once more, down to two gaps. The box is finite, so everything in it can be checked.
반면 3n + 1은 값을 얼마든지 키울 수 있습니다. 27로 시작해도 9232까지 치솟죠. 상자가 없으니 전수 조사가 원리적으로 불가능하고, 지금까지 확인한 3×1020까지는 그저 아직 반례를 못 찾았다는 뜻일 뿐입니다.
By contrast 3n + 1 can grow without any ceiling: even a start of 27 spikes to 9232. With no box, checking everything is impossible in principle, and all the numbers verified so far, up to 3×1020, only mean no counterexample has turned up yet.