A group of 25 people consists of knights, knaves and liars. Each person was asked "Are you a
knight?", and 17 responded yes. Each person was then asked "Are you a knave?", and 12 responded yes.
And finally each person was asked "are you a liar?", and 8 responded yes.

How many knights, knaves and liars are in the group?

It would be evident that the status corresponding to a "yes" response from a knave to all the 3 queries would be 'ftf', where f denotes that his statement is false while t denotes that he has made a true statement.

Since a knave alternatively speaks the truth and tells a lie, it follows that the only other possiblibity is a "No" response to each of the three queries resulting in a 'tft' situation.

Let the total number of knaves responding "yes" to all the queries be A, while the remaining number of knaves, whose response must have been "No" to all the 3 queries is B(say).

Any given knight would respond "Yes" to the first query and his response would be "No" to the remaining 2 queries. Let the total

number of knights be N.

Any given liar would respond falsely as "Yes" to the first two queries, but answer "No" to the third query. let the total number

of liars be R.

Accordingly, in conformity with the provisions corresponding to

the problem, we observe that:

(i) R+N+A+B = 25

(ii) R+N+A = 17

(iii) R+A = 12

(iv) A = 8

Solving the abovementioned set of equations, we obtain:

(R, N, A, B) = (4, 5, 8, 8)

Consequently:

The total number of knights is 5

The total number of liars is 4

The total number of knaves is A+B = 8+8 = 16

*Edited on ***June 5, 2007, 12:00 pm**