• M.G. (unregistered) in reply to Another Anon Coward
    Another Anon Coward:
    I actually don't think anyone's trolling. The sad situation is that there are way too many morons who program for a living. And a good half of those are bitter because their huge sense of entitlement can't comprehend what reality tells them over and over: that they are teh sux.

    They are to true programmers what a typist is to a writer.

    captcha = paint, which I suppose I just did.

    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).

  • riaa (unregistered) in reply to Undefined Reference
    Undefined Reference:
    KattMan is wrong.

    http://en.wikipedia.org/wiki/Law_of_averages

    Go educate yourself.

    You of course are correct but I remain adamant that you are wrong.

  • riaa (unregistered) in reply to Tom Dibble
    Tom Dibble:
    If that cuts too close to the bone: on average, money lent out gets returned with interest. You have lent money to your brother 3 times, and he hasn't paid you one red cent back. Is it a good idea to lend him money again?
    Yes, because someday he'll hit that Jackpot and we'll both win it bigtime!
  • n00bie (unregistered) in reply to Patrick McCormick
    Patrick McCormick:
    TimS:
    Really, it's the approach that you're trying to see, not the answer. If someone shouts out the answer immediately, and recites the answer, as memorized, from a book of problems, that's an immediate check in the "no" column for me. On the other hand, if they have a good idea as to how the problem needs to be solved, that's a check in the "yes" column.

    So someone who has a very good idea about how to go about solving the problem and happens to already know the answer anyway is going to get 'an immediate check in the "no" column".

    Smart...

    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.

  • (cs) in reply to Tom Dibble

    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?).

  • Look at me! I'm on the internets (unregistered) in reply to akatherder
    akatherder:
    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?).

    You forgot the major external factor to programmer productivity: Is there a fight on Fark/Slashdot/WTF/Digg?

  • TimS (unregistered) in reply to atari

    @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.

  • Fazed (unregistered) in reply to KattMan
    KattMan:
    First spin lands on red, second spin lands on red. What do you think the third spin has a higher statistical chance of landing on? The probability is still 50%, but statistically it is a 75% chance it will land on black, so bet black.
    Wrong. The probability that it will land on black is 50%. The sequences RRR and RRB have the exact same probability. In fact, it is just as likely that the ball will land on 50 reds in a row as it is to land on any specific combination of red and black.

    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.

  • OutsideInwards (unregistered) in reply to Jack
    Jack:
    And to all the people saying if they were asked a riddle they would get up and walk out, you are lying. It is easy to say that now, but what if you had been laid off, needed a job, etc? And you are really going to judge a whole company based on the interviewing practices of one person there? In my experience, it is an interview "loop" of like 5 people, some of which are just peons you "might" have to work with or direct.
    One person, you, unwilling to walk-out on such an interview does not a world of spineless cowards make. I have been in the position you describe, and I did get up and walk out on the interview. Granted, I didn't get up immediately upon hearing a stupid brainteaser, but I did what most people would do in this situation, at least, most people who claimed they would get up and walk out of such an interview. I asked how such a question related to my expected duties of the job I was applying for. The answer I received was something to the effect that only geniuses could hope to answer correctly, and they were only looking for geniuses. I laughed (because it wasn't a ridiculously difficult question), stated the answer, and said they were obviously not the company I was looking for. For the curious, the "brainteaser" I got was: 3 men are attending a Sales Conference, but the hotel has only 1 room available. They agree to share the room and ask the attendant what the price is. "$30" replied the attendant. So, each person chipped-in $10 for the room and on they went. The attendant realized the room should have been only $25 because of the conference, and gives $5 to the bellboy to deliver to the men. On his way, the bellboy realizes that $5 can't be split evenly between 3 people, so he pockets $2 and gives each of the men $1 back. So, now the men have each spent $9 ($10 - $1) on the room for a total of $27, plus the $2 the bellboy kept makes $29. The men originally spent $30, so what happened to the extra dollar? *sigh* ... only "geniuses" can get that?
  • Mike Spellman (unregistered) in reply to Anonymous Coward

    You've obviously never managed and hired people or never done it well.

  • Mike Spellman (unregistered) in reply to Anonymous Coward

    You've obviously never managed and hired people or never done it well.

  • Ken (unregistered) in reply to KattMan
    KattMan:
    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.
    I guess you failed probability?

    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 50-50 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.

    If you disagree, then think about the ramifications, if I flip 5 tails, then for each tail I flip there is a lower chance of flipping heads until my chances of flipping heads reach null and that coin will always be tails.

    Taken individually, yes there is a pure 50% chance, taken collectively, these probabilities become skewed.

    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 50-50 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 50-50?

  • Anonymouse (unregistered) in reply to Owen
    Owen:
    Anonymouse:

    Also, the mass of a 747 can be estimated by towing the plane via a spring scale at constant acceleration (then perhaps at constant speed to measure any friction and compensate). I wouldn't be surprised if that's actually done at airports all the time.

    My idea of measuring the individual tire pressures and multiplying by the rectangular surface areas touching the ground is a much more practical solution. I assume they measure the tire pressures before each flight anyway.

    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.

  • atari (unregistered) in reply to TimS
    TimS:
    @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.

    You are the one who said that would be an immediate "NO". While behaviors are changing since the brainteaser thing is becoming more and more commonplace from what I've seen, the standard behavior I've seen when people are confronted with a brainteaser they've already heard is to simply blurt out the answer. If your position is to immediately mark them in the NO category simply because of this, that is your perogative (spelling?) but please don't hold it against me that I don't want to work for the kind of asshole who jumps to conclusions on invalid assumptions. Now, if your strategy is to say "here's a brainteaser where we want to see how you work your way through it to solve, and please let me know if you've already heard it", then that is a different story (and one you didn't relate).

  • MrBubble (unregistered) in reply to nini

    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.

  • Ken (unregistered) in reply to Undefined Reference

    [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 6th-flip-heads and 6th-flip-tails.

  • Jack (unregistered) in reply to OutsideInwards

    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.

  • Ken (unregistered) in reply to Jack
    Jack:
    Here is my attempt to remove as much ambiguity from the hat question as possible.

    There are 3 people, call them A,B, and C. They are going to be put in isolated rooms in separate buildings the only contents of which are two monitors, a piece of paper, and a pencil. [...] The understand these rules and have been allowed to meet and discuss a strategy before this takes place. I am allowed to monitor this discussion and do anything I can to attempt to foil their plans as long as I keep the decision of the hat colors random and follow all other rules I have dictated. That is, if they decide to use cell phones I will search them first and take cell phones, use a jammer, etc.

    Is there any ambiguity left in that?

    You forgot the "no communication of any form" part of the rule, which is why you are allowed to confiscate their cell phones.

  • (cs) in reply to riaa
    riaa:
    Undefined Reference:
    KattMan is wrong.

    http://en.wikipedia.org/wiki/Law_of_averages

    Go educate yourself.

    You of course are correct but I remain adamant that you are wrong.

    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%.

  • Jack (unregistered) in reply to Ken

    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.

  • YourMoFoFriend (unregistered) in reply to Jack
    Jack:
    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?

    Got to love that new "REALLY" bit from SNL. Awesome stuff. And so is this post. Thank you.

  • OutsideInwards (unregistered) in reply to Jack
    Jack:
    Really missing my point, and just being unneccessarily rude to boot.
    Pot. Kettle. You started by calling me a liar. I responded by pointing out that I had been in the exact position you claimed would show that someone like me was lying. And then you followup by being continuing overbroad stereotypes by stating everyone who would walk out of an interview because of a brainteaser is an asshole. Wow, talk about being an insenstive, spineless clod!
  • Ken (unregistered) in reply to OutsideInwards
    OutsideInwards:
    I have been in the position you describe, and I did get up and walk out on the interview. ... I asked how such a question related to my expected duties of the job I was applying for. The answer I received was something to the effect that only geniuses could hope to answer correctly, and they were only looking for geniuses.
    I hereby submit that you did not, in fact, walk out because you were asked such a question. Rather, you walked out because they claimed that the reason for asking such a question was that "only geniuses could hope to answer correctly".
  • Undefined Reference (unregistered) in reply to KattMan
    KattMan:
    riaa:
    Undefined Reference:
    KattMan is wrong.

    http://en.wikipedia.org/wiki/Law_of_averages

    Go educate yourself.

    You of course are correct but I remain adamant that you are wrong.

    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%.

    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.

  • Patrick McCormick (unregistered) in reply to KattMan
    KattMan:
    riaa:
    Undefined Reference:
    KattMan is wrong.

    http://en.wikipedia.org/wiki/Law_of_averages

    Go educate yourself.

    You of course are correct but I remain adamant that you are wrong.

    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%.

    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)

  • OutsideInwards (unregistered) in reply to Ken
    Ken:
    I hereby submit that you did not, in fact, walk out because you were asked such a question. Rather, you walked out because they claimed that the reason for asking such a question was that "only geniuses could hope to answer correctly".
    While true, I would have also simply walked out had they not provided any reason.
  • Fazed (unregistered) in reply to KattMan
    KattMan:
    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.
    True, but only from the starting point. The probability of getting three in a row of a particular color is 1/8. After the first two items in the series have been decided (as Red, for example), the probability that the next one will also be Red, thus giving you three in a row, is now 1/2. In other words, the probability of three in a row was 1/8, but it has changed to 1/2 because of the previous results. This is the nature of independent events.
    If you have 4 reds in a row, then bet black, because the chances of a 5 run series is very low.
    No, the chances of 5 in a row were low, before you started. The chances are now 1/2.
    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.
    50%, of course. This is basic probability.
    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%.
    Before the assignment of hats, the probability of 4 in a row was 1/8. After seeing that three hats are the same color, the probability of getting 4 in a row is 50%. This is the Monty Hall problem.
  • XenonXavior (unregistered)

    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.

  • (cs) in reply to Fazed
    Fazed:
    KattMan:
    If you have 4 reds in a row, then bet black, because the chances of a 5 run series is very low.
    No, the chances of 5 in a row were low, before you started. The chances are now 1/2.
    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.
    50%, of course. This is basic probability.

    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.

  • Patrick McCormick (unregistered) in reply to KattMan
    KattMan:
    Fazed:
    KattMan:
    If you have 4 reds in a row, then bet black, because the chances of a 5 run series is very low.
    No, the chances of 5 in a row were low, before you started. The chances are now 1/2.
    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.
    50%, of course. This is basic probability.

    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.

    Instead of bothering with the work, why not perform a simple Google search and realize your 'hypotheses' has been proven wrong many times over.

  • (cs) in reply to Patrick McCormick
    Patrick McCormick:
    KattMan:
    Fazed:
    KattMan:
    If you have 4 reds in a row, then bet black, because the chances of a 5 run series is very low.
    No, the chances of 5 in a row were low, before you started. The chances are now 1/2.
    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.
    50%, of course. This is basic probability.

    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.

    Instead of bothering with the work, why not perform a simple Google search and realize your 'hypotheses' has been proven wrong many times over.

    Because I could probably find as many hits that prove my theory correct. I would HAVE to test it myself to find the truth.

  • Ken (unregistered) in reply to KattMan
    KattMan:
    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.
    Correct so far.
    If you have 4 reds in a row, then bet black, because the chances of a 5 run series is very low.
    Wrong!

    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.

    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.
    50-50.
    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%.
    This is not the same. Yes, the odds of all-the-same 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.
    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%.
    Wrong. If the player sees 3 of the same, the odds of his being the same is still 50%
  • ZergMortron (unregistered) in reply to ytb
    ytb:
    3 men and hats ... at the initial strategy session you tell everyone that if they see two hats of different colours , they are to say "PASS" within 30 seconds of entering the room.

    If you hear 1 pass , then your hat is the same colour as the person who said pass , If you hear two passes , then your hat is the opposite colour of the other two who have the same ...

    If you hear no "passes" then you all have the same colour .

    Easy . and 100% correct ..

    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??"

  • Undefined Reference (unregistered) in reply to KattMan
    KattMan:
    Fazed:
    KattMan:
    If you have 4 reds in a row, then bet black, because the chances of a 5 run series is very low.
    No, the chances of 5 in a row were low, before you started. The chances are now 1/2.
    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.
    50%, of course. This is basic probability.

    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.

    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%

  • Look at me! I'm on the internets (unregistered) in reply to KattMan
    KattMan:
    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.

    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.

  • (cs) in reply to Ken
    Ken:
    Wrong. If the player sees 3 of the same, the odds of his being the same is still 50%

    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.

  • Fazed (unregistered) in reply to KattMan
    KattMan:
    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'll do you one better. I whipped up a quick Java program to simulate any number of coin tosses, look for arbitrary-length runs of either heads (true) or tails (false), and record the number of times the subsequent flip was heads or tails. Simulating 1,000,000 flips found 713,508 runs of thee heads. The runs were followed 356,510 times by another heads, and 356,998 by tails. I'll give you the code so you can test it yourself, if you wish:
    public class Test {
    
    private static final int NUM_ITERATIONS = 10000000;
    private static final int MAX_REPEATS = 3;
    private static final boolean REPEAT_TYPE = true;
    
    public static void main(String args[]) {
    
    	
    	java.util.Random rand = new java.util.Random();
    	int i = 0;
    	int repeat_count = 0;
    	int num_repeats = 0;
    	int true_after_repeat = 0;
    	int false_after_repeat = 0;
    	boolean flip;
    
    
    	for (i = 0; i < NUM_ITERATIONS; i++) {
    		flip = rand.nextBoolean();
    
    		if (repeat_count >= MAX_REPEATS) {
    			if (flip)
    				true_after_repeat++;
    			else
    				false_after_repeat++;
    
    			num_repeats++;
    			
    			if(flip == REPEAT_TYPE)
    				repeat_count = 1;
    			else
    				repeat_count = 0;
    
    		} else {
    			if(flip == REPEAT_TYPE)
    				repeat_count++;
    			else
    				repeat_count = 0;
    		}
    	}
    	System.out.println("Strings of " + REPEAT_TYPE + " of length " + MAX_REPEATS + " seen: " + num_repeats );
    	System.out.println("Next flip was true " + true_after_repeat + " times" );
    	System.out.println("Next flip was false " + false_after_repeat + " times" );
    }
    

    }

    Captcha: sanitarium. Very appropriate, because this thread is driving me a bit crazy, I'm afraid.

  • (cs) in reply to KattMan
    KattMan:
    Undefined Reference:
    KattMan:
    Taken individually, yes there is a pure 50% chance, taken collectively, these probabilities become skewed.

    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.

    I doubt it highly, unless the roulette wheel in rigged.

    Think about this, Forget the numbers, we are talking just red and black spots. There is a 50% chance it will be either red or black, not a problem, place a bet on either you have the same chances.
    Now instead of placing a bet, watch the wheel. First spin lands on red, second spin lands on red. What do you think the third spin has a higher statistical chance of landing on? The probability is still 50%, but statistically it is a 75% chance it will land on black, so bet black. The only time this fails is if the wheel is rigged. It isn't a guaranteed win but the odds do favor the choice of black on the third spin. Is it possible I will lose and the wheel lands on red? Yes, even if not rigged, but I would bet black again, knowing that due to statistics and all things being equal black will come up to balance the odds back to 50%.

    Whoa. New level of stupid detected.

  • Undefined Reference (unregistered) in reply to KattMan
    KattMan:
    Ken:
    Wrong. If the player sees 3 of the same, the odds of his being the same is still 50%

    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.

    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.

  • OutsideInwards (unregistered) in reply to OutsideInwards

    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 mean-spirited in my responses.

  • Look at me! I'm on the internets (unregistered) in reply to zip
    zip:

    Whoa. New level of stupid detected.

    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"

  • (cs)

    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.

  • Aboyd (unregistered) in reply to SchmoieJoe
    SchmoieJoe:
    Aboyd:
    KattMan:
    You almost got it

    Put on A and B, have sex with 1. Remove B, have sex with 2. Turn B inside out, have sex with 3.

    You almost got it, too. While your answer protects from STDs, it is suboptimal, as it requires the man to unnecessarily double-up the condom usage, resulting in poor stimulation. The optimal answer is:

    Put on A, have sex with 1. Remove A, put on B, have sex with 2. Turn A inside out, place it over B, have sex with 3.

    In this fashion, the man only has to wear 2 layers of condoms for the final sex act, rather than the 1st and 3rd.

    Your penis is welcome.

    Your modification introduces fluid transfer from the guy to girl #3. If the goal is safe sex - or even just preventing pregnancy - that's a no-no.
    Huh? How? The guy is wearing both condoms, and the "exposed" sides have not touched multiple partners. How in the world is girl #3 exposed?

  • (cs) in reply to Fazed
    Fazed:
    KattMan:
    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'll do you one better. I whipped up a quick Java program to simulate any number of coin tosses, look for arbitrary-length runs of either heads (true) or tails (false), and record the number of times the subsequent flip was heads or tails. Simulating 1,000,000 flips found 713,508 runs of thee heads. The runs were followed 356,510 times by another heads, and 356,998 by tails. I'll give you the code so you can test it yourself, if you wish:

    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.

  • Aboyd (unregistered) in reply to Aboyd
    Aboyd:
    Huh? How? The guy is wearing both condoms, and the "exposed" sides have not touched multiple partners. How in the world is girl #3 exposed?
    Nevermind, I suddenly got it. Excellent. Thanks!
  • (cs) in reply to OutsideInwards
    OutsideInwards:
    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 mean-spirited in my responses.

    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...

  • (cs) in reply to Ken

    [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 6th-flip-heads and 6th-flip-tails.[/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:

    $ ./testrand -r 1000000000
    Running...
    Result: (49.9997% ones)
    2: 49.9991% correct guesses (out of 1000000000 occurrences)
    3: 50.0005% correct guesses (out of 500008976 occurrences)
    4: 50.0019% correct guesses (out of 250001802 occurrences)
    5: 49.9981% correct guesses (out of 124996040 occurrences)
    6: 49.9938% correct guesses (out of 62500353 occurrences)
    7: 49.994% correct guesses (out of 31254046 occurrences)
    8: 49.997% correct guesses (out of 15628900 occurrences)
    9: 49.9881% correct guesses (out of 7814926 occurrences)
    10: 49.983% correct guesses (out of 3908391 occurrences)
    

    I have to admit that this is sobering. The "law of averages" is a compelling fallacy.

  • Jack (unregistered) in reply to zip

    Wait. Where is the dollar? I was hoping someone would post the solution but I haven't seen it. j/k

  • Jack (unregistered) in reply to OutsideInwards

    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?

  • OutsideInwards (unregistered) in reply to zip
    zip:
    So you seriously walked out of an interview because they asked you that $30/$2/$27 question?
    Yes. Brainteasers generally only test your ability to "spot the stupid trick".
    zip:
    Surely you've looked it up by now.
    I didn't need to look up the answer. I've known the answer since I took pre-algebra.
    zip:
    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...

    Better than asking me some stupid brainteaser, ask me a realistic hypothetical situation (preferably one recently encountered by the group). My experience has shown that companies that enjoy using brainteasers and riddles in their interview process also like using vague language in determing such things as performance and job expectations, salary and bonus structures, and other such things so that they can screw you over without having to explicitly explain why. If that means I happen to pass over an excellent opportunity because I don't want to be tested by brainteasers, then so be it. I don't think I've missed out on any such opportunity yet though.

Leave a comment on “Job Interview 2.0: Now With Riddles!”

Log In or post as a guest

Replying to comment #:

« Return to Article