Students are in classroom with $n$ rows. In each row there are $m$ tables. It's given that $m,n \geq 3$. At each table there is exactly one student. We call neighbours of the student students sitting one place right, left to him, in front of him and behind him. Each student shook hands with his neighbours. In the end there were $252$ handshakes. How many students were in the classroom?
Problem
Source: Bosnia and Herzegovina JBMO TST 2018
Tags: combinatorics, counting
15.07.2018 01:44
The total number of handshakes is $2mn-m-n$, so by SFFT, $\{ m,n \} = \{3,51 \}$. So the total number of students is $mn = 153$.
12.02.2019 20:06
Nice problem
15.02.2020 08:36
why the total number such that .Can you explain please
24.02.2020 18:59
I'll explain: There were $n(m-1)$ handshakes between students in the same row ($n$ rows and $m-1$ handshakes per row). Similarly, there were $m(n-1)$ handshakes between students in the same column. Thus, the total number is $2mn-m-n=252$. Doubling and adding $1$ to both sides, we see $4mn-2m-2n+1=505$ or $(2m-1)(2n-1)=505$. As $m,n\ge 3$, we have that one of $2m-1, 2n-1$ is $5$ and the other is $101$, giving that $mn=3\times 51=\boxed{153}$, as desired. Does that help?