整数孙子定理解的存在性,意义重大

Before this, know孙子定理的独特的(容易的)部分

Interactive · 6 questions

Existence of a solution to CRT

I'll only prove this in not the most general form, but luckily the most general form is a pretty easy extension.

In particular, I will show that if mm and nn are relatively prime (i.e. gcd⁡(m,n)=1\gcd(m, n) = 1), then the congruences x≡a(modm)x \equiv a \pmod{m} x≡b(modn)x \equiv b \pmod{n} will have some integer xx that satisfies both.

Let's get a feel for CRT by doing an example. We'll solve the congruence system x≡3(mod5)x \equiv 3 \pmod{5} x≡2(mod7)x \equiv 2 \pmod{7}

Let's find a number xx that satisfies both of these! What's a good approach for doing this?

Choose one answer

Spot the idea in disguise

In a contest problem, this idea hides inside a situation you have not seen before. Learning to spot it is the real skill. These are real problems from the AMC 8, AMC 12 and AIME, the national math competitions for middle and high school students, each with a worked solution on LIVE by Po-Shen Loh.

Interactive · 5 questions

Chinese Remainder Theorem

In this article we are going to talk about the Chinese Remainder Theorem. Before I start, I assume the readers have a basic knowledge about Modular arithmetic, because we are going to work in it a lot later.

This is Chinese Remainder Theorem.

Let a1,a2,a3,...,an∈Na_1, a_2, a_3,...,a_n \in \mathbb{N} where they are pairwise relatively prime and let b1,b2,b3,...bn∈Zb_1, b_2, b_3,...b_n \in\mathbb{Z}. Then ∃N∈Z\exists N\in\mathbb{Z} which satisfies the set of simultaneous congruences N≡bi(modai)N\equiv b_i\pmod{a_i} where i=1,2,3,...,ni=1,2,3,...,n

In fact, this theorem has been existed and implemented in the early days. Let's try two famous examples and you are going to try another one. Credits to Cut The Knot.

Example 1. (Sun Tsu Suan-Ching, 4th Century AD)

There exists a number which is unknown. If divided by 3, it gives remainder of 2; by 5, the remainder is 3; by 7, the remainder is 2. Find the number. (Find the least, because there are lots of number that satisfy this condition)

Solution 1. We start by writing three congruence relations. We have

x≡2(mod3)x≡3(mod5)x≡2(mod7)\begin{align*}x&\equiv 2\pmod3\\x&\equiv 3 \pmod5\\x&\equiv 2\pmod7\end{align*}

Now, set x=3x1+2x=3x_1+2 (why?) such that x1x_1 is integer and substitute it into the second congruence relation. We have

3x1+2≡3(mod5)⟹3x1≡1(mod5)\begin{align*}3x_1+2&\equiv3\pmod5\\\Longrightarrow 3x_1&\equiv1\pmod5\end{align*}

Here comes the tricky part.

Can you divide 3 on the both sides straight away?

Choose one answer

Read · 1 min

It is known that 210≡1 mod 112^{10}\equiv 1 \bmod 11, while 26≡1 mod 72^{6}\equiv 1 \bmod 7. Use this information to find 2100 mod 772^{100} \bmod 77.

CRT guarantees that we can find 2100 mod 772^{100} \bmod 77 if we know 2100 mod 72^{100} \bmod 7 and 2100 mod 112^{100} \bmod 11.

To start with, notice 2100≡(24)(26)16≡24≡2 mod 72^{100}\equiv (2^4)(2^6)^{16} \equiv 2^4 \equiv 2 \bmod 7. Similarly, 2100≡(210)10≡1 mod 112^{100}\equiv (2^{10})^{10} \equiv 1 \bmod 11.

Now we just need to find an integer nn between 00 and 7676 that satisifies n≡1 mod 11n\equiv 1\bmod 11 and n≡2 mod 7n\equiv 2 \bmod 7. Listing out all the possibilities for n≡1 mod 11n\equiv 1\bmod 11, we get 1,12,23,34,45,56,671,12,23,34,45,56,67. It turns out that 23≡2 mod 723\equiv 2\bmod 7, so 2323 is our answer.

Interactive · 1 question

Here, I will focusing on some neat methods I know to obtain solutions for given system of congruences using the Chinese Remainder Theorem (CRT).

Via Diophantine Equations

The Chinese Remainder Theorem at heart is really nothing but a linear diophantine equation, so it should be of no surprise that we can draw out an algorithm to generate solutions.

Say we have two relatively prime positive integers m,nm,n and two fixed integers a,ba,b such that x≡a(modm)x\equiv a \pmod{m} x≡b(modn).x\equiv b\pmod{n}.

Then, we can express each of the above two equations in terms of a linear equation: x=mp+ax=mp+a x=nq+bx=nq+b implying that mp+a=nq+b⇒mp−nq=b−amp+a=nq+b \Rightarrow mp-nq=b-a

But wait!

Note that gcd⁡(m,n)=1\gcd(m,n)=1 which makes possible to compute values for (p,q)(p,q) using the classic Extended Euclidean Algorithm. In case your unfamiliar with this technique here's a link which will direct you to a really nice article published by AoPS on the topic.

Sorry bout that...

Thus, using our values of (p,q)(p,q) we plug it back into any one of our earlier equations and generate our desired values for xx.

Via Bezout's Identity

Say we have our previously stated system of congruences. Then, Bezout's Identity asserts the existence of two integers say s,ts,t such that ms+nt=1.ms+nt=1.

So we now can compute ss and tt using our Extended Euclidean Algorithm. Once, you do compute those integers, a solution xx is given by x=ams+bnt.\boxed{x=ams+bnt}. In generel if we have the system of congruences X≡ai(modm1)X\equiv a_i \pmod{m_1} where gcd⁡(m1,m2,⋯,mk)=1\gcd{(m_1,m_2,\cdots{},m_k})=1, then there exists a unique value aa such that x≡a(modM)x\equiv{a}\pmod{M}, where M=m1m2⋯mkM=m_1m_2\cdots{}m_k.

Given the system of congruences x≡1(mod14)x\equiv 1 \pmod{14} x≡2(mod3)x\equiv 2 \pmod{3} determine an integral value for x<100x<100

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems