Computer Science, asked by LensEducation5599, 5 months ago

While walking through a fictional forest, you encounter three trolls guarding a bridge. Each is either a knight, who always tells the truth, or a knave, who always lies. The trolls will not let you passuntil youcorrectlyidentify eachaseitheraknightoraknave. Each troll makes a single statement: a knight. Troll 1: If I am a knave, then there are exactly two knights here. Troll 2: Troll 1 is lying. Troll 3: Either we are all knaves or at least one of us is Which troll is which?

Answers

Answered by linj90301
0

Answer:

Troll 1 - Knight

Troll 2 - Knave

Troll 3 - Knave

Explanation:

T1 is a knight becauce T2 said T1 is lying about being a knave and the other two troll would be knights because T2 is a knave. T3 is a knave and said everyone is a knave or only one of the 3 is a knave, T3 is a knave and it witnesses T1 saying itself is a knave, and T2 called T1 a liar. So T3 think either everyone is a knave or its just itself(T3)

I am not sure if I guessed right if you know the answer please tell me

Similar questions