You have $5$ white, $5$ black, and $5$ red balls. There is exactly $1$ radioactive ball among each group. There is a device, which says if there is at least one radioactive ball among some group of balls (quantity and color doesn't matter). You have to give an algorithm that sorts out the $3$ radioactive balls with only $7$ measurements.
So I thought there are $5*5*5=125$ possibilities, and if I imagine the algorithm as a Boolean tree, I have to balance it as equal as possible. So I took for first measurement $a_1, b_1, c_1$. If the device gives negative, that means, on one side of the tree there are $4*4*4$ possibilities left, so on the other side $61$. If we take the path of positive result ($61$ possibilities), for next measurement I take $a_2, a_3, b_2, b_3$, which divides the outcomes to $31$ (in case of positive result of second measurement) and $30$ (when the result is false). From here it's getting very messy and can't actually think how to continue. So any help will be appreciated.