Problem Statement
In a row of five seats (left→right), persons A, B, C, D, E are seated. A says: “I am not at an end.” B says: “C is to my immediate right.” D says: “B is at one end.” Exactly one statement is true. Who sits in the middle?
Explanation
Exactly one true. Test D’s claim first: if ‘B is at one end’ is true, then A’s ‘not at an end’ and B’s ‘C is to my immediate right’ must be false. Put B at an end. If B at left end, his claim about C to immediate right would actually be true (C at pos2), contradicting ‘exactly one true’. So B cannot be at left end. If B at right end, then ‘C to my immediate right’ is false as there’s no seat to the right—good. A’s ‘not at an end’ must be false ⇒ A is at an end (the left end). Remaining positions fill with C, D, E; to avoid accidentally making B’s statement true, place C not immediately right of B (impossible anyway). With consistent fills, C lands at the center to satisfy all constraints with exactly one truth (D’s). Hence middle is **C**.
Code Solution
SolutionRead Only
Left→Right: A _ C _ B (one valid fill) ⇒ middle=C
Practice Sets
This question appears in the following practice sets:
