There are two versions of the formula, the one can be deduced easily using a venn diagram that is helpful :
1. Total = A+B+C - (AnB + BnC + CnA) + AnBnC + Neither
2. Total = A+B+C - [Sum of exactly two group members] - 2*AnBnC + Neither
Example #1:
Workers are grouped by their areas of expertise, and are placed on at least one team. 20 are on the marketing team, 30 are on the Sales team, and 40 are on the Vision team. 5 workers are on both the Marketing and Sales teams, 6 workers are on both the Sales and Vision teams, 9 workers are on both the Marketing and Vision teams, and 4 workers are on all three teams. How many workers are there in total?
Translating:
"are placed on at least one team": members of none =0;
"20 are on the marketing team": M=20;
"30 are on the Sales team": S=30;
"40 are on the Vision team": V=40;
"5 workers are on both the Marketing and Sales teams": MnS=5, note here that some from these 5 can be the members of Vision team as well, MnS is sections 3 an 4 on the diagram (assuming Marketing=A, Sales=B and Vision=C);
"6 workers are on both the Sales and Vision teams": SnV=6 (the same as above sections 2 and 4);
"9 workers are on both the Marketing and Vision teams": MnV=9.
"4 workers are on all three teams": MnSnV=4, section 4.
Question: Total=?
Applying first formula as we have intersections of two groups and not the number of only (exactly) 2 group members.
Total=M+S+V-(MnS+SnV+SnV)+MnSnV+Neither=20+30+40-(5+6+9)+4+0=74.
Answer: 74.
Example #2:
Each of the 59 members in a high school class is required to sign up for a minimum of one and a maximum of three academic clubs. The three clubs to choose from are the poetry club, the history club, and the writing club. A total of 22 students sign up for the poetry club, 27 students for the history club, and 28 students for the writing club. If 6 students sign up for exactly two clubs, how many students sign up for all three clubs?
Translating:
"Each of the 59 members in a high school class is required to sign up for a minimum of one and a maximum of three academic clubs"
Total=59;
Neither=0 (as members are required to sign up for a minimum of one);
"22 students sign up for the poetry club": P=22;
"27 students for the history club": H=27;
"28 students for the writing club": W=28;
"6 students sign up for exactly two clubs": {Exactly 2 groups members}=6, so sum of sections 1, 2, and 3 is given to be 6, (among these 6 students there are no one who is the member of ALL 3 clubs)
"How many students sign up for all three clubs": question is PnHnW = x Or section 4 =?
Apply second formula:
Total = P+H+W - [Sum of exactly two group members] - 2*PnHnW + Neither
=> 59 = 22 + 27 + 28 - 6 - 2*x + 0
=> x = 6.
Thanks
Anshu
(Every mistake is a lesson learned )