2.5.10 · D4Number Theory (Intermediate)

Exercises — Chinese Remainder Theorem (intro)

2,049 words9 min readBack to topic

Before we begin, one reminder of the notation, so nothing is used unearned.


Level 1 — Recognition

L1.1

Which of these systems is CRT allowed to solve directly (i.e. the moduli are pairwise coprime)?

(a) (b) (c)

Recall Solution

We only need of each pair of moduli.

  • (a) coprime, CRT applies.
  • (b) → not coprime, basic CRT does not apply.
  • (c) coprime, CRT applies.

Answer: (a) and (c).

L1.2

For the system , what single modulus describes the "uniqueness range" of the solution, and how many solutions live in ?

Recall Solution

The moduli are pairwise coprime ( of any pair is ). CRT says the solution is unique modulo their product: Exactly one solution lies in ; all others differ from it by multiples of .


Level 2 — Application

L2.1

Solve .

Recall Solution

Use the substitution method (WHAT: turn the first congruence into a formula for ; WHY: then we only have one unknown left).

First congruence: for some integer . Put into the second: . Now we need . We want : try since . So . Multiply both sides: . Back-substitute: . Check: ✓, ✓.

L2.2

Solve with the construction formula .

Recall Solution

. Inverses ():

  • ; need ().
  • ; need ().
  • ; need ().

Assemble: Check: ✓, ✓, ✓.


Level 3 — Analysis

L3.1

The system has non-coprime moduli (). Does a solution exist? If yes, find all of them and their true period.

Recall Solution

WHAT we check first (WHY: for non-coprime moduli the generalized rule is solvable iff the two required-values agree modulo the shared gcd): So solutions exist. Solve by substitution. . Then . Divide the whole congruence by … carefully: (divided by , and modulus ). Then , so , i.e. . The true period is , not . Check: ✓, ✓.

L3.2

Explain, using , why the CRT construction formula automatically makes every cross-term vanish. Then verify concretely that in L2.2 the term is and but .

Recall Solution

WHY the design works: is a product that includes every modulus except . So (for ) is one of its factors, giving . Multiplying by and keeps that zero. Meanwhile, by construction , so the single surviving term equals in the world.

Concrete check with :

  • ✓ (vanishes)
  • ✓ (vanishes)
  • ✓ (survives, contributes exactly )

So the term is a "switch": ON for its own modulus, OFF for all others.

Figure — Chinese Remainder Theorem (intro)

Level 4 — Synthesis

L4.1

A basket of eggs: counted by 3s, 2 remain; by 5s, 3 remain; by 7s, 2 remain. What is the smallest number of eggs greater than ?

Recall Solution

Translate the words into congruences (WHAT: "by 3s, 2 remain" = "remainder mod "): Moduli are pairwise coprime, . Inverses:

  • ; .
  • ; .
  • ; .

Smallest positive count = 23 eggs. Check: ✓, ✓, ✓.

L4.2

Find the smallest positive with .

Recall Solution

. Inverses:

  • : , so ().
  • : , so ().
  • : , so . Since , .

Compute each: ; ; . Sum . : , remainder . Check: ✓; ✓; ✓.


Level 5 — Mastery

L5.1

Combine two known congruences on the same to reduce a hard modulus. You are told Solve, then use the result to state and confirm is genuinely the period.

Recall Solution

Coprimality: , , share no prime → pairwise coprime, so period . , Inverses:

  • : , so .
  • : , need ().
  • : , so .

: , . Check: ✓; ✓; ✓. Period confirmed: the next solution is , and no smaller step repeats all three remainders since .

L5.2

Prove uniqueness. Suppose and both solve the same coprime system for . Show where .

Recall Solution

WHAT we do: subtract the two solutions and study the difference . Because and , subtracting gives So each divides . WHY coprimality now matters: if several numbers each divide and are pairwise coprime, then their product divides (a divisor built from disjoint prime factors). Hence which is exactly . Any two solutions coincide modulo , so the solution in is unique.

(Note: without coprimality, "each " only gives , not — which is precisely why the period shrinks in L3.1.)


Recall Quick self-check ladder

One-line answers to lock it in. Which levels needed a modular inverse? ::: L2, L4, L5 — every construction-formula problem. What replaces as the period when moduli aren't coprime? ::: . The consistency condition for non-coprime solvability? ::: for all pairs.