Re:Ask HN: What are your optimistic takes on the SWE job mar...
by spaceman_2020 on Thursday April 13, 2023 @02:59AM
(#35552015)
This is what GPT-4 answered:
Since both men always tell the truth, you can simply ask either of them, "Which path leads to safety?" They will both give you the same truthful answer, and you can confidently take the safe path
Re:Ask HN: What are your optimistic takes on the SWE job mar...
by silisili on Thursday April 13, 2023 @03:00AM
(#35552029)
Thanks! That is quite the improvement...
Re:Ask HN: What are your optimistic takes on the SWE job mar...
by spaceman_2020 on Thursday April 13, 2023 @03:14AM
(#35552116)
If you know what to ask for, it’s easily better than 99% of junior devs.
Q - you come across a fork in the road. One path leads to death, one is safe. There are two men standing by to ask. One always tells the truth. The other always tells the truth. You are only allowed to ask one of them one question. What question would you ask?
A - You would ask one of the men, "If I were to ask the other guard which way leads to safety, what would they say?"
Since one of the men always tells the truth and the other always lies, regardless of which man you ask, their answer will tell you the direction that leads to death. If you ask the honest man, they will truthfully say that the dishonest man would point to the dangerous path. If you ask the dishonest man, they would lie about what the honest man would say and still point you to the dangerous path. Therefore, you would choose the opposite direction to reach safety.
--
And chatGPT just killed me. I'd expect an attentive person of any intelligence level to just say 'well that's easy, just ask either of them which way to go'