# Japanese Samurai and his soldiers after a battle

• Apr 29th 2011, 10:17 PM
dkmathguy
Japanese Samurai and his soldiers after a battle
A Japanese Samurai counted his soldiers remaining after a battle, by lining them in rows of different lengths, counting the number left over each time, and calculating the total from these remainders. A Samurai had 1200 soldiers at the start of a battle. After the battle, there were 3 left over when they lined up 5 at a time, 3 left over when they lined up 6 at a time, 1 left over when they lined up 7 at a time, and none left over when they lined up 11 at a time. How many soldiers were lost in the battle?
• Apr 30th 2011, 12:21 AM
alexmahone
Quote:

Originally Posted by dkmathguy
A Japanese Samurai counted his soldiers remaining after a battle, by lining them in rows of different lengths, counting the number left over each time, and calculating the total from these remainders. A Samurai had 1200 soldiers at the start of a battle. After the battle, there were 3 left over when they lined up 5 at a time, 3 left over when they lined up 6 at a time, 1 left over when they lined up 7 at a time, and none left over when they lined up 11 at a time. How many soldiers were lost in the battle?

$\displaystyle x\equiv 3\ (mod\ 5)$

$\displaystyle x=5a+3$

-------------------------------------------------------------

$\displaystyle x\equiv 3\ (mod\ 6)$

$\displaystyle 5a+3\equiv 3\ (mod\ 6)$

$\displaystyle 5a\equiv 0\ (mod\ 6)$

$\displaystyle a\equiv 0\ (mod\ 6)$

$\displaystyle a=6b$

$\displaystyle x=5a+3=5(6b)+3=30b+3$

-------------------------------------------------------------

$\displaystyle x\equiv 1\ (mod\ 7)$

$\displaystyle 30b+3\equiv 1\ (mod\ 7)$

$\displaystyle 30b\equiv -2\ (mod\ 7)$

$\displaystyle 15b\equiv -1\ (mod\ 7)$

$\displaystyle b\equiv -1\ (mod\ 7)$

$\displaystyle b=7c-1$

$\displaystyle x=30b+3=30(7c-1)+3=210c-27$

-------------------------------------------------------------

$\displaystyle x\equiv 0\ (mod\ 11)$

$\displaystyle 210c-27\equiv 0\ (mod\ 11)$

$\displaystyle 210c\equiv 27\ (mod\ 11)$

$\displaystyle c\equiv 5\ (mod\ 11)$

$\displaystyle c=11d+5$

$\displaystyle x=210c-27=210(11d+5)-27=2310d+1023$

-------------------------------------------------------------

Clearly, $\displaystyle d=0$

So, $\displaystyle x=1023$

No. of soldiers lost in the battle $\displaystyle =1200-1023=177$
• Apr 30th 2011, 12:39 AM
dkmathguy
alexmahone, you are correct. Thanks, I never saw you could do negative too, lol. I did the hard way by making the -1 to a 6.

15b = -1 (mod 7)

b = -1 (mod 7)

15b = 6 (mod 7)

b = 6 (mod 7)
• Apr 30th 2011, 06:32 AM
Quacky
That is one awesome way of counting.
• May 1st 2011, 10:05 PM
Wilmer
Can be done by simple reasoning:

a = alive: we want a / 11 = integer; so maximum a = 1199 ; then 1188, 1177, .....

we want a / 6 to have remainder of 3, so a is odd ; so a = 1199, 1177, 1155, 1133, ....

we want a / 5 to have remainder of 3, so a must end with 3 (being odd), so a = 1133, 1023, 913, ...

we want a / 7 to have remainder of 1:
1133 / 7 = 161 remainder 6
1023 / 7 = 146 remainder 1 : YA!

So deads = 1200 - 1023 = 177

Much quicker (and easier) is find minimum that accomodates 5,6,11,
which of course is 33; this number must go up by 330 (to keep accomodating 5,6,11),
so: 33, 363, 693, 1023; only 1023 has remainder of 1 if divided by 7.