I stole this puzzle - but I credited it in the source of this question, so if you really want to cheat you can. No cheating, please.
There's a penal colony on an island in the South Pacific. It's administered by a twisted prison warden who plays little mind games with the prisoners. He presents a challenge to the prisoners. If they solve it, they are set free. And if they don't, they're fed to the sharks.
The warden says to five prisoners, "I'm going to stand you against the wall. One guy is going to face the wall with his hands and his toes touching the wall. The next guy is going to stand behind him about five feet away, and the next person behind him and so on. Each guy can see the back of the head of the guy in front, except for the last guy who can see everybody, and the front guy - who can't see anybody.
"We're going to do this tomorrow. I want you to think about this overnight to see if you want to participate because, don't forget, if you lose - It's the sharks for you!
And if you win, you get set free. Here's how it works. Starting at the back of the line, I'm going to place either a white hat or a black hat on each of your heads. I can put any hat I want on any of your heads. Your job is to identify the color of your hat correctly. There's one caveat. The guy at the back of the line can't communicate, because the only thing he can say is either 'black' or 'white.'"
Crusty, who's been on this island for 19 years for overcharging for valve jobs says, "I have a plan which will improve our odds beyond 50/50. However, we must draw straws."
The question is