Jump to content
BrainDen.com - Brain Teasers
  • 0


wolfgang
 Share

Question

If you were standing in a Hepagonal room (has seven sides),in each side was a closed door,4 doors were white,and three black. Infront of each door stood a quard,4 of them tell always the truth,and the other three lie always.

There was no two adjacent black doors.

Two Liars were standing infront of two white doors.

You were allowed to ask three (Yes,or No)questios to three ,two,or only one of them(as you like).

The treasure is behind one of these seven doors.

what are you going to ask to find the treasure?

You are not allowed to ask more than one quard at a time.

I am so sorry if my English is not good enough.

Have a nice time :rolleyes:

Edited by wolfgang
Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

Very nice one :thumbsup:.

However I think that not all the information in the OP is necessary if the guards know where the treasure is.

7 doors, 3 black and 4 white with no two black door adjacent means that exactly 2 white doors are adjacent (Dirichlet's principle).

Then the doors are arranged as follows:


  B

 W W

B   B

 W W

Number these doors in a circular way (not really necessary, but makes reasoning easier).

        B(1)

    W(2)    W(7)

B(3)            B(6)

    W(4)    W(5)

Now I will ask 3 questions to the guard standing in front of door 1. I do not actually need any of the stated assumptions about how many liars there are. I just need to assume that he could be either a truthteller (always telling the truth) or a liar (always lying). There is a well-known technique (in fact several) to obtain the correct answer from a person in both cases. Example: "If I would ask you if P is true, what would you say?". The truth teller would say Yes if P is true and No if P is false, since he would always tell the truth. The liar would normally say the opposite to a direct question (No if P is true and Yes if P is false), however I am forcing him to tell me indirectly. Therefore I am forcing him to lie about his normal behavior. Lie about a lie means Double Negation which means he would answer Yes if P is true and No if P is false. In both cases we get Yes if and only if P is true :) So I will ask 3 questions Q1, Q2, Q3 to the guard about 3 statements P1, P2, P3 as in the example above. The answers will be identical to the truth of statements P1, P2, P3. P1: "Is the treasure behind a black door?" P2: "Is the treasure in the door behind you or one of the adjacent doors?" P3: "Is the treasure in the door behind the nearest black door to your left (B6 in the picture) or behind one of its adjacent doors?". For the record, the 3 questions are a little longer but will determine the truth values of P1, P2, P3 respectively. Q1: "If I would ask you if the treasure is behind a black door, what would you say?" Q2: "If I would ask you if the treasure is behind the door behind you or behind one of the two adjacent doors, what would you say?" Q3: "If I would ask you if the treasure is behind the door behind the nearest black door to your left (B6 in the picture) or behind one of its adjacent doors, what would you say?". Now for P1, P2, P3 we have 2^3 = 8 cases covered in the table below. Note that
P2 is true <=> The treasure is behind 1, 2 or 7
and
P3 is true <=> The treasure is behind 7, 6 or 5
Note T = true, F = False

      P1  P2  P3

Case  T   T   T - impossible {1,2,7} and {7,6,5} only have in common a white door so the answer to P1 cannot be T.

Case  T   T   F - since the door with the treasure is black and belongs to {1,2,7} but not to {7,6,5}, it is door 1.

Case  T   F   T - since the door with the treasure is black and does not belong to {1,2,7} but belongs to {7,6,5}, it is door 6.

Case  T   F   F - since the door with the treasure is black and does not belong either to {1,2,7} or {7,6,5}, it is door 3.

Case  F   T   T - since the door with the treasure is white and belongs both to {1,2,7} and {7,6,5}, it is door 7.

Case  F   T   F - since the door with the treasure is white and belongs to {1,2,7} but not to {7,6,5}, it is door 2.

Case  F   F   T - since the door with the treasure is white and does not belong to {1,2,7} but belongs to {7,6,5}, it is door 5.

Case  F   F   F - since the door with the treasure is white and does not belong either to {1,2,7} or {7,6,5}, it is door 4.

EDIT: Made some minor changes to make it more readable.

Edited by araver
Link to comment
Share on other sites

  • 0

Very nice one :thumbsup:.

However I think that not all the information in the OP is necessary if the guards know where the treasure is.

7 doors, 3 black and 4 white with no two black door adjacent means that exactly 2 white doors are adjacent (Dirichlet's principle).

Then the doors are arranged as follows:


  B

 W W

B   B

 W W

Number these doors in a circular way (not really necessary, but makes reasoning easier).

        B(1)

    W(2)    W(7)

B(3)            B(6)

    W(4)    W(5)

Now I will ask 3 questions to the guard standing in front of door 1. I do not actually need any of the stated assumptions about how many liars there are. I just need to assume that he could be either a truthteller (always telling the truth) or a liar (always lying). There is a well-known technique (in fact several) to obtain the correct answer from a person in both cases. Example: "If I would ask you if P is true, what would you say?". The truth teller would say Yes if P is true and No if P is false, since he would always tell the truth. The liar would normally say the opposite to a direct question (No if P is true and Yes if P is false), however I am forcing him to tell me indirectly. Therefore I am forcing him to lie about his normal behavior. Lie about a lie means Double Negation which means he would answer Yes if P is true and No if P is false. In both cases we get Yes if and only if P is true :) So I will ask 3 questions Q1, Q2, Q3 to the guard about 3 statements P1, P2, P3 as in the example above. The answers will be identical to the truth of statements P1, P2, P3. P1: "Is the treasure behind a black door?" P2: "Is the treasure in the door behind you or one of the adjacent doors?" P3: "Is the treasure in the door behind the nearest black door to your left (B6 in the picture) or behind one of its adjacent doors?". For the record, the 3 questions are a little longer but will determine the truth values of P1, P2, P3 respectively. Q1: "If I would ask you if the treasure is behind a black door, what would you say?" Q2: "If I would ask you if the treasure is behind the door behind you or behind one of the two adjacent doors, what would you say?" Q3: "If I would ask you if the treasure is behind the door behind the nearest black door to your left (B6 in the picture) or behind one of its adjacent doors, what would you say?". Now for P1, P2, P3 we have 2^3 = 8 cases covered in the table below. Note that
P2 is true <=> The treasure is behind 1, 2 or 7
and
P3 is true <=> The treasure is behind 7, 6 or 5
Note T = true, F = False

      P1  P2  P3

Case  T   T   T - impossible {1,2,7} and {7,6,5} only have in common a white door so the answer to P1 cannot be T.

Case  T   T   F - since the door with the treasure is black and belongs to {1,2,7} but not to {7,6,5}, it is door 1.

Case  T   F   T - since the door with the treasure is black and does not belong to {1,2,7} but belongs to {7,6,5}, it is door 6.

Case  T   F   F - since the door with the treasure is black and does not belong either to {1,2,7} or {7,6,5}, it is door 3.

Case  F   T   T - since the door with the treasure is white and belongs both to {1,2,7} and {7,6,5}, it is door 7.

Case  F   T   F - since the door with the treasure is white and belongs to {1,2,7} but not to {7,6,5}, it is door 2.

Case  F   F   T - since the door with the treasure is white and does not belong to {1,2,7} but belongs to {7,6,5}, it is door 5.

Case  F   F   F - since the door with the treasure is white and does not belong either to {1,2,7} or {7,6,5}, it is door 4.

EDIT: Made some minor changes to make it more readable.

thank you dear Araver...what do you mean by " changes"?

Link to comment
Share on other sites

  • 0

thank you dear Araver...what do you mean by " changes"?

Sorry, I got the habit of providing an explanation for the changes when I edit a post at a later time. I guess commenting changes becomes a second nature after using multi-user environments (e.g. programming).

In this case, I made a few changes to the text I posted (some letters bold, some parts put in a "<>" section) so that it is more readable.

Link to comment
Share on other sites

  • 0

((THE WEB SITE IS NOT ALLOWING ME TO EITHER ADD THE IMAGE OF THE ARRANGEMENT NOT THE WORD DOCUMENT SO PLZ WORK OUT WITH THIS ONLY.))

b(1)

w(2) w(7)

w(3) b(6)

b(4) w(6)

This can be the arrangement of doors where

w=white

b=black

1 2 3.........7=door no. allotted by me

Now, we know that 2 liers are infront of 2 white doors.So we will question the guards infront of black doors.Firstly, to make sure that he speaks the truth or not we will ask <guard 1>

"is the door behind you black?"

Answer of the lier will be "no" and truthful will be"yes"

Now we have two conditions:

a. the guard is lier in that case our 2nd question will be"Is the treasure behind a black door?" If yes it is behind white door and vice versa if no..If it is behind white one-"Is that door adjacent to you?"If yes then next we will question the guard 4.if no then come to guard6.If it is behind black then next we will question any of the remaining two black guards(because all three liers are over)

case I:white door:

guard 4:Since he will surely speak the truth we will ask"is it door 5?"if yes ,we have got the treasure , if no it is behind door3.

guard 6:"is the treasure adjacent to you?" if yes then it is door 7 if no then it is door2

black door:

Guard 6:"is the treasure behind you?" If yes we have got the treasure if no it is behind door4.

guard 4:"is the treasure behind you?" if yes then we have got the treasure if no it is behind door6.

b. if he says the truth, 2nd question will be"Is the treasure behind a black door?".If he says yes then we will ask "is that door the one behind you?"IF yes then we have got our treasure. if no then then we have to question any of the other 2 guards.if he says no (treasure is behind a white door) then we will ask "is that door adjacent to you?"if yes then we will question guard 6.if no then we will question guard 4.

Case II:any of the other two guards:(black door)

guard 4:"is the treasure behind you?" if yes then we have got the treasure if no it is behind door6.

Guard 6:"is the treasure behind you?" If yes we have got the treasure if no it is behind door4.

white door.

guard 6:"is the treasure adjacent to you?" if yes then it is door 7 if no then it is door2

guard 4:Since he will surely speak the truth we will ask"is it door 5?"if yes ,we have got the treasure , if no it is behind door3

Link to comment
Share on other sites

  • 0

Sorry, I got the habit of providing an explanation for the changes when I edit a post at a later time. I guess commenting changes becomes a second nature after using multi-user environments (e.g. programming).

In this case, I made a few changes to the text I posted (some letters bold, some parts put in a "<>" section) so that it is more readable.

What a great job!!!

Link to comment
Share on other sites

  • 0

((THE WEB SITE IS NOT ALLOWING ME TO EITHER ADD THE IMAGE OF THE ARRANGEMENT NOT THE WORD DOCUMENT SO PLZ WORK OUT WITH THIS ONLY.))

b(1)

w(2) w(7)

w(3) b(6)

b(4) w(6)

This can be the arrangement of doors where

w=white

b=black

1 2 3.........7=door no. allotted by me

Now, we know that 2 liers are infront of 2 white doors.So we will question the guards infront of black doors.Firstly, to make sure that he speaks the truth or not we will ask <guard 1>

"is the door behind you black?"

Answer of the lier will be "no" and truthful will be"yes"

Now we have two conditions:

a. the guard is lier in that case our 2nd question will be"Is the treasure behind a black door?" If yes it is behind white door and vice versa if no..If it is behind white one-"Is that door adjacent to you?"If yes then next we will question the guard 4.if no then come to guard6.If it is behind black then next we will question any of the remaining two black guards(because all three liers are over)

case I:white door:

guard 4:Since he will surely speak the truth we will ask"is it door 5?"if yes ,we have got the treasure , if no it is behind door3.

guard 6:"is the treasure adjacent to you?" if yes then it is door 7 if no then it is door2

black door:

Guard 6:"is the treasure behind you?" If yes we have got the treasure if no it is behind door4.

guard 4:"is the treasure behind you?" if yes then we have got the treasure if no it is behind door6.

b. if he says the truth, 2nd question will be"Is the treasure behind a black door?".If he says yes then we will ask "is that door the one behind you?"IF yes then we have got our treasure. if no then then we have to question any of the other 2 guards.if he says no (treasure is behind a white door) then we will ask "is that door adjacent to you?"if yes then we will question guard 6.if no then we will question guard 4.

Case II:any of the other two guards:(black door)

guard 4:"is the treasure behind you?" if yes then we have got the treasure if no it is behind door6.

Guard 6:"is the treasure behind you?" If yes we have got the treasure if no it is behind door4.

white door.

guard 6:"is the treasure adjacent to you?" if yes then it is door 7 if no then it is door2

guard 4:Since he will surely speak the truth we will ask"is it door 5?"if yes ,we have got the treasure , if no it is behind door3

Dear Akriti..

As I see under the two conditons(a)and(b),you`ve asked more then three questions.

Link to comment
Share on other sites

  • 0

Dear Wolfgang, I was pondering what your strategy was in the first place - exactly 3 liars of which (exactly?) 2 are in front of white doors.

I think that if you change the assumption that everybody knows everything (about the treasure and/or about the distribution of liars), this might actually force very different strategies than the one suggested by me.

E.g. If the black guards only know what other black guards know (i.e. they know where the treasure is only if it is behind a black door and they know which is the black liar) and similarly for the white guards (i.e. they know where the treasure is only if it is behind a white door and they know which are the white liars).

This would make it a different puzzle :D

EDIT: "Black guard" is short for "guard standing in front of a black door".

Edited by araver
Link to comment
Share on other sites

  • 0

Dear Wolfgang, I was pondering what your strategy was in the first place - exactly 3 liars of which (exactly?) 2 are in front of white doors.

I think that if you change the assumption that everybody knows everything (about the treasure and/or about the distribution of liars), this might actually force very different strategies than the one suggested by me.

E.g. If the black guards only know what other black guards know (i.e. they know where the treasure is only if it is behind a black door and they know which is the black liar) and similarly for the white guards (i.e. they know where the treasure is only if it is behind a white door and they know which are the white liars).

This would make it a different puzzle :D

EDIT: "Black guard" is short for "guard standing in front of a black door".

Thats good dear Araver...but as you know...our friends differs in the way of thinking,though I wanted to stay in the middle way to (about)all.

Link to comment
Share on other sites

  • 0

Thats good dear Araver...but as you know...our friends differs in the way of thinking,though I wanted to stay in the middle way to (about)all.

Sorry, but I do not understand what you said :(

I found a slightly different solution that still works in case the guards have limited knowledge - guards in front of black doors only know if the treasure is behind black doors and guards

7 doors, 3 black and 4 white with no two black door adjacent means that exactly 2 white doors are adjacent (Dirichlet's principle).

Then the doors are arranged as follows:


      B

  W 	W

B          B

  W 	W

Number these doors in a circular way.

        B(1)

    W(2)    W(7)

B(3)            B(6)

    W(4)    W(5)

To simplify the reasoning I will assume the guards are dressed in the same way as the door they're standing in front of, so there are black guards and white guards.

Same as solution no.1, I will use the technique of oblique questions: "If I would ask you if P is true, what would you say?". Both liars and truthtellers answer Yes if P is true and No if P is false.

Since not all guards know where the treasure is, but know if it is behind of a door of the same color with theirs, I will need an adaptive strategy this time.

First, ask a black guard (e.g. guard 1 in the picture):

Q1: "If I would ask you if the treasure is behind a black door, what would you say?"

He will answer Yes if the treasure is behind a black door and No if it is behind a white door (see technique explanation above)

Now we know the color of the door where the treasure is.

Next two questions must be targeted at guards of the same color as the door of the treasure is (this is why this time the strategy needs to be adaptive):

Case Yes to the first question (black door):

Ask guard 1: Q2: "If I would ask you if the treasure is behind the door behind you, what would you say?"

If answer to Q2 is
Yes
then the treasure is behind door number 1.

If answer to Q2 is
No
then ask guard 3 - Q3: "If I would ask you if the treasure is behind the door behind you, what would you say?"

If answer to Q3 is
Yes
then the treasure is behind door number 3.

If answer to Q3 is
No
then the treasure is behind door number 6.

Case No to the first question (white door):

Ask guard 2: Q2: "If I would ask you if the treasure is behind the door behind you (door 2 in the picture) or the first white door to your left (door 4 in the picture), what would you say?"

If answer to Q2 is
Yes
then ask same guard 2 the question: Q3 "If I would ask you if the treasure is behind the door behind you, what would you say?"

If answer to Q3 is
Yes
then the treasure is behind door number 2.

If answer to Q3 is
No
then the treasure is behind door number 4.

If answer to Q2 is
No
then ask guard 5 the question: Q3 "If I would ask you if the treasure is behind the door behind you, what would you say?"

If answer to Q3 is
Yes
then the treasure is behind door number 5.

If answer to Q3 is
No
then the treasure is behind door number 7.

Note: This strategy actually works with 8 doors (4 black, 4 white), since as in case 2 - 2 questions are enough to find the treasure from 4 doors.

Edited by araver
Link to comment
Share on other sites

  • 0

Sorry, but I do not understand what you said :(

I found a slightly different solution that still works in case the guards have limited knowledge - guards in front of black doors only know if the treasure is behind black doors and guards

7 doors, 3 black and 4 white with no two black door adjacent means that exactly 2 white doors are adjacent (Dirichlet's principle).

Then the doors are arranged as follows:


      B

  W 	W

B          B

  W 	W

Number these doors in a circular way.

        B(1)

    W(2)    W(7)

B(3)            B(6)

    W(4)    W(5)

To simplify the reasoning I will assume the guards are dressed in the same way as the door they're standing in front of, so there are black guards and white guards.

Same as solution no.1, I will use the technique of oblique questions: "If I would ask you if P is true, what would you say?". Both liars and truthtellers answer Yes if P is true and No if P is false.

Since not all guards know where the treasure is, but know if it is behind of a door of the same color with theirs, I will need an adaptive strategy this time.

First, ask a black guard (e.g. guard 1 in the picture):

Q1: "If I would ask you if the treasure is behind a black door, what would you say?"

He will answer Yes if the treasure is behind a black door and No if it is behind a white door (see technique explanation above)

Now we know the color of the door where the treasure is.

Next two questions must be targeted at guards of the same color as the door of the treasure is (this is why this time the strategy needs to be adaptive):

Case Yes to the first question (black door):

Ask guard 1: Q2: "If I would ask you if the treasure is behind the door behind you, what would you say?"

If answer to Q2 is
Yes
then the treasure is behind door number 1.

If answer to Q2 is
No
then ask guard 3 - Q3: "If I would ask you if the treasure is behind the door behind you, what would you say?"

If answer to Q3 is
Yes
then the treasure is behind door number 3.

If answer to Q3 is
No
then the treasure is behind door number 6.

Case No to the first question (white door):

Ask guard 2: Q2: "If I would ask you if the treasure is behind the door behind you (door 2 in the picture) or the first white door to your left (door 4 in the picture), what would you say?"

If answer to Q2 is
Yes
then ask same guard 2 the question: Q3 "If I would ask you if the treasure is behind the door behind you, what would you say?"

If answer to Q3 is
Yes
then the treasure is behind door number 2.

If answer to Q3 is
No
then the treasure is behind door number 4.

If answer to Q2 is
No
then ask guard 5 the question: Q3 "If I would ask you if the treasure is behind the door behind you, what would you say?"

If answer to Q3 is
Yes
then the treasure is behind door number 5.

If answer to Q3 is
No
then the treasure is behind door number 7.

Note: This strategy actually works with 8 doors (4 black, 4 white), since as in case 2 - 2 questions are enough to find the treasure from 4 doors.

:thumbsup: you are right!! it is more difficult...but interesting!

Thank you..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...