Consider that,
A – always says Truth
B – always lies
C – sometimes lies
D – deaf and dumb
What is maximum questions you need to ask each to determine who is ABCD?
Just ask who is Deaf & Dumb, D will not reply so will be identified.
let’s say (without loosing the generality) that it was 4th person who did not answer so 4 should be D.
now A will always say truth so he will point to 4, B will not point to 4 for sure and C can point to 1,2,3,4
lets say if 1 is A and 2 is B, thus possibilities of answer
1 -> 4
2 -> 1,2,3
3 -> 1,2,3,4
if only one person points to 4, we know he is A.
=> in this case we just have to identify who is B or who is C, just ask A again and confirm (thus 2 questions)
if two persons says 4, we know the other one is B.
=> in this case ask B who is A among the (A & C), B always lies so he will point at C, thus we know who is actually A & C (thus 2 questions again).
So we can figure it out in max 2 questions.