The table below shows some of the results from the last Pirajuba Fishing Festival, displaying how many competitors $q$ caught $n$ fish for some values of $n$.

| $n$ | 0 | 1 | 2 | 3 | $\ldots$ | 13 | 14 | 15 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| $q$ | 9 | 5 | 7 | 23 | $\ldots$ | 5 | 2 | 1 |.

The news published in the city's newspaper reported that:

i) the winner caught 15 fish;

ii) among those who caught 3 or more fish, the average was 6 fish caught; and

iii) among those who caught 12 or fewer fish, the average number of fish caught was 5.

a) What was the total number of fish caught during the festival?

b) How many competitors caught between 4 and 12 fish?
Solution

Let $N$ and $P$ be the number of competitors and fish caught in the event, respectively. Analyzing the competitors who caught 3 or more fish, we have:

$$
N-9-5-7=N-21 \text{ fishermen and } P-0 \cdot 9-1 \cdot 5-2 \cdot 7=P-19 \text{ fish, }
$$

with the average written as:

$$
\begin{aligned}
\frac{P-19}{N-21} & =6 \\
P-19 & =6 N-126 \\
P & =6 N-126+19 \\
P & =6 N-107
\end{aligned}
$$

Observing now the competitors who caught 12 or fewer fish, we obtain:

$N-5-2-1=N-8$ fishermen and $P-13 \cdot 5-14 \cdot 2-5 \cdot 1=P-98$ fish
resulting in

$$
\begin{aligned}
\frac{P-98}{N-8} & =5 \\
P-98 & =5 N-40 \\
P & =5 N-40+98 \\
P & =5 N+58 \\
6 N-107 & =5 N+58 \\
6 N-5 N & =58+107 \\
N & =165 .
\end{aligned}
$$

a) Substituting the found value of $N$ into the equation $P=6 N-107$, we get $P=6 \cdot 165-$ $107=883$ fish in the festival.

b) For the number of competitors who caught between 4 and 12 fish, it is sufficient to find the difference between the total number of competitors and those who caught 0 fish (9 fishermen), 1 fish (5), 2 fish (7), 3 fish (23), 13 fish (5), 14 fish (2), and finally, 15 fish (1):

$$
165-9-5-7-23-5-2-1=113
$$