Originally Posted by

**icemanfan** Since there are 3 students who are interested in all subjects, there are only 2 (5 - 3)students who are interested in math and chemistry but not physics. Similarly, there are 5 (8 - 3) students who are interested in math and physics but not chemistry, and 9 (12 - 3) students who are interested in physics and chemistry but not math. This means that there are only 2 students who are only interested in math (12 - 3 - 2 - 5), 2 students who are only interested in chemistry (16 - 3 - 2 - 9), and 4 students who are only interested in physics (21 - 3 - 5 - 9). That gives us a total of:

3 all + 2 C&M only + 5 M&P only + 9 C&P only + 2 M only + 2 C only + 4 P only = 27 students.