Sapient Corporation Interview Question
AssociatesCountry: India
Interview Type: In-Person
Yeah, you got it. Tell me how did you get to solution? It would be pretty interesting how u solved it.
To mention here, these are not logical reasons... e.g.
1. They are looking on faces of each other so the other person will realize that his face is also black.
1) How is this not a logical reaction? As i wake up, I laugh at the other two because they have their faces painted. They laugh at me for the same reason. Eventually I am going to realize that I am being laughed at and I ask about my face.
2) Paint dries and is itchy
3) look at my pillow
When two people are laughing...the reason may be that they have their faces black but they don't know that, and they are laughing on each other not on you ... so this is not a logic to get the conclusion that your face is black :)
...
Also to mention, you can't feel that paint(No itching or any other hint)
each person looked themselves in the mirror (not eyes as mirror). Is this option in that e.t.c??? this isn't a logical reason i suppose.
Let's say they are A, B and C.
What A sees is that both B and C are in black. Then A laughs.
Then A sees both B and C also laugh.
What A thinks: assume that A's face is not painted, B should realize that C laugh to B ONLY -- because B can see that A is not painted. Then B should know he/she is painted too. Then B should stop laughing.
But A does not see B stop laughing.
Then A realizes he/she is painted as well.
---
Same way goes to B and C
A B C
Case 1: Only one guy is painted Assume C, Obviously C won't laugh. A and B will laugh.
Case 2 : Two guys were painted assume B and C, Then A will laugh for sure as B and C are painted.
if B is laughing it means C has painted pace as A doesn't have painted face.
if C is laughing it means, B has painted pace then he immediately stops laughing.
if both B and C are laughing, it means both B and C have painted face as they are aware that A doesn't have painted face. Immediately both B and C will stop laughing and A will continue to laugh.
Case 3 : All three are painted
A thinks that B and C are laughing by seeing each other. Similarly for B and C. So when All three are painted only All three will laugh.
There are 4 similar situations that could have occurred - the situations where 0, 1, 2 and 3 faces were painted. With the information given, we can show that the only possible situation is where 3 faces are painted.
- nanothief November 16, 20120 faces is easy to rule out. In that case, no one would be laughing.
If 1 face was painted, the 2 whose faces weren't painted would see someone with their face painted and would laugh. The person with the face painted would not laugh as they see no one with faces painted.
If 2 faces were painted, the 1 whose face wasn't painted would laugh, as they could see 2 other painted faces. The 2 with faces painted would start laughing initially. However, when noting the other with the black face was also laughing, and noting that they could see no one else with a black face, they would have to assume that their face was black. So the two would then stop laughing, knowing they had their faces painted.
Finally, if all three faces were painted - they would all start laughing. However, each would expect if their faces weren't painted for the other two to stop after a small period (as they would be in the 2 face scenario described above). Since the two didn't stop, they would stop laughing, as the only possible reason would be if their face was painted as well. All three would come to the same conclusion, so they all would stop laughing.
Note that this depends on the three having the same level of intelligence. If two were smarter and one a bit slower, then the two would stop laughing, concluding that they were in the 3 face scenario. Seeing the two stopping, the third slower one would incorrectly conclude they were in the 2 face painted scenario.