 Feature Articles
 CodeSOD
 Error'd
 Forums

Other Articles
 Random Article
 Other Series
 Alex's Soapbox
 Announcements
 Best of…
 Best of Email
 Best of the Sidebar
 Bring Your Own Code
 Coded Smorgasbord
 Mandatory Fun Day
 Off Topic
 Representative Line
 News Roundup
 Editor's Soapbox
 Software on the Rocks
 Souvenir Potpourri
 Sponsor Post
 Tales from the Interview
 The Daily WTF: Live
 Virtudyne
Admin
I was thinking along the same lines earlier: We are seeing answers and explanations in this thread that reflect the distinction between software engineers/computer scientists versus developers/programmers.
Of course, some of the answers may just be influenced by too much consumption of cognac (captcha).
Admin
Admin
Admin
No, I think he is looking for someone that knows how to "act" (knows the answer, but pretend to think and work on it) and knows how to bullshit his way under him. Not necessary know how to work and honest.
Admin
There are external factors regarding how long it takes a programmer to finish a task (meetings, other higher priority work from YOUR boss, etc.)
There are external factors to lending your brother money (does he have a job? Did he win the lottery? Does he hate you?).
Admin
You forgot the major external factor to programmer productivity: Is there a fight on Fark/Slashdot/WTF/Digg?
Admin
@Atari: Because I'm not living in a vacuum, can reason myself, and don't make absolute decisions based on forum posts. Rather, I would ask the person to explain their answer, in detail, and create a discussion out of it. This stage of the interview takes about 20 minutes, whether or not they've answered the question instantly.
However, someone who immediately answers without explaination is the kind of asshole I don't want working for me.
You're welcome to develop an absolute stance about my position from this if you choose, but that would be foolish.
@Ken: Bingo, thanks for being sane.
Admin
What you're thinking of is the fact that, over long periods, the wheel will tend to an even distribution. However, you misunderstand why this is so. Consider three spins of the wheel, which can have the following results (for readibility, Black = 0 and Red = 1):
000 001 010 011 100 101 110 111
Notice that it's highly unlikely that you'll get three Reds in a row. Results that have some combination of red and black are much more likely. Now consider the case where the first two spins have resulted in Red, and look at the next three spins:
11:000 11:001 11:010 11:011 11:100 11:101 11:110 11:111
Notice that there's exactly a 50% chance that the next spin will result in Red. This is the very definition of independent events. Future outcomes cannot be effected by prior outcomes. They just can't. You don't have a higher chance on Black coming up on the next spin, because the wheel doesn't know or care what any of the prior results were. To suggest otherwise is to fall for the Gambler's Fallacy.
Admin
Admin
You've obviously never managed and hired people or never done it well.
Admin
You've obviously never managed and hired people or never done it well.
Admin
Your answer doesn't even make sense. "It has a 50% chance of heads or tails, but heads is more likely than tails." ???
If you flip a coin a billion times, and it comes up heads every time, it's still 5050 that the next flip is heads. (Well, in reality, the odds are more likely that the coin is unbalanced, and will continue coming up heads. But that's irrelevent, as the problem assumes a balanced coin, and just an incredible string of luck.)
The results of previous flips has no bearing on the probability of the next flip.
Consider this:The first 6 flips are tails. What are the odds for the next 6 flips? According to you, there should be more heads than tails in order to "balance over time". However, this is totally and absolutely wrong! According to you, the universe requires that you treat this as one set of 12 flips, and that you must "balance over time" close to the 5050 point, meaning the last 6 will lean towards heads. However, what if this is not one set of 12 flips, but two sets of 6 flips? Why should the second, independent, set of flips not be balanced 5050?
Admin
Well, they're pretty distinct solutions. Mine measures inertial mass and yours the gravitational mass. As luck would have it those are equal. And yes, your solution is more original/elegant, so you win :). Although, I imagine mine would be more accurate (your contact area would be relatively small, and a bit fuzzy around the edges)
Anyway that's moot since as someone else pointed out, weight is a major issue with large airplanes, so 747s are bound to have suitable sensors built into the landing gear.
My point was really just that you don't have to be a genius to come up with some solution, and this whole "this has nothing to do with programming" attitude reflects an unhealthy attitude towards programming. Not desirable at all.
Admin
Admin
Couldn't you fill the 3L. Dump it into the 5L. Fill the 3L again. Dump into the 5L until full. Leaves you with 1L in the 3L. Dump the 5L. Pour the 1L in the 3L into the 5L. Fill the 3L and dump into the 5L. Now there are 4L in the 5L.
Admin
[quote user="Undefined Reference"][quote user="KattMan"][quote user="Tom Dibble"]I mean seriously, flip a coin 5 times and get 5 tails, you next flip still has a 50% probability of either heads or tails, but the law of averages states it will probably be heads.[/quote]
Fortune cookie says you best to avoid casino in future.
Seriously, there is a reason casinos hand out cards for people to track which numbers have come up in roulette.
Independence means independence. Run a simulation if you doubt this fact.[/quote] Here are the specs for the simulation:
Simulate a coin flip a billion times. Find every sequence of five sequential tails and record the value of the next flip. Print a count of 6thflipheads and 6thfliptails.
Admin
Really missing my point, and just being unneccessarily rude to boot. I guess that pretty much sums up the internet.
Welcome to our next segment called "REALLY"
You are REALLY saying that if I were in a situation where I was out of a job, responsible for a mortgage and feeding 3 kids, myself, and my wife, and I was in a job interview for a company I wanted to work for, if I don't walk out when a person asks me a riddle I'm spineless? REALLY? Cause most people would consider that being a responsible adult. But you would just walk out. REALLY? Cause feeding your kids is less important than taking a moral stand on riddles in interviews. REALLY?
I'd like to take a stand and say that riddles in interviews are a very valuable tool. I would say, if absolutely nothing else it will get this a$$hat and other a$$hats like him to leave so that you can focus your time on candidates that might actually be ok to work with and help in creating a civilized workplace.
Admin
Admin
He is right and wrong.
Let me explain my point another way. The gambler is taking the previous 7 spins, 4 red 3 black and betting on black. This doesn't work in reality. and he is a fool.
My statements are different as I am talking about series. Giving the equal probability of one of two values, what are the chances that you will get three in a row, now four in a row, etc. The probability keeps getting lower. If you have 4 reds in a row, then bet black, because the chances of a 5 run series is very low. once you break the series by getting a black, all bets are off and you wait for the next series. Go ahead and run the simulation, wait for three in a row before betting the opposite color and see how often you win and lose.
This is what applies to the hat question. What are the odds that the group got three in a row, only 25%, even though an individuals chances of getting one or the other was 50%. We can extrapolate further and say we have four people, one of them sees three hats of the same color, what are the odds the group got four in a row? I think we agree that it is not 50%.
Admin
I would say I didn't forget the no communicating thing, but rather am enforcing it in other ways. Thus the rooms in separate buildings, nothing in the rooms but..., etc.
But good point, might as well state it explicitly.
Admin
Admin
Admin
Admin
For the simulation, you win as often as you lose. But if you get different results, lets see your program and results. :P
If you have four people in the hat game, and you see that three of them have blue hats, you say red. What is the probability that there were four blue hats? Exactly the same probability that you have a red hat while the others have a blue one.
Admin
You're wrong. This does not apply to the hat question at all, because the strategy is in choosing the guesser(s), not just in choosing the color. In your situation, you are guessing a coin flip only on the last time, so the strategy is not the same.
(is probably feeding the troll)
Admin
Admin
Admin
For all of you who get trapped by the gambler's fallacy, I've got some extra news to disappoint you. Roulette wheels are not 100% random. Indeed, they are good at generating random numbers, but will have very slight biases. This means on several thousand spins of the wheel, you may see a few extra occurances of one number, and fewer of another. To take advantage of this you shouldn't bet on the unseen values, but rather on the values that occur most often.
Admin
I understand what you are saying, and I think you know what I am saying. I think this calls for a true test of hypotheses which I can not do at this time, so I will have to concede by simply saying we disagree on this point. I will say that eventually I will run this through a simulator and IF i am correct I know what I am betting on next time I hit the casino. problem is, series really do not happen that often.
Admin
Instead of bothering with the work, why not perform a simple Google search and realize your 'hypotheses' has been proven wrong many times over.
Admin
Admin
The odds of 5 reds in a row, prior to starting, is 1:32. However, this is only because the odds of the first 4 all being red is 1:16, and the odds of a 5th red is 1:2.
You have already "beaten the odds", so to speak, for the 1:16 on the 4 reds in a row. At this point, the odds of the next being red is still 1:2.
These all ignore the green slot(s) for the sake of simplicity in the arguments. In reality, it's not 1:2 but 18:37 or 18:38.
5050. This is not the same. Yes, the odds of allthesame are 1:4. The odds of you having the opposite color, if both of the others have the same, is still 1:2. The reason for the 3:4 win scenario is the fact that 50% of the time, you won't see two of the same color, leaving only a 25% chance of a wrong guess. Wrong. If the player sees 3 of the same, the odds of his being the same is still 50%Admin
I like where you're going with this. But what I'd do, is arm my three guys with machetes. Within 30 seconds of walking into the room, if anyone sees a red hat, he yells "Pass!", and we all jump in the chopper. Then we fire the rockets, exploding the wall, and the guy with the blue hat grabs the 3 million. Then we fly into the sunset, pausing only to machinegun "ytb" to death. "JESUS CHRIST", we'll scream, "WHY DIDN'T YOU ACTUALLY READ THE DAMN PROBLEM/COMMENTS??"
Admin
I got a 100 random numbers 0  100 from random.org
The number following a series of three zeros: 0: 3 times 1: 2 times The number following a series of three ones: 0: 5 times 1: 4 times
Taken as a whole, the probability of a sequence of a digit predicting the result: 50%
Admin
You are falling into the trap. The chances of getting 5 in a row given that you already have 4 in a row are exactly 50%
The exact combination "RRRRR" is just a probable as "RRRRB" and also just as probable as "RBBRR" The only reason the first example is interesting is that the human mind is tuned to recognize patterns.
What has happened in the past has now bearing on what will happen in the future.
What is happening in the hat question is something very different. The problem is that we tend to look at the problem from the view of a single observer. From the point of view of 1 player, there is always a 50% chance of me getting it right  regardless of what the other two hats are. However, there is a 50% chance that player 2 will nullify my answer with a wrong guess bringing the group's chances down to 25%. There is a further 50% chance that the third player will nullify the result, bringing the total probability down to 12.5%.
This leads to the first pass solution which is B & C STFU and let me take the 50% guess.
If I see RR I'll guess Blue. The two possible results are RRB and RRR, so my guess is still 50%, and what I see has no bearing on my single outcome.
Now look at the total solution space. There are 4 cases where I will venture a guess at 50% probablity, and 4 cases where I will STFU. This gives me a 75% chance of making a correct contribution towards the total aggregate answer and a 25% chance of making a wrong contribution. The other two players are presented with the same odds. What makes it work is the unique situation that if I guess wrong (RRR or BBB), then EVERYONE guesses wrong. So the overall chance of anyone in the group making a wrong guess is exactly the same as any individual making a wrong guess or 25%. Which leaves the remaining 75% for being not wrong, and winning.
All I can think of during this discussion is True, False, FileNotFound.
Admin
But this is where the three hats thing comes in. The guy that sees 2 hats of the same color bets on the opposite color. He is right 75% of the time.
This seems to prove my theory but I understand that there is one defined difference, in this case we forced a series by saying that only the guy that sees it answers. If we picked a guy at random, we would have to hope he is the one that sees the series and in that case, this could fail miserably.
Admin
Captcha: sanitarium. Very appropriate, because this thread is driving me a bit crazy, I'm afraid.
Admin
Whoa. New level of stupid detected.
Admin
Any individual person has a roughly equal chance of being right or wrong.
What allows the group to win more than chance levels is the strategy of when a person is going to answer. That is why they do not answer half the time.
Admin
Apologies to Jack. I didn't mean to get entangled in a personal war. The events of the day got to me, and now that I've had a breather, I can see I was a bit meanspirited in my responses.
Admin
I wouldn't say he's stupid. He's just got one of his axioms wrong.
Kattman's problem is that he views the so called "Law of Averages" as both a law, and as prescriptive where in fact it is not a law, and it is descriptive.
If you take the LoA as a law, then his logic makes perfect sense.
So many (even smart) people have made this mistake that it has been given the formal name "Gambler's Fallacy"
Admin
Let's say you spin a roulette wheel three times. Here are the possible outcomes.
rrr rrb rbr rbb brr brb bbr bbb
You have a 1/8 chance of spinning each of these. After you spun the wheel twice you have "rr". That leaves you with the third spin making it either "rrb" or "rrr". You now have a 1/2 chance of spinning each of those.
Admin
Admin
Man ok, I have to concede on this one, a million test cases fully random, with verifiable code. If I waited for the series and bet I still win about half the time, not more than half.
I have to admit it is confusing, and I now know the difference.
Given a set of three what are the odds that at least one of them will be different? 75% Given two values that are similar what are the odds the next one is different? 50% These two questions are subtly different, but therein lies the trap I fell into. The tree hats question and the rules don't apply because of this difference.
Admin
Admin
So you seriously walked out of an interview because they asked you that $30/$2/$27 question?
Surely you've looked it up by now. Why do you think it's a bad test of someone's analytical thinking? It's only a few sentences, you can do some math if you like, and eventually narrow it down so the sentence "where did the $1 go?" is shown to be a fallacy.
I mean, I guess it's a "trick" question, but I think if you work through it you automatically catch the trick, which is the point...
Admin
[quote user="Ken"][quote user="Undefined Reference"][quote user="KattMan"][quote user="Tom Dibble"]I mean seriously, flip a coin 5 times and get 5 tails, you next flip still has a 50% probability of either heads or tails, but the law of averages states it will probably be heads.[/quote]
Fortune cookie says you best to avoid casino in future.
Seriously, there is a reason casinos hand out cards for people to track which numbers have come up in roulette.
Independence means independence. Run a simulation if you doubt this fact.[/quote] Here are the specs for the simulation:
Simulate a coin flip a billion times. Find every sequence of five sequential tails and record the value of the next flip. Print a count of 6thflipheads and 6thfliptails.[/quote]
Sequence length from 2 to 10, guessing, on any occurring sequences of the same value, that the following value will be the opposite one:
I have to admit that this is sobering. The "law of averages" is a compelling fallacy.
Admin
Wait. Where is the dollar? I was hoping someone would post the solution but I haven't seen it. j/k
Admin
It's all good. I didn't mean to get into an argument either, or to be rude to anyone. I didn't intend for anyone to take it personally. I'm sure you know how many of the people that talk a big game on a message board can't cowboy up in real life, right?
Admin