(중국인의 나머지 정리)
$n_{1},~n_{2},~\cdots ,~n_{r}$을 $i\neq j$에 대해 $gcd(n_{i},~n_{j})=1$인 양의 정수라 하자.
그러면 연립 선형 합동식
$$\left\{\begin{matrix}
x\equiv a_{1} & (mod~n_{1}) \\
x\equiv a_{2} & (mod~n_{2}) \\
& \vdots \\
x\equiv a_{r} & (mod~n_{r}) \\
\end{matrix}\right.$$
은 법 $n_{1}n_{2}\cdots n_{r}$에 대해 유일한 공통 해를 가진다.
<해를 구하는 순서>
1. $N=\prod_{i=1}^{r}n_{i}$에 대하여 $N_{i}=\frac{N}{n_{i}}$라 한다.
2. $N_{i}x_{i}\equiv 1~(mod~n_{i})$가 되는 $x_{i}$를 찾는다.
3. $\sum_{i=1}^{r}a_{i}N_{i}x_{i}$은 주어진 연립선형합동식의 법 $n_{1}n_{2}\cdots n_{r}$에 대하여 유일한 공통해이다.
ex) 다음 연립 선형 합동식의 해를 구하시오.
$$\left\{\begin{matrix}
x\equiv 2 & (mod~3) \\
x\equiv 3 & (mod~5) \\
x\equiv 2 & (mod~7) \\
\end{matrix}\right.$$
sol)
$$\left\{\begin{matrix}
x\equiv 2 & (mod~3) & N_{1}=35 & x_{1}=2 \\
x\equiv 3 & (mod~5) & N_{2}=21 & x_{2}=1 \\
x\equiv 2 & (mod~7) & N_{3}=15 & x_{3}=1 \\
\end{matrix}\right.$$
그러므로 법 $3\cdot 5\cdot 7=105$에 대해 유일한 공통 해 $x=2\cdot 35\cdot 2+3\cdot 21\cdot 1+2\cdot 15\cdot 1\equiv 23~(mod~105)$을 갖는다.
'[전공수학] 이론 > 정수론' 카테고리의 다른 글
합동식 $6x\equiv 22~(mod~32)$의 정수해는 법 32에 대하여 1개 뿐이다. [2010 기출] (0) | 2022.12.31 |
---|---|
정수 $x,~y,~z$에 관한 합동식 $x^{2}+y^{2}\equiv 3x^{2}~(mod~4)$의 해집합은 $$\left\{ \left ( x,~y,~z \right )~|~x\equiv y\equiv z\equiv 0~(mod~2)\right\}$$ 임을 보이시오. [2007 기출] (0) | 2022.12.31 |
최대 정수 함수 (0) | 2022.12.27 |
약수의 개수, 약수들의 합 (0) | 2022.12.27 |
소수 판단하기 (0) | 2022.12.27 |