## Task 27/61

At a party, everyone clinks glasses with everyone else; the glasses chime 120 times. When it's time to dance, someone says: "If every gentleman dances with every lady, we can form a total of 60 different pairs."

How many ladies and how many gentlemen were present? The gentlemen were in the majority.
Each of the present persons clinks glasses with $(n-1)$ other persons. This would result in $n \cdot(n-1)$ "clinks"; however, each clink is counted twice. The glasses thus ring out $\frac{n}{2}(n-1)$ times.

The quadratic equation $\frac{n}{2}(n-1)=120 \rightarrow n^{2}-n-240=0$ has the solutions $n_{1}=16$ and $n_{2}=-15$. The negative solution is invalid, so there were 16 people present.

Let there be $d$ ladies and $h$ gentlemen present. Then, since each gentleman is to dance with each lady, the system of equations $s+h=16 ; \quad d \cdot h=60$ has the solutions $h_{1}=10, d_{1}=6$ and $h_{2}=6, d_{2}=10$. Since there are more gentlemen than ladies, there are thus 10 gentlemen and 6 ladies at the party.

## Solution by B. Vetters:

(Partial solution avoiding the solution method for quadratic equations)

The number of people present can also be determined without solving a quadratic equation. The equation

$$
z(z-1)=240
$$

means that the product of two consecutive integers is 240. Therefore, form all possible products of integers that have the value 240: $2 \cdot 120,3 \cdot 80,4 \cdot 60,5 \cdot 48,6 \cdot 40$ etc., noting that the difference between the values of the two factors always gets closer to zero. Eventually, one arrives at the pair whose difference is 1, namely $15 \cdot 16=240$.

Thus, $\mathrm{z}=16$.

Two further considerations can be added to this thought:

1. It is not necessary to try all products with the value 240. From the equation, one can see that the value for $z$ can only differ slightly from $\sqrt{240}$. It must therefore be near 15.
2. The method can also be applied, somewhat modified, to the second part of the problem. Here,

$$
x(16-x)=60 \quad \text { and } \quad x>16-x
$$

The inequality leads to $2 x>16$ or $x>8$. Therefore, the following values are possible for the solution:

$$
x=10, \quad 16-x=6, \quad x=12, \quad 16-x=4, \quad x=15, \quad 16-x=1
$$

The right column immediately allows the selection of $x=10,16-x=y=6$ as the only solution.

## Solution by J. Schell:

(Auxiliary means: combinatorics): Since everyone is to clink glasses with everyone else, the number of combinations of 2 from the unknown number of people $x$ must be determined.

From $n$ elements, $k$ elements can be selected in $\binom{n}{k}$ different ways. Therefore,

$$
\binom{x}{2}=120 \quad \text { or } \quad \frac{x(x-1)}{1 \cdot 2}=120
$$

thus $s x^{2}-x=240$ From this, $x_{1}=+16, x_{2}=-15$.

The number of people present is 16, as $x_{2}=-15$ is an invalid negative solution and must be discarded.

Now, 60 dance pairs are to be formed. Let there be $x$ gentlemen (and thus $16-x$ ladies) present, and $x>16-x$.

16 people can be grouped into pairs in $\binom{16}{2}$ different ways. However, the number of pairs consisting only of gentlemen and the number of pairs consisting only of ladies must be subtracted from this number. The first is $\binom{x}{2}$, the second $\binom{16-x}{2}$. Therefore,

$$
\begin{aligned}
\binom{16}{2}-\binom{x}{2}-\binom{16-x}{2} & =60 \\
\frac{16 \cdot 15}{1 \cdot 2}-\frac{x(x-1)}{1 \cdot 2}-\frac{(16-x)(15-x)}{1 \cdot 2} & =60 \\
x^{2}-16 x+60 & =0
\end{aligned}
$$

The solution to this equation is $x_{1}=10, x_{2}=6$. Because $x>16-x$, the value $x_{2}=6$ is an invalid solution and must be discarded.

Therefore, there are 10 gentlemen and 6 ladies present.