There must have been at least 30 people because there
were three tables of 10. There could not have been more
than 151 (assuming I didn't send an invitation to
myself).
Because of the mixer game, we know
x == 4 (mod 5).
Because of the dinner tables, we know
x == 3 (mod 9).
Because of the pairing at the end, we know
x == 1 (mod 2).
This gives us that n = 5 * 9 * 2 = 90. We then have:
- N_{1} = 18
- N_{2} = 10
- N_{3} = 45
And:
- a_{1} = 4
- a_{2} = 3
- a_{3} = 1
We have to solve the following linear congruences:
- N_{1} * x_{1} == 1 (mod 5)
- N_{2} * x_{2} == 1 (mod 9)
- N_{3} * x_{3} == 1 (mod 2)
Which are:
- 18 * x_{1} == 3 * x_{1} == 1 (mod 5)
- 10 * x_{2} == 1 * x_{3} == 1 (mod 9)
- 45 * x_{3} == 1 * x_{3} == 1 (mod 2)
These come out to be x_{1} = 2,
x_{2} = 1, and
x_{3} = 1.
This means that
s = 4 * 18 * 2 + 3 * 10 * 1 + 1 * 45 * 1 = 219.
But, this number is only correct modulo n and
219 == 39 (mod 90).
I couldn't have had more than 151 people. So, I must have had
39 or 129 people.
Note: I had the math screwed up on this before. My original intent was to a make a problem where the smaller answer was impossible because we knew we had three tables of ten. Oops.