Chinese remainder theorem
- How many soldiers are there in Han Xin's army? – If you let them parade in rows of 3 soldiers, two soldiers will be left. If you let them parade in rows of 5, 3 will be left, and in rows of 7, 2 will be left.
The theorem says that there will be a solution to this question if there's no common factor between the row sizes. Using the original example, that is that no number divides both 3 and 7, both 3 and 5, nor both 5 and 7 (except, of course, 1). They're all coprime.
Other websites[change | change source]
- Chinese remainder theorem at cut-the-knot
- "Chinese Remainder Theorem" by Ed Pegg, Jr., The Wolfram Demonstrations Project, 2007