Answer:
32
Step-by-step explanation:
1. If you take 12 balls, 9 could be yellow and 3 could be red. We want at least 12 of the same color, so 30 balls isn't a good minimum
2. If you take 30 balls, 9 could be yellow, 10 could be red and 11 could be green. We want at least 12 of the same color, so 30 balls isn't a good minimum.
3. If you take 31 balls, 9 could be yellow, 11 could be red and 11 could be green. We want at least 12 of the same color, so 31 balls isn't a good minimum.
4. If you take 32 balls, 9 could be yellow, 11 could be red and 12 could be green or 9 could be yellow, 12 could be red and 11 could be green or 7 could be yellow, 13 could be red and 12 could be green or 9 could be yellow, 11 could be red and 12 could be green.
We want at least 12 of the same color, and we have it from the different samples of the 4th trial.
So, 32 balls is the minimum number of balls