There are 3 types of inhabitants of a village: knight, knaves, normal. You should map each inhabitant with its type, by asking only this type of question to a person: "Hey X, what is the type of person Y". Knights will answer the correct type of Y, knaves will answer anything but the actual type of Y, and normal people will be able to answer simply any type.
Constraints: - Everyone know the exact type of any person in the village.
You can only ask the question defined above.
X can not be the same as Y. Means, you cant ask a person the type of himself.
If you already asked a person and it already have its answer, it wont change its answer if you asked the same question again and again
More than the half of the village inhabitants are knights
No limit on the number of questions asked
I was meant to solve this problem with an algorithm, and efficiency is not the main concern.
I can understand the original knight, knaves, and spies puzzle, or the famous THLPE puzzle, but given the limitation of the question allowed (as stated above), and extra information of amount of knights (as stated above), how can I solve this puzzle? Thanks!