일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
- Absolute
- AGI
- ai
- AI agents
- AI engineer
- AI researcher
- ajax
- algorithm
- Algorithms
- aliases
- Array 객체
- ASI
- bayes' theorem
- Bit
- Blur
- BOM
- bootstrap
- canva
- challenges
- ChatGPT
- Today
- In Total
A Joyful AI Research Journey🌳😊
Mathematical Puzzle: Applying the Chinese Remainder Theorem to a Book Grouping Problem 본문
Mathematical Puzzle: Applying the Chinese Remainder Theorem to a Book Grouping Problem
yjyuwisely 2024. 1. 7. 07:05Question
There are some books on the table. If you group them by 3, you get some number of full groups and 2 books remain; if you group them by 4, you get some number of full groups and 3 books remain; if you group them by 5, you get some number of full groups and 4 books remain. What is the number of books on the table, if it is less than 100?
Solution
Using the Chinese Remainder Theorem:
- N (Product of moduli): 60 (= 3*4*5)
- Ni values (N divided by each modulus):
- N1 = 20 (for modulus 3)
- N2 = 15 (for modulus 4)
- N3 = 12 (for modulus 5)
- Multiplicative Inverses:
- Inverse of N1 modulo 3 is 2
- Inverse of N2 modulo 4 is 3
- Inverse of N3 modulo 5 is 3
- Remainders: [2, 3, 4]
- Individual Terms (Remainder × Ni × Inverse):
- 2×20×2 =
- 3×15×3 =
- 4×12×3 =
- Sum of Terms: 359
- Final Solution (Sum of Terms mod N): 59
The final solution is the sum of the individual terms, 359, taken modulo N, which is 60, resulting in 59.
Inverse of N3=12 modulo 5 is 3
What It Means: Here, we are looking for a number that, when multiplied with 12, yields a result that is equivalent to 1 when divided by 5. We need an integer x such that:
12×x ≡ 1 mod 5
Finding the Inverse:
- Again, we check integers starting from 1.
- We find that 12×3=36.
- When you divide 36 by 5, the remainder is 1 (since 36=5×7+1).
- Thus, 3 is the multiplicative inverse of 12 modulo 5.
'🌳Coursework Maths 2025🪄✨ > Discrete Maths' 카테고리의 다른 글
Key points about mathematical induction (0) | 2024.01.17 |
---|---|
Creating a Python Function to Generate Combinations of 5 and 7 Summing to a Specific Amount (0) | 2024.01.16 |
The number of solutions to the 8 queens puzzle (0) | 2024.01.12 |
Integer Linear Combinations: Solving the 7 and 13 Florin Puzzle (1) | 2024.01.07 |