Copyright © University of Cambridge. All rights reserved.
'Would You Like a Jelly Baby?' printed from http://nrich.maths.org/
If Tom takes 12 jelly babies then he will have taken at least one of each flavour unless he takes all 8 watermelon jelly babies and either all 4 vanilla jelly babies or all 4 butter popcorn jelly babies. In this case the 4 remaining jelly babies will all be of the flavour he has yet to take, so taking one more jelly babies ensures that he will have taken at least one of each flavour.
Therefore Tom should take 13 jelly babies.
This problem is taken from the UKMT Mathematical Challenges.