# Thread: Japanese Samurai and his soldiers after a battle

1. ## 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?

2. 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?
$x\equiv 3\ (mod\ 5)$

$x=5a+3$

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

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

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

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

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

$a=6b$

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

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

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

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

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

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

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

$b=7c-1$

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

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

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

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

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

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

$c=11d+5$

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

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

Clearly, $d=0$

So, $x=1023$

No. of soldiers lost in the battle $=1200-1023=177$

3. 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)

4. That is one awesome way of counting.

5. 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.