At a company meeting everyone showed up on time except for Mr. James. Now the presence of Mr. James was opposed by a faction of people at the meeting, and they didn't appreciate those who were tolerant of Mr. James. So before Mr. James arrived, this faction shook hands with each other just amongst themselves and then left the meeting before Mr. James arrived. Then once Mr. James did arrive, he and those people who remained each shook hands with one another. If the total number of handshakes at the meeting was 100, then how many people were in the faction that left prior to Mr. James arrival?
Details and Assumptions:
Bonus: How many people were initially present for the meeting in the beginning (i.e. total people from both factions excluding Mr. James)?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Suppose there are n people in the faction opposed to Mr. James and m people in the faction who are tolerant of him. Then the number of handshakes in the first group in ( 2 n ) = 2 n ( n − 1 ) , and in the second group, since there will be m + 1 people after Mr. James arrives, there will be ( 2 m + 1 ) = 2 ( m + 1 ) m handshakes. So as there are 1 0 0 handshakes in total, we need to find positive integers m , n such that
2 n ( n − 1 ) + 2 m ( m + 1 ) = 1 0 0 ⟹ n 2 − n + m 2 + m = 2 0 0 ⟹
( n − 2 1 ) 2 + ( m + 2 1 ) 2 = 2 0 0 + 2 1 = 2 4 0 1 ⟹ ( 2 n − 1 ) 2 + ( 2 m + 1 ) 2 = 8 0 2 .
So we need to find two odd perfect squares which add to 8 0 2 . Now as the largest odd perfect square less than 8 0 2 is 2 7 2 = 7 2 9 we know that one of the squares will exceed 2 8 0 0 = 4 0 0 = 2 0 2 , so the larger of the potential perfect squares in our sum would have to be one of 2 1 2 = 4 4 1 , 2 3 2 = 5 2 9 , 2 5 2 = 6 2 5 or 2 7 2 = 7 2 9 . But the only one of these that yields another perfect square when subtracted from 8 0 2 is 8 0 2 − 4 4 1 = 3 6 1 = 1 9 2 , (the other differences being 2 7 3 , 1 7 7 and 7 3 ).
So the only pair of odd perfect squares which add to 8 0 2 are 1 9 2 and 2 1 2 . (A short cut would have been to note that ( 2 0 − 1 ) 2 + ( 2 0 + 1 ) 2 = 2 ∗ 4 0 0 + 2 ∗ 1 = 8 0 2 , but then we would still have to check for any other pairs.) Since we can assign these squares to either of ( 2 n − 1 ) 2 or ( 2 m + 1 ) 2 , we see that either 2 n − 1 = 1 9 , 2 m + 1 = 2 1 ⟹ n = 1 0 , m = 1 0 or 2 n − 1 = 2 1 , 2 m + 1 = 1 9 ⟹ n = 1 1 , m = 9 , and so the correct answer is either 10 or 11 .
Bonus question: In both cases there were 1 0 + 1 0 = 1 1 + 9 = 2 0 people initially present.