Let a,b,c represent number of students who opted for two subjects - Maths and Chemistry, Maths and Physics and Physics and Chemistry respectively. Given, a+b=23−18=5 and b+c=25−18=7 Since a,b and c cannot be negative the least value for any of the three is 5 . We get a+c+18=(23+25−18)−2b Minimum value of number of students who chose chemistry =23+25−18−10=20