2082 1

BIT152 · 2082 · 10 marks

State division theory.Add two integers 13578 and 45730 using Chinese Remainder Theorem.[2+8]

State division theory.Add two integers 13578 and 45730 using Chinese Remainder Theorem.[2+8]

Discrete StructureChapter 6: Number Theory and Modular ArithmeticChinese Remainder TheoremNumerical: Chinese Remainder Theorem addition

Division Theory and Chinese Remainder Theorem


Part 1: Division Theory (2 marks)

Division Algorithm (Division Theory):

For any integer $a$ and any positive integer $n$, there exist unique integers $q$ (quotient) and $r$ (remainder) such that:

$$a = q \cdot n + r, \qquad 0 \leq r < n$$

where $q = \lfloor a/n \rfloor$ and $r = a \bmod n$.


Part 2: Adding 13578 + 45730 using CRT (8 marks)

The idea of CRT-based arithmetic: pick pairwise coprime moduli whose product exceeds the answer, reduce each operand mod each modulus, add residue-wise, then reconstruct.

Step 1: Choose pairwise coprime moduli

Expected result: $$13578 + 45730 = 59308$$

Choose: $$m_1 = 99,\quad m_2 = 98,\quad m_3 = 97,\quad m_4 = 95$$

These are pairwise coprime, and $$M = 99 \times 98 \times 97 \times 95 = 89{,}403{,}930 \gg 59308 \checkmark$$

Step 2: Residue representation

For $a = 13578$:

  • $99 \times 137 = 13563 \Rightarrow 13578 - 13563 = 15$
  • $98 \times 138 = 13524 \Rightarrow 13578 - 13524 = 54$
  • $97 \times 139 = 13483 \Rightarrow 13578 - 13483 = 95$
  • $95 \times 142 = 13490 \Rightarrow 13578 - 13490 = 88$

$$a \to (15,\ 54,\ 95,\ 88)$$

For $b = 45730$:

  • $99 \times 461 = 45639 \Rightarrow 45730 - 45639 = 91$
  • $98 \times 466 = 45668 \Rightarrow 45730 - 45668 = 62$
  • $97 \times 471 = 45687 \Rightarrow 45730 - 45687 = 43$
  • $95 \times 481 = 45695 \Rightarrow 45730 - 45695 = 35$

$$b \to (91,\ 62,\ 43,\ 35)$$

(Note: $45730 \bmod 99 = 91$.)

Step 3: Add residues modulo each $m_i$

$$r_i = (a_i + b_i) \bmod m_i$$

Modulus$a_i + b_i$$r_i$
$99$$15 + 91 = 106$$106 - 99 = \mathbf{7}$
$98$$54 + 62 = 116$$116 - 98 = \mathbf{18}$
$97$$95 + 43 = 138$$138 - 97 = \mathbf{41}$
$95$$88 + 35 = 123$$123 - 95 = \mathbf{28}$

So the sum $X$ satisfies: $$X \equiv 7 \pmod{99},\quad X \equiv 18 \pmod{98},\quad X \equiv 41 \pmod{97},\quad X \equiv 28 \pmod{95}$$

Step 4: Verify against 59308

  • $99 \times 599 = 59301 \Rightarrow 59308 - 59301 = 7$ ✓
  • $98 \times 605 = 59290 \Rightarrow 59308 - 59290 = 18$ ✓
  • $97 \times 611 = 59267 \Rightarrow 59308 - 59267 = 41$ ✓
  • $95 \times 624 = 59280 \Rightarrow 59308 - 59280 = 28$ ✓

All four residues match, confirming the reconstructed value.

Final Answer

$$\boxed{13578 + 45730 = 59308}$$

represented in CRT residue form as $(7,\ 18,\ 41,\ 28)$ with respect to moduli $(99, 98, 97, 95)$.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.