Each of the $10$ dwarfs either always tells the truth or always lies. It is known that each of them loves exactly one type of ice cream: vanilla, chocolate or fruit. First, Snow White asked those who like the vanilla ice cream to raise their hands, and everyone raised their hands, then those who like chocolate ice cream - and half of the dwarves raised their hands, then those who like the fruit ice cream - and only one dwarf raised his hand. How many of the gnomes are truthful?
Problem
Source:
Tags: algebra
NamelyOrange
03.09.2023 17:44
Let's set up variables like this: setup- There are $v_T$ dwarfs that like vanilla ice cream and tell the truth
- There are $v_F$ dwarfs that like vanilla ice cream and lie
- There are $c_T$ dwarfs that like chocolate ice cream and tell the truth
- There are $c_F$ dwarfs that like chocolate ice cream and lie
- There are $f_T$ dwarfs that like fruit ice cream and tell the truth
- There are $f_F$ dwarfs that like fruit ice cream and lie
A dwarf who likes a certain type of ice cream (eg chocolate) but lies will only raise their hand when the other flavors (eg vanilla and fruit) are called.
We now have the system of equations:
$\begin{cases} v_T+v_F+c_T+c_F+f_T+f_F = 10\\
v_T+c_F+f_F=10\\
v_F+c_T+f_F=5\\
v_F+c_F+f_T=1\\
\end{cases}$
Subtracting the second equation from the first, we have that $v_F+c_T+f_T=0$. But all of the variables can only be nonnegative (negative dwarfs, anyone?), so we must have $v_F=c_T=f_T=0$!
Plugging that back in, the equations become:
$\begin{cases} v_T+c_F+f_F=10\\
0+0+f_F=5\\
0+c_F+0=1
\end{cases} \implies v_T = 10-5-1=4$
We want all the dwarfs that tell the truth, or $v_T+c_T+f_T = 4+0+0=4$, so the answer is $\boxed{4}$ dwarfs.
Very fun problem!