Shown above are 4 men buried up to their necks in the ground.

They can not move so can only look forward.

Between A and B is a brick wall which can not be seen through.

They know that between them are 4 hats, 2 x black and 2 x white, but they do not know which colour they are wearing.

In order to avoid being shot one of them must call out to the executioner the colour of their hat. If they get it wrong, everyone will be shot.

They are not allowed to talk to each other and have 10 minutes to fathom it out.

 

After 1 minute:

 

Q Which one of them calls out ?

 

Q. Why is he 100% certain of the colour of his hat ?

 

This is not a trick question.

There are no outside influences nor other ways of communicating. They cannot move and are buried in a straight line. So A & B can only see their respective sides of the brick wall, C can see B and D can see B & C.