Day Knights and Night Knights
-
In an underground cavern where the sun cannot be seen and there are no clocks there live a tribe of Knights. These knights are divided into 2 types: those who tell the truth when it is day and lie when it is night (Day Knights) and those who tell the truth when it is night and lie during the day(Night Knights). It is impossible to tell the difference between the knights apart from the truthfullness of their answers. You desperately need to know whether it is day or night on the surface and infront of you are 2 knights; one is a day knight and the other a night knight. You may only ask one question of one of these knights. What would you ask?
-
In an underground cavern where the sun cannot be seen and there are no clocks there live a tribe of Knights. These knights are divided into 2 types: those who tell the truth when it is day and lie when it is night (Day Knights) and those who tell the truth when it is night and lie during the day(Night Knights). It is impossible to tell the difference between the knights apart from the truthfullness of their answers. You desperately need to know whether it is day or night on the surface and infront of you are 2 knights; one is a day knight and the other a night knight. You may only ask one question of one of these knights. What would you ask?
"Which one of you values your balls most?"
-
In an underground cavern where the sun cannot be seen and there are no clocks there live a tribe of Knights. These knights are divided into 2 types: those who tell the truth when it is day and lie when it is night (Day Knights) and those who tell the truth when it is night and lie during the day(Night Knights). It is impossible to tell the difference between the knights apart from the truthfullness of their answers. You desperately need to know whether it is day or night on the surface and infront of you are 2 knights; one is a day knight and the other a night knight. You may only ask one question of one of these knights. What would you ask?
your puzzle is a bit flawed; the normal approach is you ask one what the other would answer to the question of interest, knowing one of them would insert an inverter (i.e. lie about it). However this assumes they know each other as to their truthfulness, which is not apparent from your original statement. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
[The QA section does it automatically now, I hope we soon get it on regular forums as well]
-
your puzzle is a bit flawed; the normal approach is you ask one what the other would answer to the question of interest, knowing one of them would insert an inverter (i.e. lie about it). However this assumes they know each other as to their truthfulness, which is not apparent from your original statement. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
[The QA section does it automatically now, I hope we soon get it on regular forums as well]
You're right of course :rolleyes: I guess the knights also know that one of them is a day knight and the other is a night knight. They are also aware of which they are.
-
You're right of course :rolleyes: I guess the knights also know that one of them is a day knight and the other is a night knight. They are also aware of which they are.
But if they can't see the sun or a clock how do they know whether they should be lying or telling the truth at the moment you ask them?
I hope you realise that hamsters are very creative when it comes to revenge. - Elaine
-
But if they can't see the sun or a clock how do they know whether they should be lying or telling the truth at the moment you ask them?
I hope you realise that hamsters are very creative when it comes to revenge. - Elaine
They just know it, and they're knights which means they've got armour and brutal weapons so I'm not going to question their methods too closely.
-
In an underground cavern where the sun cannot be seen and there are no clocks there live a tribe of Knights. These knights are divided into 2 types: those who tell the truth when it is day and lie when it is night (Day Knights) and those who tell the truth when it is night and lie during the day(Night Knights). It is impossible to tell the difference between the knights apart from the truthfullness of their answers. You desperately need to know whether it is day or night on the surface and infront of you are 2 knights; one is a day knight and the other a night knight. You may only ask one question of one of these knights. What would you ask?
"Is it daytime?" If it's day: Day Knight (Truth): Yes Night Knight (Lies): No If it's night: Day Knight (Lies): Yes Night Knight (Truth): No Hence, whether it's day or night, a Day Knight would say yes, and a Night Knight would say no. Do I get a prize? EDIT: Oh wait, nevermind... You want to know whether it's day, not what kind of knights they are... I blame Monday morning. EDIT 2: Ok, I got it... "Is the other guy a Day Night?" If he says "No", it's daytime.
Proud to have finally moved to the A-Ark. Which one are you in? Author of Guardians of Xen (Sci-Fi/Fantasy novel)
-
"Is it daytime?" If it's day: Day Knight (Truth): Yes Night Knight (Lies): No If it's night: Day Knight (Lies): Yes Night Knight (Truth): No Hence, whether it's day or night, a Day Knight would say yes, and a Night Knight would say no. Do I get a prize? EDIT: Oh wait, nevermind... You want to know whether it's day, not what kind of knights they are... I blame Monday morning. EDIT 2: Ok, I got it... "Is the other guy a Day Night?" If he says "No", it's daytime.
Proud to have finally moved to the A-Ark. Which one are you in? Author of Guardians of Xen (Sci-Fi/Fantasy novel)
You even managed to answer my follow up question
-
You even managed to answer my follow up question
Just wait... Sometime after lunch, my brain will finish booting up for the day. Then you're all doomed!
Proud to have finally moved to the A-Ark. Which one are you in? Author of Guardians of Xen (Sci-Fi/Fantasy novel)
-
In an underground cavern where the sun cannot be seen and there are no clocks there live a tribe of Knights. These knights are divided into 2 types: those who tell the truth when it is day and lie when it is night (Day Knights) and those who tell the truth when it is night and lie during the day(Night Knights). It is impossible to tell the difference between the knights apart from the truthfullness of their answers. You desperately need to know whether it is day or night on the surface and infront of you are 2 knights; one is a day knight and the other a night knight. You may only ask one question of one of these knights. What would you ask?
I'd check my cell phone.
-
I'd check my cell phone.
you can't do that, its solar cells won't work in the underground cavern, and batteries hadn't been invented yet. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
[The QA section does it automatically now, I hope we soon get it on regular forums as well]