Riddle Thread

There are 100 prisoners lined up in a straight line by an executioner.
The executioner places either a red or a blue hat on every prisoner. The prisoners do not know their own hat color, and cannot look backward. They can only see the hats in front of them.
Starting at the back, the executioner will ask each prisoner to guess if his hat is red or blue. The prisoners cannot communicate otherwise. If the prisoner is wrong he will be killed silently.
The prisoners are allowed time to make a plan. How do they maximize survival?
spoiler your answer please

Paint all the hats red

The executioner doesn't give hats until they are lined up.

Steal all the hats and replace them with white ones

have a gay orgy

If by communicate, you mean verbally communicate, then I would consider the possibility of using a code to tell the person in front if they have a red or blue hat: the prisoner touches the person in front on the left shoulder for blue, and the right for red.

But what I think the real riddle is why the executioner goes through all this trouble instead of shooting everyone.

Look what color hat the executioner is wearing when he's putting hats on the folks in front of you. Then you'll know the color of his hat when he asks you what color his hat is.

WINrar

Interesting solution, but risky. The executioner likes to play with his captives and doesn't appreciate cheaters.

He asks you for the color of your hat, not his.

...

Assuming the hats have no brims and there's no way to tell how many red and blue hats will be handed out no strategy really helps. Each prisoner should roll a mental 1x100 dye weighted by the color of the hats in front of him just in case they're not 50/50.

My hat is black so when he syas "is your hat red or blue" the answer is no.

you wanna die motherfucker?

We don't know anything about how many reds and blues there are?

The person in the back knows how many hats there are.

you're not very good at this

LOL JUST TAKE THE HAT OFF HOLY FUCK!!!

that's not the answer

you mean how many hats of each color. But he knows only 99 of them and anyway he has no way to communicate. The others can hear his guess (and by your rules only his guess) but not his possible death. And the executioner could just put a blue hat on his head and red on everyone else's, or equally likely a blue hat on all heads. these would provide opposite guesses. Your game is fatally flawed.

But if everyone took there hats off, all you'd need to say to them is "the person behind me has no hat" and you'd be correct. Nothing in the rules says you can't op…
I WIN

the game isn't about everyone's survival, it's about maximizing it.

Everyone's survival is the (theoretical) maximum, though.

lol everyone just throws their hat forward so other people can see you have no hat… BTFO!!!

Is he using a sword? The prisoners could inject themselves with an anti-sword vaccine.

prisoners' arms are bound. They can't adjust their hats or anybody elses. Not even blow on them.
Sorry that wasn't specified before.

Oh so you admit you're just making up the rules and conditions as you go along?
BAHAHAHAHA!!! This isn't a riddle!!! It's child's play!!!
Next time bring a better riddle op.

Fine, executioner calls you and your fellow prisoners cheaters. Everyone is killed as a result.

KILL ALL THE JEWS

I'm ruining the fun.

The first prisoner in the back says red is there is an odd number of red hats, or blue if there is an even number of red hats.
He has a 50-50 shot, but the rest have a 100% shot from now on assuming they know the number of red hats they see and the number of red hats called since the second the person.
For every prisoner except the first, he can see (x) red hats in front of him, has heard (y) red rat calls excluding the first person. If x + y is either even or odd, and the first person either called out even or odd. If x+y is different than what the red hat said in terms of eveness, then his hat must be red. Otherwise it's blue.

Yep, that's it. Your turn to post a riddle now.

I didn't sign up for this shit…

You have 10 marbles. One is either heavier or lighter than the rest by a little bit.
You have a balance scale. you can put as many marbles as you'd like on a scale and see which side is heavier.
Find the minimum number of times you need to weight marbles to find out which marble is of a different weight (and if it's heavier or lighter).

Here's a more mathey one.
You have regular 31-n gon, labeled clockwise from 0 to 30. Pick 6 vertices on the shape such that the distances between each vertex is of a different length.
So basically, you have points A, B, C, D, E, F, and every single possible line segment between two different points has a different length. Find the points.

Note for the second one. There are multiple answers.
You can try doing it for (n+1) points in an (n^2 + n + 1) sided regular polygon.

shit, unspoilering it so no one thinks it's an answer.

just once you could get it on the first go

...

looking for a 100% success rate. Also, how would you know if it's heavier or lighter?

Does it involve factorials?

nope.

Could you make a chart for this problem that on first glance is shaped like a rectangle, but you cross out everything one side of the diagonal for being dupes, producing a right triangle?

When the executioner is placing a hat on the guy 2 spots in front of me, I bumrush him and climb on his back, covering his line of vision with a hat, giving other prisoners the incentive to take him down and lynch him.

Otherwise, just pick the same color for everyone's answer.

I'm genuinely confused what you mean by this.
Which problem are you talking about?

Because the solution in that case is just 10+9+8…+2+1=55

You can do it much quicker than that

What about crashing the prison with no survivors?

How about picking a random marble as the master marble and weighing it against all the others. If only 1 marble is lighter or heavier than that master, then that is the marble we are trying to find. If more than 1 marble is heavier or lighter than the master marble, then the master marble is the marble I am trying to find. Therefore, I will need to weigh a minimum of 2 times and a maximum of 10 times.

better, but not good enough.
maybe it wasn't clear in the instructions, but you can put as many marbles as you want on the scale. So you could weigh 2 on one side and 2 on the other. Or 5 on one side and 5 on the other.

The prisoner takes his hat off, looks at it, and answers

Take 2 marbles out, and weigh the other 8, putting 4 on one side and 4 on the other side. If the scale is balanced, weigh each of the 2 remaining marbles against a randomly chosen one from the 8 weighed marbles. The marble which is of a different weight is the one that has a different weight from the randomly chosen marble.
If the weight of one side is different from that of the other, then repeat the abovenamed process.

Minimum: 3 Maximum: 8

Ok I think you would:
1 start with 5 on each side, note which one is heavier
2 move 6 marbles to opposite sides (so switching 3 from each side), keep track of which ones they are
if the heavier side did change then you have 6 suspects
4 put 3 of them on the scale against 3 of the ones you know are normal, if they're equal then you know the scale is one of the three remaining ones
5 if they were equal put the three remaining ones on a scale against 3 normal ones
now you know if the odd one is heavier or lighter
6 put 2 of the remaining suspects on either ends of the scale, one of them will be the weird one and if not then the one that's off the scale
So I got 6

Can still do better, although you're getting close.

is it log(2)n?

they're gonna agree for the following
red = odd number of blue hats in front of him
blue = even number of blue hats in front of him
first guy has 50%, the rest have 100% chance of getting it right. last guy will know his hat color by the guy behind him
works for any hat arrangement. fuck you niggers.

how did it take so long…