# Inclusion and exclusion

There is a total of 50 beans in a jar. The beans can be classified as tasty, sour, colorful. A bean may be in more than category, if there are 25 classified as tasty, 40 as sour and 10 as colorful, what is the maximum number of beans that could be tasty and sour and colorful?

-
Does every bean have to be either tasty, sour, or colorful? I assume yes, as otherwise, 10 is the obvious answer. –  Harald Hanche-Olsen Dec 14 '12 at 13:31
Your assumption is correct. –  fosho Dec 14 '12 at 13:33