1
$\begingroup$

This question already has an answer here:

This question has been tagged as duplicate of Two doors with two guards.

What makes this questions different:

Let me state the obvious about this question:

  • you meet one islander.
  • you ask one question.
  • you resolve one unknown (just to gain more knowledge).

Let me state the obvious about the other question:

  • you meet two guards.
  • you meet two doors.
  • you need to survive the question.

For someone which does not know the answer, there are (at least) four basic options for the guards question:

  1. Ask guard 1.
  2. Ask guard 2.
  3. Ask about door 1.
  4. Ask about door 2.

    Then, there is still the issue of which question to ask.

    It should be pretty clear by now which question has a more complex structure.

Why are this differences important:

This type of puzzle may be quite difficult for someone who has never solved one before. It is therefore very important that the individual solving the puzzle is confronted to the least amount of variables. That makes the puzzle simpler to process. And the answer much more revealing.

Other versions of the same theme:

There are several versions of similar questions around the web:
Knights and Knaves
Paths and Angels
SciForums
Angels and Doors

Such questions make people expect some already known structure of twoA-twoB. That leads people to think in such pre-set format. A clear example of such inducted response is the user of this site which constructed the new "two stuffed animals" and "two tea cups" question in the comments.

He did not use the "one XXXX" and "one YYYY" format this question present.

What make this questions equal:

The core rule to use to answer this sort of problems is exactly the same.
Devoid of any embellishment, the core idea is based in:

The product of two numbers with different signs is negative.
Stated again: "different signs" is "negative".
Crossing the answers of "a true teller" and "a lie teller" allways results in "a lie".
Therefore, use this construct: "what would the other ____ say/answer"
or this (equivalent) one: "Would the other ____ tell me that"

Then, make a clear question, which is preferable if it leads to a yes/no answer.

For this question:

"Would the other tribe tell me that the statue is white?"

For the other question:

"What would the other guard say if asked: Is this the door to freedom?"
Understand any answer as the opposite of what was received: that is the truth.

In that, both questions are resolved by the same construct.

But not all problems that are resolved by the same set of rules are duplicate.
Not all sudoku games are duplicate of each other, nor all games of chess are duplicate of each other. Even if the basic rules are exactly the same.

The question (as it was originally):

Lets assume that you land (with a parachute) in an island. Only this facts are known about the island:

  • The island has an statue in the middle.
  • The statue is either black or white (binary state).
  • There are two tribes of islanders.
  • One tribe always tell the truth.
  • The other tribe always tell lies (the contrary of true, binary also).
  • Both tribes do know what is the true color of the statue.

Limited by this rules:

  • You do not know anything else about the island than what was stated above.
  • You do not know (by any means) to which tribe belong an islander.
  • You are forbidden (can not go) to see the statue.

You find an islander, and, asking only ONE question, you can reliably tell of what color is the statue.

What is the question you need to ask?

NOTE: The question does not contain multiple separate questions or have multiple separate answers, only ONE question, ONE answer.

Edit: There is a similar question here.

$\endgroup$

marked as duplicate by Tryth, Alconja, ghosts_in_the_code, Spencerkatty, mdc32 May 16 '15 at 3:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ If I parachuted onto the island, would I not have seen the statue while on the way down? $\endgroup$ – Trevor Powell May 16 '15 at 1:51
  • $\begingroup$ @TrevorPowell No, couldn't see the statue, as it is inside a temple. :) $\endgroup$ – user12496 May 16 '15 at 1:56
  • $\begingroup$ @Tryth I have never known of such problem before. I was given the one I present here some (many) years ago. I do not know if they are related in any way or not. $\endgroup$ – user12496 May 16 '15 at 1:59
  • 4
    $\begingroup$ You are at a tea party with your two stuffed animals: Mr. Bun, and the villainous Duke Froggington II. Before you are two cups. One cup contains yummy tea, and the other contains foul coffee. And unfortunately, your nose doesn't work right now for some reason, so there's No Way for you to tell them apart. Also, you can't remember which you put in which cup. But luckily, One of these stuffed animals always tells the truth, and one always lies. But you can't quite remember which is which. And for Some Reason you may only ask one yes/no question. How do you find the cup that contains tea? $\endgroup$ – Trevor Powell May 16 '15 at 2:05
2
$\begingroup$

The question you ask is:

What would the other tribe tell me the statue's color is?

Because:

No matter who you ask, they will tell you the opposite color than what the statue is.

Assume the statue is white. Asking the lying tribe, they would lie and say that the truth-tellers would say it is black. Asking the truth tellers, they would tell the truth and say that the liars would say the statue is black. You therefore know the statue is white. The same applies for if statue is black, then either tribe would answer white to the question.

$\endgroup$
  • $\begingroup$ Yep, this is the correct answer stated in words (I means: opposed to a program, as some other answer presented.). $\endgroup$ – user12496 May 16 '15 at 1:51
2
$\begingroup$

Ask this question:

Considering the following function in pseudocode,

function answer(islander, object) {
    if(islander.tellsTruth) {
        if(object.color == "black") {
            return 1;
        } else {
            return 0;
        }
    } else {
        if(object.color == "black") {
            return 0;
        } else {
            return 1;
        }
    }
}

what would the return value be for answer(you, statue)?


If the statue is black:

If the islander tells the truth, the answer would be 1; if the islander lies, then the answer should be 0, and since he lies he would reply 1.

If the statue is white:

If the islander tells the truth, the answer would be 0; if the islander lies, then the answer should be 1, and since he lies he would reply 0.

$\endgroup$
  • $\begingroup$ Nice answer. Well done ! $\endgroup$ – user12496 May 16 '15 at 1:50
  • 2
    $\begingroup$ In non-code form: "If I asked you whether the statue was black, would you say that it was black?" $\endgroup$ – Trevor Powell May 16 '15 at 1:50
  • $\begingroup$ @TrevorPowell This shows that I'm more fluent in code than in English. :P $\endgroup$ – ace_HongKongIndependence May 16 '15 at 1:52