Đồng dư, chia hết và hàm số cộng tính
Đã giới thiệu| English | Ý nghĩa |
|---|---|
| congruence/ˈkɒŋɡruːəns/ | đồng dư |
| Chinese remainder theorem/tʃaɪˈniːz rɪˈmeɪndə ˈθɪərəm/ | The result that congruences with coprime moduli have one common solution modulo their product. |
| totient/ˈtəʊʃənt/ | hàm totient |
When cycles line up
- One gear repeats every 4 minutes, another every 7. "Position 2 on the first and 3 on the second" is the pair $x \equiv 2 \pmod 4$, $x \equiv 3 \pmod 7$.
- GRE number theory tests linear congruences 同余, inverses, the Chinese remainder theorem 中国剩余定理 and Euler's theorem.
Solving $ax \equiv b \pmod n$
- Let $d = \gcd(a, n)$. Solvable $\iff d \mid b$; then there are $d$ solutions modulo $n$.
- Divide $a$, $b$ and $n$ by $d$, solve, then lift back to modulus $n$.
$6x \equiv 9 \pmod{15}$: $d = 3 \mid 9$. Reduce to $2x \equiv 3 \pmod 5$; the inverse of 2 is 3, so $x \equiv 4 \pmod 5$. Lift: $x \equiv 4, 9, 14 \pmod{15}$.
How many solutions?
Use gcd(a, n) to count solutions of ax ≡ b (mod n).
How many solutions modulo 20 does $8x \equiv 12 \pmod{20}$ have?
Độ khó 2/5 · 140 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
gcd(8, 20) = 4 divides 12.
Inverses by Euclid
- The extended Euclidean algorithm writes $\gcd(a,n) = ua + vn$; when it is 1, $u$ is $a^{-1} \bmod n$.
- $1 = 15 \cdot 7 - 4 \cdot 26$, so $7^{-1} \equiv 15 \pmod{26}$. Check: $105 = 4 \cdot 26 + 1$.
Find the inverse of 5 modulo 13 (between 1 and 12).
Độ khó 2/5 · 140 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
We need 5x ≡ 1 (mod 13). 5 · 8 = 40 = 3 · 13 + 1, so the inverse is 8. (The Euclidean algorithm finds it systematically.)
Chinese remainder theorem
- Coprime $m, n$: exactly one solution modulo $mn$. Substitute $x = r + mk$ into the second congruence.
- $x = 2 + 4k$, $4k \equiv 1 \pmod 7$, $k \equiv 2$: $x \equiv 10 \pmod{28}$. Non-coprime moduli need the residues to agree mod $\gcd$, with uniqueness mod lcm.
Find the least positive $x$ with $x \equiv 1 \pmod 3$ and $x \equiv 4 \pmod 5$.
Độ khó 2/5 · 140 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
List numbers ≡ 4 (mod 5): 4, 9, 14, … The first, 4, already leaves remainder 1 when divided by 3, so x = 4. By the CRT the solution is unique mod 15.
Euler's theorem
- The totient 欧拉函数 $\varphi(n) = n\prod_{p \mid n}(1 - \tfrac1p)$. If $\gcd(a, n) = 1$: $a^{\varphi(n)} \equiv 1 \pmod n$ (Fermat when $n$ is prime).
- $3^{100} \bmod 10$: $\varphi(10) = 4$, $3^{100} = (3^4)^{25} \equiv 1$.
The coprimality condition matters: $2^4 = 16 \equiv 0 \pmod 8$, not 1.
What is $7^{222} \bmod 10$?
Độ khó 2/5 · 140 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
φ(10) = 4, 222 ≡ 2 mod 4, 7² = 49.
$\varphi(36)$ equals
Độ khó 1/5 · 100 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
$36 \cdot \tfrac12 \cdot \tfrac23$.
$a^{\varphi(n)} \equiv 1 \pmod n$ holds whenever $\gcd(a, n) = 1$.
Độ khó 1/5 · 100 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
True. That is Euler's theorem. The coprimality condition matters: $2^4 \equiv 0 \pmod 8$.
Recap
- $ax \equiv b \pmod n$: solvable iff $\gcd(a,n) \mid b$, with $\gcd$ many solutions.
- Coprime moduli: CRT gives a unique solution mod $mn$.
- Euler's theorem needs $\gcd(a, n) = 1$.
- Chinese remainder theorem: The result that congruences with coprime moduli have one common solution modulo their product.