Problem #PRU-65902

Problems Set theory and logic Mathematical logic Mathematical logic (other) Algorithm Theory Algorithm Theory

Problem

There are 30 students in a class: excellent students, mediocre students and slackers. Excellent students answer all questions correctly, slackers are always wrong, and the mediocre students answer questions alternating one by one correctly and incorrectly. All the students were asked three questions: “Are you an excellent pupil?”, “Are you a mediocre student?”, “Are you a slacker?”. 19 students answered “Yes” to the first question, to the second 12 students answered yes, to the third 9 students answered yes. How many mediocre students study in this class?