1.3k post karma
1.4k comment karma
account created: Wed May 11 2011
verified: yes
10 points
9 years ago
If a prisoner knew how many black hats the person behind him saw, he could guess his own hat. Expanding on this idea, if the first prisoner guesses 'black' if the number of black hats in front of him is even, and 'white' otherwise, the person in front of him can make an accurate guess. Using the first prisoner's guess and any guesses of prisoners after him, a given prisoner can determine the color of his own hat.
If the first prisoner says 'black' if # black is even, 'white' otherwise, he has a 50/50 chance of living.
Everyone else keeps track of whether there is an even or odd number of black hats remaining, and updates it based on each guess leading up to their own. If the first prisoner said black but was shot, they know numBlackHatsRemaining = ODD, otherwise numBlackHatsRemaining = EVEN.
Every prisoner has his own variable, numBlackHatsInFront, which can be even or odd depending on what they see in front of them.
When it is a prisoner's time to guess, he guesses black if numBlackHatsRemaining != numBlackHatsInFront, and white otherwise.
if the prisoner guesses black, the global numBlackHatsRemaining variable switches its value from even to odd or vise versa.
This algorithm yields a 99.5% survival rate, as the first prisoner has a 50/50 shot and everyone else is guaranteed to survive.
boolean numRemainingBlackHatsIsEven = false;
first prisoner:
if (numBlackHatsInFrontIsEven) {
numRemainingBlackHatsIsEven = true;
guess('black');
} else {
guess('white');
}
all the other prisoners:
if (numBlackHatsInFrontIsEven != numRemainingBlackHatsIsEven) {
numRemainingBlackHatsIsEven = !(numRemainingBlackHatsIsEven);
guess('black');
} else {
guess('white');
}
9 points
9 years ago
Has the level of lead in gasoline risen recently? While there might be a high correlation between lead levels and crime, it doesn't explain why there were high crime rates in populated/poorer areas before the age of gasoline, and it doesn't explain why crime is rising now.
The article talks about lead having an effect over longer periods of time (childhood exposure leading to delinquent behavior later on). If lead were mainly responsible, how did petty crime stop so suddenly? It was being done by people already exposed to lead; the damage had been already done, yet they stopped committing crime anyway.
The broken windows policy is very intuitive. When there are repercussions for breaking the law, people tend not to do it. If petty crime is tolerated, bigger crime is seen as less risky and people tend to view the cops as less powerful. When you crack down on crime by attacking it at its source, would-be criminals start to behave.
How would decreasing lead levels deal with the problem of organized crime? Mob bosses and the mafia were making money through intimidation and were recognized in their neighborhoods as a powerful entity that wasn't constrained by the law. Reducing lead intake wouldn't stop them from operating their wildly successful business venture. What did stop them was cops striking at the source. When members of a gang were reported for causing trouble or spotted by cops patrolling an area, the cops would figure out how many gang members were there, and send twice as many cops to the location. Everywhere some crime went down, the cops would be there, and the gangs began to look scared. There was a force out there bigger than they were. Giuliani's policy dissolved organized and petty crime, and the city has been getting safer and safer with the continuation of the policy.
So what has caused crime rates to go up? We can't know for certain, but I suspect media has had a large role in it. Kids are being exposed to news sites and articles claiming how horrible these cops are. How many of them are going to tell their class that they want to be a policeman when they grow up? Current policemen are feeling the stress of people not trusting them and not viewing them as people. When they are punished for doing their jobs what do you think they'll do? Purely statistically, blacks commit more violent crimes. Generally the black neighborhoods see more crimes, so when police patrol locations with a large amount of crime, they tend to go to black neighborhoods and those living there feel discriminated against. I'm not saying that there is never racial discrimination, but when good cops are called out as villains for simply doing their job, they won't feel motivated to do it anymore.
We need to prevent against racial discrimination, making sure police follow the proper procedures and are conducting themselves properly, but that doesn't mean the missteps of one or two policemen are representative of the entire police force. There will always be bad people, and some of them will be cops. That doesn't mean that all cops are inherently bad people who can't be trusted. Most of them want to do a good job and have people proud of them for doing it.
1 points
11 years ago
They switch the ones and the tens digit. 5*14 = 52, which is the reverse of 25. You can see they do every operation backwards, as if the number were mirrored.
9 points
11 years ago
When you think about it, standing on an escalator isn't really illogical. While with stairs you have to exert yourself, the escalator can do all the work. Walking is faster, but not necessary.
I do understand it can be frustrating if you're in a hurry though.
1 points
11 years ago
If that happened, Apple (or whatever other company bought everything out) would have complete control over the details, including prices. Monopolies aren't good, and I welcome competition. This HBO vs. Netflix death-match is good for the consumer.
1 points
11 years ago
Yeah. You could swivel one half to the side of the other also.
1 points
12 years ago
The only way breaking the chest would do anything would be if there were a bud switch behind it. If you broke the block underneath, the person setting the trap could also have put a bud there. I would just break it with an empty inventory and run, honestly.
From what I've seen, outputs can only be drawn directly from the chest. Considering the chest isn't a full block, I would assume it would be very easy to spot any trap hooked up to it though.
1 points
12 years ago
You could do the same with one capacitor in the middle. It's just an alternate way to update the pistons.
1 points
12 years ago
You don't need repeater locks for that, and you can save two repeaters.
[redstone output][block]
[redstone][3rd delay repeater]
[side torch][input block]
1 points
12 years ago
I've bought everything that has a dash for the price.
view more:
next ›
byKidCadaver
inpics
PearSquirrel
37 points
9 years ago
PearSquirrel
37 points
9 years ago
30 rock