# Shocks and guesses

The Liar, the Random and Truth teller were captured and brainwashed to forget whether they always lie or tell truth or randomly answer.Everyone is handcuffed to a chair and gagged with gray, white and black scarf. Each one was given a phone with apps to guess who among them is the right Liar,the Random and Truth teller or else will be electrocuted. The apps below with 9 buttons will give them a painful electric shock every time they select a button that is a wrong guess. 4 shocks is fatal.Buttons must be pressed one at a time. The 3 correct buttons should be pressed.

1) The Liar will receive the shock if his guess is true. 2) The Truth teller will receive the shock if his guess is false. 3) The Random teller will receive the shock if 2 consecutive guesses are both true or both false.

What buttons should be pressed to survive, figure out everyone's identity with the fewest trials and shocks?

• Does each see what guess any other has made, and what the outcome of that is? Do they have to guess simultaneously? What do you mean by at least 3 buttons have to be pressed - does each have to press three buttons, or do you mean all of their presses together? Does the game end when they are all certain what type they are, or when they all have made a correct guess at some point, or when the last guess of each person is correct? – Jaap Scherphuis May 7 '20 at 14:34
• I see now that each person has to make a guess at the identity of all three of them. Is the shock only given once one button is pressed on each row? Can you press two or more buttons in the same row? And if so, how is the truth value of such a guess determined? – Jaap Scherphuis May 7 '20 at 14:40
• at jaap all button can be pressed assuring all 3 right buttons are pressed but not a good strategy – TSLF May 7 '20 at 14:48
• each don't see what guess any other has made, and what the outcome of that is.. and they have to guess on their time.. What do you mean by at least 3 buttons have to be pressed ? the right ones even already known. – TSLF May 7 '20 at 14:59
• @ jaap- the shock is given once one button is pressed if it should be. You can press two or more buttons in the same row one at a time. And the truth value is determined by their original character before memory erasure. – TSLF May 7 '20 at 15:25

If I understood the puzzle correctly, it's a nice and easy puzzle, and the only reason it has not been answered by now, is the lack of clarity in how it's worded. Here is my take on it:

Below, is how I read the puzzle:

You and two other people are in single cells: yours is painted gray, another is white and the last is black. You know one of the three people is a Liar, one makes Random statements and one is a Truth teller. You have been brainwashed to forget whether you always lie or tell truth or randomly answer. You, personally, are given a phone with an app to guess who is the the Liar, the Random and the Truth teller or else you will be electrocuted. The app below with 9 buttons will give you a painful electric shock according to the rules below as you select buttons. 4 shocks are fatal. If you survived after having pressed the three correct buttons (in any order or sequence) you are let go.

1. If you are the Liar, you will receive a shock if your guess is true.
2. If you are the the Truth teller, you will receive a shock if your guess is false.
3. If you are the Random, you will receive a shock if your last two 2 consecutive guesses are both true or both false.

What buttons should be pressed to survive, figure out everyone's identity with the fewest trials and shocks?

• Would you kindly edit the op wordings to eliminate any further clarification? – TSLF May 8 '20 at 10:26
• @TSLF I'm not sure if I understood it correctly ;) – Andrew Savinykh May 8 '20 at 10:52
• @TSLF based on that you validated my reading by accepting the answer, I edited my answer to add my reading of your puzzle. Feel free to use it if you feel it helps. – Andrew Savinykh May 9 '20 at 0:10
• For clarification. Can I select the same button twice or some color will lit up the button to indicate it was selected thus any accidental touch wont shock me again? – TSLF May 9 '20 at 16:16
• @TSLF nowhere it was indicated, that buttons would lit up on touch. So when they get lit/unlit is unclear and probably not important. Whether you will be shocked again or not on touching the same button again depends on if you are Random or not, and also on the preceding touch. You always can select the same button twice. You may be shocked if you do. – Andrew Savinykh May 9 '20 at 21:14

Here's one possible solution, and possibly pain optimal.

Everyone presses the Truth button. No one gets shocked because the Truth teller is telling the truth, the Liar is lying, and the Random guy does not get shocked till he makes 2 choices.

Everyone then presses the Truth button again. This time, only the Random guy will get shocked, because both his choices are false. The other 2 don't get shocked because of the same argument above. This confirms who the Random guy is.

Now the unshocked guys both press Random. The Truth teller will get shocked because he is telling a lie. The Liar won't be shocked because he is lying. And thus both will know who is which.

This solution thus requires 3 trials and 2 shocks at the most.

To be more concrete :

Whatever scarf color I am, I press Truth twice. If I am shocked in the second try, I am Random and I do not press anything (or if I am supposed to always press a button when the others are pressing, I press Random and don't get a shock because the previously I pressed wrong, and this time I pressed correct). If not, then I press Random. If I am shocked, I am the Truth teller, because I told a lie, and I cannot be the Liar because I would not have been shocked then. If still not shocked, then I am the Liar.

• if you are one of them and know just your scarf color and the 1) 2) 3) rules. What button should you press first? – TSLF May 7 '20 at 15:36
• rot13(Gehgu, Gehgu, Enaqbz. Vs fubpxrq va gur svefg 2 gevnyf, gura V nz Enaqbz. Vs abg, gura vs fubpxrq va gur guveq gevny, V nz Gehgu gryyre. Ryfr Yvne.) – Yuzuriha Inori May 7 '20 at 15:53
• jung vf gur pbybe bs lbhe fpnes? – TSLF May 7 '20 at 16:36
• rot13(Qbrf abg znggre) – Yuzuriha Inori May 7 '20 at 16:37
• Wait, your question is unclear. Which Truth button? I have a phone with an app that has 3 buttons, right? And I can press 1 of them. I don't know what the others are pressing on their phone. Just my phone. Own phone. Right? What I am reading is equivalent to 3 of us having a phone each with an app with 3 buttons, T R and L and the 3 of us are some thousands of miles away. – Yuzuriha Inori May 7 '20 at 17:12

Everyone click the truth button. By doing this, the truth teller will always tell the truth and won't be shocked. The liar will always lie, and won't be shocked. Random teller will be shocked once but thats unavoidable.

• they are handcuffed with one free hand to use the phone apps – TSLF May 7 '20 at 15:08
• wait I read it wrong @TSLF – Ankit May 7 '20 at 15:22