• Look at me! I'm on the internets (unregistered) in reply to tastey
    tastey:
    M.G.:
    It reminds me of the people who can't accept that .99999999... (repeats forever) is exactly equal to 1.
    Right, just like 1 over infinity equal nullity! And for the record .999999... (repeating ad infinitum) does not equal 1, but is close enough for all practical (and most impractical) purposes.

    tastey can apply for a tuition refund as well.

  • DavidN (unregistered)

    This is the most hilariously depressing thread I've ever seen. I think some sort of congratulations is in order.

  • Undefined Reference (unregistered) in reply to rbanzai
    rbanzai:
    If I was presented with one of these fucking riddles on a job interview I would get up and walk out.

    If an interviewer is too stupid to come up with a real-world what-if and has to resort to riddles, I do not want to work for them.

    It's not a fucking game. When I've had to interview people I can do it just fine without asking "What have I got in my pockets?"

    Job interviews are not mazes with cheese in them. Either interview people like a professional or become a puppeteer if you like watching people dance on a string.

    What if studies found that candidates passing a specific test were deemed to be more valuable to the company who hired them.

    Game or not, it is reasonable for the company to ask you to submit to this exam for employment, as it decreases their risk.

    If you choose not to take the test, thats fine. But the company is not doing anything wrong or unprofessional by using the tools at their disposal to make a good hire.

    Either you can't get past the fact the problems are silly and seemingly unrelated, you suck at puzzles, or you've had experiences with people who you wouldn't have like even if they didn't give you a puzzle.

    As to the usefulness of using such puzzles... well, I'll wait for the research studies to pass judgment on their effectiveness. But I don't find people using them unreasonable for doing so.

  • (cs) in reply to Undefined Reference

    This thread is an amazing goldmine of stupid. I've switched my opinion from disgust to awe.

    And I can't believe no one thought of just yelling out everyone else's hat color. I mean, it's not communicating, you're just yelling out loud, not to anyone in particular!!

  • hmmmm... (unregistered) in reply to zip
    zip:
    This thread is an amazing goldmine of stupid. I've switched my opinion from disgust to awe.

    And I can't believe no one thought of just yelling out everyone else's hat color. I mean, it's not communicating, you're just yelling out loud, not to anyone in particular!!

    ah, sweet irony :-P

  • (cs) in reply to zip
    zip:
    This thread is an amazing goldmine of stupid. I've switched my opinion from disgust to awe.

    And I can't believe no one thought of just yelling out everyone else's hat color. I mean, it's not communicating, you're just yelling out loud, not to anyone in particular!!

    Talk about stupid. Bad zip, no millions for you!

  • Ken (unregistered) in reply to zip
    zip:
    This thread is an amazing goldmine of stupid. I've switched my opinion from disgust to awe.

    And I can't believe no one thought of just yelling out everyone else's hat color. I mean, it's not communicating, you're just yelling out loud, not to anyone in particular!!

    I suggested that some time back. Of course, I remembered to include numerous smileys to remove any doubt about how serious I was.

  • Tom Dibble (unregistered) in reply to Anonymous Coward

    Probably already answered, but with 500+ responses I'm just going to spill it anyway:

    The other folks' hat colors are only relevant if there is a measurable predominance of one color, indicating a non-even coin-flipping odds.

    So, one person (picked at random and in secret so that the runners of this contest can't rig it) looks around the room. If he sees more red hats, he guesses red; if he sees more blue hats then he guesses blue. If he sees exactly one more of one color than the other then he assumes that the "no impact on other flips" thing is incorrect and guesses the less-seen color.

    Gives just a scootch better than 50% chance of winning, moreso the less even the coin "toss".

  • (cs) in reply to Tom Dibble
    Tom Dibble:
    Probably already answered, but with 500+ responses I'm just going to spill it anyway:

    The other folks' hat colors are only relevant if there is a measurable predominance of one color, indicating a non-even coin-flipping odds.

    So, one person (picked at random and in secret so that the runners of this contest can't rig it) looks around the room. If he sees more red hats, he guesses red; if he sees more blue hats then he guesses blue. If he sees exactly one more of one color than the other then he assumes that the "no impact on other flips" thing is incorrect and guesses the less-seen color.

    Gives just a scootch better than 50% chance of winning, moreso the less even the coin "toss".

    Yep you failed too. The proper strategy gives you a 75% chance to win. It is posted many times in the thread with the proof.

  • Grumpy Young Man (unregistered) in reply to rbanzai
    rbanzai:
    If I was presented with one of these fucking riddles on a job interview I would get up and walk out.

    If an interviewer is too stupid to come up with a real-world what-if and has to resort to riddles, I do not want to work for them.

    It's not a fucking game. When I've had to interview people I can do it just fine without asking "What have I got in my pockets?"

    Job interviews are not mazes with cheese in them. Either interview people like a professional or become a puppeteer if you like watching people dance on a string.

    Wow, depriving those fools the privilege of paying you money and the chance to put up with your tantrums. You sure showed them who's boss!

  • smile (unregistered) in reply to vertagano
    vertagano:
    I would contact the state Board of Barber and Cosmetologist Examiners, with whom all barbers must registers, and ask them for a count. I suspect they can give a speedy answer
    Hah! "speedy answer" You make me laugh.
  • Cin (unregistered)

    I only read page one, but the fact that no one seems to understand how the game works is apparent with regard to the hats. You don't use probability, and if you think you do, then you have no idea how to properly solve the problem.

    There are 3 people and only 2 hat colors. It is IMPOSSIBLE for there to be a different hat on each head, so here's what you decide beforehand: If the other two guys each have a different hat, pass. At least one person MUST see the other two wearing the same hat. So if 2 of them pass, the third has the color he doesn't see. If no one says anything after a few seconds, they all have the same hat color.

    Problem solved.

    And no, I've never heard it before. It took me about 30 seconds to figure out, because unlike all of you, I read the rules, which say that yelling out the wrong color is an instant loss. So the only thing you can safely say is "Pass" without losing. Hence, that's the keyphrase you use to tell the others about it. It's simple deductive reasoning, and THAT'S what the riddle is trying to draw out from you.

    Whether it makes you a better programmer, or worker, I don't know, but not all of the riddles are absurd situations (like the airplane one, and the bike one).

  • (cs) in reply to smile
    smile:
    vertagano:
    I would contact the state Board of Barber and Cosmetologist Examiners, with whom all barbers must registers, and ask them for a count. I suspect they can give a speedy answer
    Hah! "speedy answer" You make me laugh.
    If they don't respond quickly, you can sue them for failure to respond in a timely manner to a Freedom of Information request. No need to laugh.
  • Owen (unregistered) in reply to Anonymouse
    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.

  • (cs) in reply to anony coward
    anony coward:
    substitute poor grasp of english with different understanding of a non-formally stated case, and you've got it. case 1:

    (all players) [ (all guess at once) || (pass [all remain silent] ) ]

    in this case no one may remain silent. (cause that is the way this case is understood by the applicant.)

    case 2: (apparently the correct understanding)

    any player [ (guess) || (remain silent) ]

    I assume you're just trolling now. But the key word is simultaneous. If you don't guess when everyone else guesses, you are implicitly passing. You can't say a color or pass before or after everyone SIMULTANEOUSLY answers.

  • Cin (unregistered)

    Wow, I just realized that I misread the question as well XD

    If you have to answer simultaneously, then yeah, I don't think there's a reliable way to do it.

  • (cs) in reply to rbanzai
    rbanzai:
    If I was presented with one of these fucking riddles on a job interview I would get up and walk out.

    If an interviewer is too stupid to come up with a real-world what-if and has to resort to riddles, I do not want to work for them.

    It's not a fucking game. When I've had to interview people I can do it just fine without asking "What have I got in my pockets?"

    Job interviews are not mazes with cheese in them. Either interview people like a professional or become a puppeteer if you like watching people dance on a string.

    Yes, everyone is out to get you and control you. Also the sky is falling.

    It's easy to test whether someone can code. By your complaining and whining, I would assume you are not happy about having your problem-solving abilities tested for a reason.

  • Patrick McCormick (unregistered) in reply to Cin
    Cin:
    I only read page one, but the fact that no one seems to understand how the game works is apparent with regard to the hats. You don't use probability, and if you think you do, then you have no idea how to properly solve the problem.

    There are 3 people and only 2 hat colors. It is IMPOSSIBLE for there to be a different hat on each head, so here's what you decide beforehand: If the other two guys each have a different hat, pass. At least one person MUST see the other two wearing the same hat. So if 2 of them pass, the third has the color he doesn't see. If no one says anything after a few seconds, they all have the same hat color.

    Problem solved.

    And no, I've never heard it before. It took me about 30 seconds to figure out, because unlike all of you, I read the rules, which say that yelling out the wrong color is an instant loss. So the only thing you can safely say is "Pass" without losing. Hence, that's the keyphrase you use to tell the others about it. It's simple deductive reasoning, and THAT'S what the riddle is trying to draw out from you.

    You've given the correct answer to the wrong riddle. The fact that you got confused probably means you are lying and have heard it before.

  • Grandpa (unregistered) in reply to Cin
    Cin:
    I only read page one, but the fact that no one seems to understand how the game works is apparent with regard to the hats. You don't use probability, and if you think you do, then you have no idea how to properly solve the problem.

    There are 3 people and only 2 hat colors. It is IMPOSSIBLE for there to be a different hat on each head, so here's what you decide beforehand: If the other two guys each have a different hat, pass. At least one person MUST see the other two wearing the same hat. So if 2 of them pass, the third has the color he doesn't see. If no one says anything after a few seconds, they all have the same hat color.

    Problem solved.

    And no, I've never heard it before. It took me about 30 seconds to figure out, because unlike all of you, I read the rules, which say that yelling out the wrong color is an instant loss. So the only thing you can safely say is "Pass" without losing. Hence, that's the keyphrase you use to tell the others about it. It's simple deductive reasoning, and THAT'S what the riddle is trying to draw out from you.

    Whether it makes you a better programmer, or worker, I don't know, but not all of the riddles are absurd situations (like the airplane one, and the bike one).

    I'm sorry. You, like many others in this thread, fail. Perhaps you should go re-read the problem? It might also be helpful to look up the definition to the word "Simultaneously". While you are at it, I would also look up "No" and "Communication".

  • Anonymous Coward (unregistered) in reply to s
    s:
    Once they have had a chance to look at the other hats, the players must [ (simultaneously guess the color of their own hats) OR (pass) ]

    or

    Once they have had a chance to look at the other hats, the players must simultaneously [ (guess the color of their own hats) OR (pass) ]

    This is the source of all the misunderstandings.

    Yes, except that one of these interpretations is obviously stupid. If for some reason you thought it was the first case, the "everyone pass" option is obviously a 100% loser. And "everyone guesses" is also obviously a 1/8 chance of winning. Since this game is ridiculous, clearly the question means the other style.

    AN:
    Nope... Not right.. However you look at it or however you want to think about it, the chances are 50%. No matter what colour the others are wearing, you will only have a 50% chance of winning, i.e. using your logic if the others are all wearing 'BLUE' then there is 50% chance that all of you will shout out 'RED' or 50% chance only you will shout out 'RED' and win. Without any communication you cannot get a probability of higher than 50%

    As people have pointed out over and over again, yes, your personal chances are 50% because your hat is independent. However, the winning strategy structures it so that all three players shout out the wrong answer in the same case (all one color), while the right answer is spread over the 2-1 possibilities (which happen 3/4 of the time).

  • (cs) in reply to Cin
    Cin:
    I only read page one, but the fact that no one seems to understand how the game works is apparent with regard to the hats. You don't use probability, and if you think you do, then you have no idea how to properly solve the problem.

    There are 3 people and only 2 hat colors. It is IMPOSSIBLE for there to be a different hat on each head, so here's what you decide beforehand: If the other two guys each have a different hat, pass. At least one person MUST see the other two wearing the same hat. So if 2 of them pass, the third has the color he doesn't see. If no one says anything after a few seconds, they all have the same hat color.

    Problem solved.

    And no, I've never heard it before. It took me about 30 seconds to figure out, because unlike all of you, I read the rules, which say that yelling out the wrong color is an instant loss. So the only thing you can safely say is "Pass" without losing. Hence, that's the keyphrase you use to tell the others about it. It's simple deductive reasoning, and THAT'S what the riddle is trying to draw out from you.

    Whether it makes you a better programmer, or worker, I don't know, but not all of the riddles are absurd situations (like the airplane one, and the bike one).

    Actually you have the solution, but you missed the truth of the results. If all three have the same hat color then by your process all three say the opposite color. This is the only losing situation.

    I bet if you thought for 35 seconds you would have found this part out and realized that yes, it comes down to a 75% chance of winning using this strategy.

  • (cs) in reply to akatherder
    I assume you're just trolling now. But the key word is simultaneous. If you don't guess when everyone else guesses, you are implicitly passing. You can't say a color or pass before or after everyone SIMULTANEOUSLY answers.

    I don't think they're trolling. I think they're actually right on.

    English is naturally ambiguous, especially written English. If it weren't for that, our computers would be much better at understanding plain language commands.

    Let's say the goal is to pick a red apple or banana. Have I specified the color of the banana? Or was I just clarifying that a yellow or green apple would not suffice?

    To be honest, it wasn't until I saw others' answers that I realized that it was intended that of an instant the three participants would say one of three things: "red", "blue", or "pass".

  • M.G. (unregistered) in reply to Look at me! I'm on the internets
    Look at me! I'm on the internets:
    Anonymous:
    count = 0; for(i = 0; i < 32; i++) { count += (integer >> 1) & 1; }

    Constant time, and therefore O(n). Remember, since the size of the integer is constant, so is the running time.

    Freaking brilliant! I can now do a Dykstra's algorithm in constant time because the number of nodes in the graph is fixed when I start the problem.

    Used to take O(n^3).

    I would suggest you get a refund from your university.

    Captcha - burned

    I think you mean Dijkstra, as in Edsger Dijkstra.

  • Tom Dibble (unregistered) in reply to Tom Dibble

    At which point I failed because I missed the first part of the question wherein three people walked in, not a large group ...

  • poindexter (unregistered) in reply to vertagano
    vertagano:
    English is naturally ambiguous, especially written English. If it weren't for that, our computers would be much better at understanding plain language commands.

    Let's say the goal is to pick a red apple or banana. Have I specified the color of the banana? Or was I just clarifying that a yellow or green apple would not suffice?

    To be honest, it wasn't until I saw others' answers that I realized that it was intended that of an instant the three participants would say one of three things: "red", "blue", or "pass".

    While English is commonly ambiguous, there are certain contextual norms that still apply. In your apple/banana example, it is generally understood that you meant [red apple] or [banana] (unless you perhaps live in an area where red bananas are common). In the red/blue/pass riddle however, it should be commonly understood as [simultaneously provide an answer from the set {red, blue, pass}] simply based on the concept of the game.

  • (cs) in reply to Tom Dibble
    Tom Dibble:
    At which point I failed because I missed the first part of the question wherein three people walked in, not a large group ...

    Not to mention, the law of averages state that if there are only two equal possibilities and you see a larger group of one, you would be better off assuming you are in the lesser group.

    It is not guaranteed to win but your overall chances are higher due to balance over time. 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.

    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.

  • M.G. (unregistered) in reply to rbanzai
    rbanzai:
    If I was presented with one of these fucking riddles on a job interview I would get up and walk out.

    Don't let the door hit you in the ass on the way out.

  • (cs) in reply to s
    s:
    zip:

    FAIL

    "What does simultaneously mean"

    ahahahahah yeah that's real ambiguous

    Once they have had a chance to look at the other hats, the players must [ (simultaneously guess the color of their own hats) OR (pass) ]

    or

    Once they have had a chance to look at the other hats, the players must simultaneously [ (guess the color of their own hats) OR (pass) ]

    This is the source of all the misunderstandings.

    "simultaneously ... OR ..."?? That's nonsense. Literally.

  • Undefined Reference (unregistered) in reply to KattMan
    KattMan:
    Tom Dibble:
    At which point I failed because I missed the first part of the question wherein three people walked in, not a large group ...

    Not to mention, the law of averages state that if there are only two equal possibilities and you see a larger group of one, you would be better off assuming you are in the lesser group.

    It is not guaranteed to win but your overall chances are higher due to balance over time. 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.

    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.

    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.

  • Look at me! I'm on the internets (unregistered) in reply to M.G.
    M.G.:
    Look at me! I'm on the internets:
    Anonymous:
    count = 0; for(i = 0; i < 32; i++) { count += (integer >> 1) & 1; }

    Constant time, and therefore O(n). Remember, since the size of the integer is constant, so is the running time.

    Freaking brilliant! I can now do a Dykstra's algorithm in constant time because the number of nodes in the graph is fixed when I start the problem.

    Used to take O(n^3).

    I would suggest you get a refund from your university.

    Captcha - burned

    I think you mean Dijkstra, as in Edsger Dijkstra.

    I did, but I've been trained not to use i and j close together as it can be confused in some fonts.

  • Look at me! I'm on the internets (unregistered) in reply to KattMan
    KattMan:
    Tom Dibble:
    At which point I failed because I missed the first part of the question wherein three people walked in, not a large group ...

    Not to mention, the law of averages state that if there are only two equal possibilities and you see a larger group of one, you would be better off assuming you are in the lesser group.

    It is not guaranteed to win but your overall chances are higher due to balance over time. 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.

    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.

    Another one for the refund line.

    My god, do people even take math these days?

  • riaa (unregistered) in reply to Look at me! I'm on the internets
    Look at me! I'm on the internets:
    KattMan:
    Not to mention, the law of averages state that if there are only two equal possibilities and you see a larger group of one, you would be better off assuming you are in the lesser group.

    It is not guaranteed to win but your overall chances are higher due to balance over time. 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.

    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.

    Another one for the refund line.

    My god, do people even take math these days?

    If you are suggesting KattMan is wrong, I suggest you are the one needing a refund.

  • Undefined Reference (unregistered) in reply to riaa
    riaa:
    Look at me! I'm on the internets:
    KattMan:
    Not to mention, the law of averages state that if there are only two equal possibilities and you see a larger group of one, you would be better off assuming you are in the lesser group.

    It is not guaranteed to win but your overall chances are higher due to balance over time. 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.

    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.

    Another one for the refund line.

    My god, do people even take math these days?

    If you are suggesting KattMan is wrong, I suggest you are the one needing a refund.

    KattMan is wrong.

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

    Go educate yourself.

  • (cs) in reply to Undefined Reference
    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%.

  • hk0 (unregistered) in reply to riaa

    [quote user=Look at me! I'm on the internets] If you are suggesting KattMan is wrong, I suggest you are the one needing a refund. [/quote]

    Holy christ. HOLY CHRIST.

    Are you people all devoid of understanding of probability and statistics? How did you make it through college? (Oh wait... LIBERAL ARTS DEGREES)

    If you get 5 heads in a row... there's no point switching to guessing tails for the next flip. It's just as likely to be another head. 50%! No more, no less.

    Easy simulation that even you Visual Basic retards can understand:

    Generate a very, very long sequence of rando ones and zeros. Copy and paste an implementation of the Merseinne Twister.

    Now: search for every occurence of five {Heads, Zeros, Trues}. Now look at the very next letter/bit/boolean. Tally it.

    Run this test repeatedly.

    You'll find your tallys are about even. Completely contrary to what KattMan said.

  • Undefined Reference (unregistered) in reply to KattMan

    Wrong. That is called the gamblers fallacy.

    Before you begin, you may expect that there will be an approximately even number of red and black numbers that come up (disregarding the green numbers of course).

    After a run of a color, you will still expect that in the future, you will have the same number of red and black numbers come up.

    In practical terms this means that overall, you expect the distribution to average closer to 50% ( the average of 50% and 100% is closer to 50% than 100% is - law of averages).

    What it does not mean is that the next number is more likely to be the opposite color. You don't expect the wheel to suddenly bring the distribution to even out.

    Your understanding is exactly why casinos hand out tracking cards. It encourages people to think that this is indeed a fact, and that they have better odds through this tracking.

  • Look at me! I'm on the internets (unregistered) in reply to riaa
    riaa:
    Look at me! I'm on the internets:
    KattMan:
    Not to mention, the law of averages state that if there are only two equal possibilities and you see a larger group of one, you would be better off assuming you are in the lesser group.

    It is not guaranteed to win but your overall chances are higher due to balance over time. 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.

    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.

    Another one for the refund line.

    My god, do people even take math these days?

    If you are suggesting KattMan is wrong, I suggest you are the one needing a refund.

    Kattman is introducing theory that is completely irrelevant to the problem at hand.

    Run a simulation: 1)prime the solution by flipping and counting h & t a sufficient number of times (say 11) 2) guess the next flip based on prior results. 3) flip, right++ or wrong++ and h++ or t++ depending on the result 4) loop from 2) for 10000 iterations.

    at the end of the day, right ~= wrong which is the same result as blind guessing.

    For better results, don't guess on even numbered flips so that h != t and you are never doing a blind guess.

    Of course, you'll need a proper monte carlo library for randomization.

    Kattman's statement "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. " is completely wrong. It even has the name "Gambler's Fallacy."

    The chance of flipping heads is ALWAYS 50% on an honest coin. (ignoring the infinitesimal chance of it landing on edge.)

    Kattman also used the term "Law of Averages," A law which does not in fact exist in mathematics.

  • Look at me! I'm on the internets (unregistered) 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%.

    First of all, you are forgetting the green zero, but that's forgivable.

    "but statistically it is a 75% chance it will land on black," Wrong. Wrong and Wrong. There is a 50% chance that it will land on black.

  • (cs) in reply to Undefined Reference
    Undefined Reference:
    riaa:
    Look at me! I'm on the internets:
    KattMan:
    Not to mention, the law of averages state that if there are only two equal possibilities and you see a larger group of one, you would be better off assuming you are in the lesser group.

    It is not guaranteed to win but your overall chances are higher due to balance over time. 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.

    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.

    Another one for the refund line.

    My god, do people even take math these days?

    If you are suggesting KattMan is wrong, I suggest you are the one needing a refund.

    KattMan is wrong.

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

    Go educate yourself.

    No I am not wrong within the context of the question of hats. Pay close attention to the graph displayed on the page. it is only when you get to large occurances that the law of averages tends to zero out. When working with a finite set, in this case three, the law of averages does work. Note the graph, before the first flip it is 0, after the first flip which is tails it goes to 1, meaning it expects the next flip to be heads. It is only after the occurances increase that it flattens to zero. The gamblers problem is he is trying to all previous attempts into concideration. I admitted it is flawed but stated that all things being equal, you will eventually get the other value.

  • Another Anon Coward (unregistered) in reply to Anonymous Coward
    Anonymous Coward:
    the player should settle with one of the players that each of them says the different color and split the money after the game. So you have 100% chance to win the half of the money.If the interview is for Microsoft, than you can say that you will fuck up you fellow player after the game and took all the money.

    That doesn't even make any sense. Does anyone actually read the problem? Anyone?

    I'm beginning to think at least half of the 50%/stealth-communicate/rule-misunderstanding answers on this thread are trolls trying to antagonize the rational folk.

    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.

  • Undefined Reference (unregistered) in reply to KattMan
    KattMan:
    Undefined Reference:
    riaa:
    Look at me! I'm on the internets:
    KattMan:
    Not to mention, the law of averages state that if there are only two equal possibilities and you see a larger group of one, you would be better off assuming you are in the lesser group.

    It is not guaranteed to win but your overall chances are higher due to balance over time. 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.

    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.

    Another one for the refund line.

    My god, do people even take math these days?

    If you are suggesting KattMan is wrong, I suggest you are the one needing a refund.

    KattMan is wrong.

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

    Go educate yourself.

    No I am not wrong within the context of the question of hats. Pay close attention to the graph displayed on the page. it is only when you get to large occurances that the law of averages tends to zero out. When working with a finite set, in this case three, the law of averages does work. Note the graph, before the first flip it is 0, after the first flip which is tails it goes to 1, meaning it expects the next flip to be heads. It is only after the occurances increase that it flattens to zero. The gamblers problem is he is trying to all previous attempts into concideration. I admitted it is flawed but stated that all things being equal, you will eventually get the other value.

    Still no.

    Lets go back to the hats. You see two hats the same color. By your logic, the chance my hat is the other color is greater than 50%.

    But this is not so. For my hat is chosen independently of the other hats. Given that a coin has already flipped HH, then the sequence HHH and HHT are equally likely.

  • Tom Dibble (unregistered) in reply to JL
    JL:
    You can actually do it quicker by splitting it into 3 groups. The 8 coin thing is deliberately misleading to make you think of splitting into 2 groups, but you should be able to do it with just two weighings if you split into three. Still, I'd give bonus points for using the term "binary sort".
    This only works in the case where you know if the odd coin is lighter or heavier. If you check the post above, it could be either, in which case splitting into three groups does not help you: if the one of the weighed groups is heavier, it does not tell you which of the two has the odd coin, so you may need to do more weighing (2-4 weighings total). So in this instance, binary search is the optimal solution.

    Binary search (weigh first four versus second four; take lighter of two and weigh 2 vs 2; if one lighter sub-group is lighter, weigh the coins against each other and pick lightest; if each lighter sub-group is identical then odd coin is in heavier group, so weigh that 2:2, then weigh heavier group's coins and pick the heaviest.) leads to 3 weighings if the coin is lighter, or 4 weighings if the coin is heavier.

    Can't see a more efficient route given the problem defined here using binary search. Leads to 50% 3, 50% 4.

    A ternary-search would take three groups (first three, second three, and last two), weigh the first two of them. If the two groups weighed identically then you know the odd coin is in the third group (weigh coin 7 against one of the others; if it is the same weight then the coin 8 is the odd one: answer in 2 weighings). If the two groups are weighted differently (define that 1+2+3 > 4+5+6; swap the two groups around if necessary here), then you know the odd coin is in your group of 6. Divide that group into three (1+2, 3+4, 5+6). Weigh 1+2 versus 5+6. If they weigh the same, then weigh 3 versus 1: if it is the same then 4 is odd; otherwise 3 is odd: answer in three weighings. If 1+2 != 5+6 then you have a problem of 4 (and 1+2 will always be > 5+6). Weigh 1:2: The heavier is the odd one in three weighings. If 1==2 then weigh 5:6: the lighter is the odd one in four weighings.

    So, while a ternary search wouldn't get you there any faster in all cases, it would improve your results in some cases. If the odd coin is at position 7 or 8 then we'd find it in 2 weighings. If the odd coin is in position 3 or 4 or is heavier then we'd find it in 3 weighings. If the odd coin is lighter and not in position 3 or 4 or 7 or 8 then we'd find it in 4 weighings. 25% would take 4; 50% would take 3; 25% would take 2.

    Next, try a quad-search. Group as 1+2, 3+4, 5+6, 7+8. Weigh 1+2 vs 3+4. If same, we know the answer is in the other half; redefine 5/6/7/8 as 1/2/3/4 and repeat this weighing. If different then we know the odd coin is in this half. Define the heavier of the quads as 1+2 and the lighter as 3+4. Weigh 1+5 vs 2+6. If they are the same, then repeat with 3+5 and 4+6. If 1+5 < 2+6 then 2 is the odd (heavy) coin; otherwise 1 is. Reversed logic when weighing 3+5 : 4+6.

    Ends up with the same distribution as the ternary search (25% 4; 50% 3; 25% 2), but if you have an idea that the coin is lighter or heavier you can tweak the algorithm to get 50% 2 / 50% 3.

    At least, that's my off-the-cuff answer :)

  • (cs)

    Just for the sake of argument, which of these is the most likely occurrence in 10 spins of the roulette wheel?

    bbbbbbbbbb or rrrrrrrrrr or rrrrrbbbbb or rbrbrbrbrb or brbbrbrrbbr

    Most people would pick one of the last two since it gives you a 50% distribution of blacks and red. The last one is especially enticing because it looks random-ish.

    Of course, there is an exactly equal probability of any of them occurring.

  • Patrick McCormick (unregistered) in reply to KattMan
    KattMan:
    Undefined Reference:
    riaa:
    Look at me! I'm on the internets:
    KattMan:
    Not to mention, the law of averages state that if there are only two equal possibilities and you see a larger group of one, you would be better off assuming you are in the lesser group.

    It is not guaranteed to win but your overall chances are higher due to balance over time. 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.

    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.

    Another one for the refund line.

    My god, do people even take math these days?

    If you are suggesting KattMan is wrong, I suggest you are the one needing a refund.

    KattMan is wrong.

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

    Go educate yourself.

    No I am not wrong within the context of the question of hats. Pay close attention to the graph displayed on the page. it is only when you get to large occurances that the law of averages tends to zero out. When working with a finite set, in this case three, the law of averages does work. Note the graph, before the first flip it is 0, after the first flip which is tails it goes to 1, meaning it expects the next flip to be heads. It is only after the occurances increase that it flattens to zero. The gamblers problem is he is trying to all previous attempts into concideration. I admitted it is flawed but stated that all things being equal, you will eventually get the other value.

    The real WTF is that I haven't quit my job and opened up a casino... apparently.

  • Tom Dibble (unregistered) in reply to Undefined Reference
    Undefined Reference:
    Still no.

    Lets go back to the hats. You see two hats the same color. By your logic, the chance my hat is the other color is greater than 50%.

    But this is not so. For my hat is chosen independently of the other hats. Given that a coin has already flipped HH, then the sequence HHH and HHT are equally likely.

    However, if you are seeing two hats of the same color then you have applied selection to the game board, which is why that strategy wins 75% of the time.

    While the "game" (coin flip) is still random, the game board is not (only play when the other two have the same hat color). This doesn't mean that the "game" will be won more than 50% of the times it is played; it means the "game" will be won 75% of the possible times for it to be played.

  • Another Anon Coward (unregistered) in reply to Ken
    Ken:
    amandahugginkiss:
    Right now I'm testing software from a programmer who doesn't understand his clients. He's wasting time on minor shit that the customers don't care about, and the primary function the customers want is "ah, no-one really cares about that". Programmers with a superiority complex need to be shown the door.

    Of course, the same can be said for customers with a superiority complex as well.

    [snip]

    Unfortunately, it was something like a $20K sale, and sales decided "the customer is always right".

    Well, the customer IS always right. That doesn't mean that the customer is always reasonable or correct. It means that it's the customer who's providing the money, and obtaining that money is the only goal in business. If that means you give in to unreasonable requests, then that's what it means.

    That's too whorish for a lot of left-brained techies to whom being mathematically correct is the only thing that counts, but that's also why so few successful business are run by techies.

  • Jack (unregistered)

    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.

    There will be a fourth building with three rooms. One room will contain A's hat and a camera pointed at it. One room will contain B's hat and a camera pointed at it. The last will have C's hat and a camera pointed at it. The color of each persons hat is determined by a completely random 50% probablity decider to be either red or blue.

    Back to the three people. Once the hat colors are chosen, their monitors will each show the color of the other two people's hats. That is, A's monitors will show B's hat and C's hat. B's monitor will show A's hat and C's hat. etc.

    After a given amount of time, say one minute, they must write on their paper the color they guess their hat to be (red or blue), or pass. Once I have all their papers I will determine if any guessed correctly or incorrectly. If at least one person guessed correctly and no-one guessed incorrectly they will split some large amount of money. This is a one time thing. If they all pass, there is no round two. They simply don't get the money.

    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?

    And for the record I agree and understand the 75% acurate solution. It seemed counter intuitive at first but is actually neat.

    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. They have been in interviews where asking riddles is the thing to do. They have learned by example. They ask you a riddle. That communicates nothing to you about how good of a company that place is to work for. That just tells you something about that individual. I interviewed with and went to work for a company named after a river in brazil. On the phone screens I was asked some riddle type questions. I answered as best I could and got an in person interview. I ended up getting the job and didn't work with anyone that phone screened me. My point? Who cares if they were ammateur interviewers that didn't know what they were doing? I didn't even end up working with them.

  • Look at me! I'm on the internets (unregistered) in reply to Patrick McCormick
    Patrick McCormick:
    The real WTF is that I haven't quit my job and opened up a casino... apparently.

    Let's do it! Kattman can come play.

  • Another Anon Coward (unregistered) in reply to rbanzai
    rbanzai:
    If I was presented with one of these fucking riddles on a job interview I would get up and walk out.

    It's not a fucking game.

    But it IS a fucking game. All you people getting mad at the interviewer are forgetting one thing -- your competition, the OTHER applicants, among whom will undoubtedly be someone who impresses the interviewer with his or her approach to the game.

    And all you such people are forgetting another important thing -- the point of the game is to win (i.e. get a job offer, which you can then evaluate and turn down or accept), not to be self-righteous.

    captcha = tacos, and even someone who sells tacos for a living knows the importance of winning over being right.

  • Tom Dibble (unregistered) in reply to KattMan
    KattMan:
    Tom Dibble:
    At which point I failed because I missed the first part of the question wherein three people walked in, not a large group ...

    Not to mention, the law of averages state that if there are only two equal possibilities and you see a larger group of one, you would be better off assuming you are in the lesser group.

    It is not guaranteed to win but your overall chances are higher due to balance over time. 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.

    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.

    If you flip a coin ten times and get "heads" each time, the next time you flip it you will probalby get "heads" too. In the real world there is no such thing as perfectly equal possibilities; if a particular thing keeps happening then it is likely because something (the "tail" side of the coin being heavier, for instance) causing it to happen.

    Take it this way: you know on average a programmer can accomplish a particular task in one day. You have given a particular programmer a similar task four times, each of which times he has completed it in 2 days instead of 1. Will you then expect him to complete the next task in 0 days, 1 day, or 2 days? I'd expect 2, because the "law of averages" doesn't apply to individual tests!

    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?

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

Log In or post as a guest

Replying to comment #:

« Return to Article