• DavidL (unregistered) in reply to DavidN

    While everything you say is true, ironically enough it lies upon the basic assumption that it is equally likely (50/50) that you will get a blue hat or a red hat.

    When it is equally likely, the method of guessing the opposite color if you see two similarly colored hats does yield a 75% success rate.

    However, if it is not equally likely that each individual will get either a red or a blue hat.. then this reasoning breaks down.

    For example, the extreme case where the box filled with hats to be used in this little game contains (n-1) blue hats and only 1 red hat for a large value of n.

    So for say example n=10^30.

    Any arrangement possibility with two or more red hats disappear, leaving only 4 possibilities, all 4 of which will result in at least two people seeing two hats of the same color. While 3 of these possibilities will win by guessing the opposite color (75% of the possibilities still), they will not "Win" 75% of the time because each possibility does not have the same probability.

    So in this extreme situation you should switch your guess to the same color if you see both hats are the same, and guess (50/50) in the extremely unlikely and damn near impossible scenario that you see a mix.

    The interesting thing I think is at what point moving from an initially even distribution of hats with random selection toward the extreme unbalanced distribution of hats with random selection that the proper course of action changes.

    DavidN:
    Well, I wasn't going to get into this again, but you seem fairly reasonable, so...

    Each coin toss and hat colour is definitely independent of the others, yes - the "law of averages" argument about the coin tossing around page 8 or so is the other half of why this thread caused me to repeatedly bang my head off the desk. But the hats problem isn't as simple as that - it's changed because of the third option of not guessing at all, and the consequences of making a wrong guess against not guessing at all.

    Without being able to communicate once you can see each other's hats, you need to decide on the conditions under which you're going to make a guess first. Once you make that guess, you're only going to have a 50-50 chance of being right, naturally. And if you only guess the opposite colour when you see two hats of the same colour:

    1 2 3 O O O - All guess and are wrong. X O O - #1 guesses "X" and is right. O X O - #2 guesses "X" and is right. O O X - #3 guesses "X" and is right. X X O - #3 guesses "O" and is right. X O X - #2 guesses "O" and is right. O X X - #1 guesses "O" and is right. X X X - All guess and are wrong.

    This gives a correct answer for six out of the eight possible situations. You personally only have a 50/50 chance of being right when you make your guess, but there is a 6 in 8 chance of a situation coming up where this strategy will produce the right answer for all three.

  • JOjO (unregistered) in reply to Aboyd

    The individual who said no this can't be done is not paying attention to the answer. You should read it again. Guy 2 has not aquired an STD from Guy 1 because the first guy gave him a condom B that was worn over condomA, so it is contaminated with girl 1 STD but not Guy 1 STD because of the condomA that was on underneith condomB. Then when Guy 1 gives Guy 2 condom A Guy 2 is already wearing condom B which protects him from Guy 1's STD on condom A.

  • Jim L. (unregistered) in reply to Grandpa

    Back in my college days, I heard of a few tactics used by medical school interviewers. For example, one interviewer asked a potential candidate to open the window to get some fresh air. Secretly, he nailed the window shut to watch the candidate struggle.

    Another interview, the interviewer walked out of his office (where he was conducting the interview) and called his phone from the outside office. He let it ring and ring until the candidate picked it up. When the candidate answered, the interviewer yelled to the candidate (via the phone): "Why are you answering my phone!?". Talking about strange interview situations.

  • help!!! (unregistered) in reply to Bezalel

    how many quarters does it take 2 reach the top of the empire state building?

  • Ano Nymous (unregistered)

    It's tragically hilarious to see an article bashing puzzle type interview questions, and then the comment section is full of people demonstrating exactly why such questions are useful. So many people fail at high school level probability theory or even simple reading of instructions yet fancy that shouldn't affect their chances of being coders.

    And the article itself presents a "solution" that involves, effectively, killing a man because he can't walk as fast as the others. If I was the interviewer my next question after that would be "get out of here you psychopathic piece of s**t before I call the cops".

  • John Brad (unregistered) in reply to Mark

    Gee, just did an estimate to your silly question without looking at your answer and came up with 32,000 barbershops. The best answers I googled were in the 40,000 to 50,000 range.

    Interesting that both are results are so close to each other and to the 'correct' answer.

    I guess the point of the question was to see if you could come up with a reasonable answer to a question with very limited information. Seems you did. Did you get the job?

  • KaBlah (unregistered) in reply to Ano Nymous
    Ano Nymous:
    If I was the interviewer my next question after that would be "get out of here you psychopathic piece of s**t before I call the cops".

    That's not a question. And if someone asks a silly question they shouldn't get upset by an equally silly answer. GIGO.

  • (cs) in reply to help!!!
    help!!!:
    how many quarters does it take 2 reach the top of the empire state building?
    Belated response: 148, I just looked it up. 22 bucks for the first elevator, another 15 for the second one. Ignoring the spire, of course, which you can't reach. I doubt they'd be terribly happy with you paying in quarters, though; you might want to convert them to dollars first.
  • Robert (unregistered) in reply to Anonymous Coward

    Have person 1 face left if person 3's hat is red Have person 2 face left if person 1's hat is red Have person 3 face left if person 2's hat is red Otherwise everyone should face left...or maybe in stead of deciding a facing there is some other clue which is not communication and such that each person can determine the color of their own hat.

  • Robert (unregistered) in reply to Jim
    Jim:
    Talchas:
    For the hat thing: Assuming that you aren't allowed to communicate in any way (including pointing, jumping up and down, and so on) and that you can't see your own hat and so on, then the best you can do is have one person guess for 50/50. You have no matter what a 50/50 chance of guessing your hat color - the problem says you have a 50% chance of red, a 50% chance of blue, and learning about what others have does NOT tell you anything. All those who think otherwise have not learned probability.

    Agreed. Everyone who has been saying that you have a 75% chance of winning is incorrect. In fact, what people are calculating is that, on average, 75% of the hat outcomes will be two same colour, one different. Once the three hats have been picked, there is still only a 50% chance that you will guess your hat correctly because of the coin toss. The optimal solution is still "two people pass, one person guesses", but everyone has been calculating the win probability incorrectly.

    No, the probability for each person is .5 but once you have multiple people the odds change, see: http://en.wikipedia.org/wiki/Monty_Hall_problem

    Given three people, who are each unique the results can be 2^3 = 8

    1. rrr -- They All say blue and lose
    2. rrb -- Only person 3 says blue and wins
    3. rbr -- Only person 2 says blue and wins
    4. brr -- Only person 1 says blue and wins
    5. rbb -- Only person 1 says red and wins
    6. brb -- Only person 2 says red and wins
    7. bbr -- Only person 3 says red and wins
    8. bbb -- They All say red and lose

    Each of the above is equally likely... and each person gets the red 4 out of 8 times and blue the other 4.

    Each person will answer in half (4 of the 8)the cases, and in two of those they lose and two of them they win, but out of the 8 cases, only 2 are losers and the other 6 are winners, so 6/8 or 3/4 odds of everyone winning

  • Richard (unregistered) in reply to Grandpa

    As the hats are randomly allocated, and there is no communication allowed between the players, none of the players can ever have any information about his own hat. (There is no way to send in-band or out-of-band messages between players). So, the best strategy is for one player to take a wild-guess (50% chance of winning), and for the other players to pass (they can only lose the prize, not gain it). Before the game, the players should agree which one will guess, and which two will pass.

    [Of course, if one of them has a watch with a shiny face, or wears glasses, or there is any kind of reflecting object (or perhaps he can stand right under a light-bulb and see the diffuse colour on the ceiling, then the player who is guessing might be able to improve his guess].

  • next_ghost (unregistered)

    Actually, the hats problem can be answered correctly in 87.5% cases (7/8) if you break color symmetry.

    Round one: If you can see two red hats, say "blue", otherwise pass. Round two: If you can see a red hat, say "blue", otherwise pass. (If you were red, you wouldn't get to round two.) Round three: You all have blue hats. Say it.

    The only case where this fails is when all three hats are red.

  • Chuck Lester (unregistered) in reply to help!!!
    help!!!:
    how many quarters does it take 2 reach the top of the empire state building?

    I think 80, as the elevator fee to the observatory is about $20

  • David Soussan (unregistered) in reply to Adam Z

    Adam, you forgot the bit about no one guessing wrong.

    Statistically, the best chance is if only 1 person guesses and the other 2 pass. Then there is a 50% chance of winning the money. If 2 guess the odds drop to 25% while all 3 guessing makes it almost certain that they will lose.

  • David Soussan (unregistered) in reply to Eggtastic
    Eggtastic:
    vt_mruhlin:
    Saladin:
    Quick. Given eight quarters -- one weighing more or less than the rest -- and a balance scale, if you were faced with the task of figuring out which was the odd coin out using the fewest weighings possible, what would you do?

    Obviously, I pocket the quarters and leave this stupid interview, giving me enough change to buy a Coke and pay the highway toll on the way to my next (hopefully better) job interview.

    I actually saw a good discussion of this one, and how that particular example can be used to guage programming skills. Correct solution was to do a binary sort on on. Put 4 coins on each side of the scale, discard the lighter half, weigh the remaining 4, then weigh the remaining two.....

    Course the person who answers that correctly probably just heard it before. Nobody thinks about weighing quarters that fast.

    And yet the solution you cited is less than optimal. Does it make you a bad programmer that you did not recognize that? Probably not. It just means you never had someone goad you on asking if you can think of a better way. That is the reason these brain teasers are at best tangentially related to programming skill.

    What this one has so far proved is that most people can not read the instructions: surely an essential skill for a programmer. The question states -- one weighing more OR less than the rest -- so you can never know which 4 to discard.

    weigh any 2 against each other = 1 if they are the same put them on the same side and weigh against any other 2 = 2 if the are the same, discard 2 and weigh another 2 = 3 now you know which 2 the odd coin is in weigh 1 against 1 of the control coins = 4 now you know which is the odd coin

    That is the worst case scenario so 4 is the maximum weighing neccessary. If the balance tips any earlier then you will have identified the pair the odd coin is in and one more weighing will suffice, so 2 and 3 are also possible.

    And no, I've never seen this one before.

  • David Soussan (unregistered) in reply to David Soussan
    David Soussan:
    Eggtastic:
    vt_mruhlin:
    Saladin:
    Quick. Given eight quarters -- one weighing more or less than the rest -- and a balance scale, if you were faced with the task of figuring out which was the odd coin out using the fewest weighings possible, what would you do?

    Obviously, I pocket the quarters and leave this stupid interview, giving me enough change to buy a Coke and pay the highway toll on the way to my next (hopefully better) job interview.

    I actually saw a good discussion of this one, and how that particular example can be used to guage programming skills. Correct solution was to do a binary sort on on. Put 4 coins on each side of the scale, discard the lighter half, weigh the remaining 4, then weigh the remaining two.....

    Course the person who answers that correctly probably just heard it before. Nobody thinks about weighing quarters that fast.

    And yet the solution you cited is less than optimal. Does it make you a bad programmer that you did not recognize that? Probably not. It just means you never had someone goad you on asking if you can think of a better way. That is the reason these brain teasers are at best tangentially related to programming skill.

    What this one has so far proved is that most people can not read the instructions: surely an essential skill for a programmer. The question states -- one weighing more OR less than the rest -- so you can never know which 4 to discard.

    weigh any 2 against each other = 1 if they are the same put them on the same side and weigh against any other 2 = 2 if the are the same, discard 2 and weigh another 2 = 3 now you know which 2 the odd coin is in weigh 1 against 1 of the control coins = 4 now you know which is the odd coin

    That is the worst case scenario so 4 is the maximum weighing neccessary. If the balance tips any earlier then you will have identified the pair the odd coin is in and one more weighing will suffice, so 2 and 3 are also possible.

    And no, I've never seen this one before.

    With a bit more thought you can get it down to a guaranteed 3 using a binary split.

    wiegh 2 on each side, now you know which 4 it is in = 1 put 1 in each side, now you know which pair it is in = 2 one more weighing to identify the odd man out = 3

    but that is always 3 with no chance of the minimum 2

  • P (unregistered)

    The light bulb problem isn't that much of a stretch. It is really a test of a person's practical analytic skills. The 74 though, that is one annoying question. I remember seeing something very similar in Jr. High, but it involved an elephant rather than a plane.

  • fearless freelance (unregistered)

    Quote: ... the job will go to a candidate who manages to answer the question by designing an extremely overcomplicated solution for a completely non-existent problem. And that candidate will be the same person who designs their software.

    Which absolutely matches my experiance with corporate IT (working freelance for insurances, telecommunication, retail since several years)

    Captcha: vereor..... VERE! Or (pause) face the consequences !

  • Poncho (unregistered) in reply to ChameleonDave
    ChameleonDave:
    OK, I'm afraid I'm going to wade in. I know that several people have already pointed out the idiocy of the answers to the hat problem, but I just can't help echoing that sentiment. Some people are just incredibly stupid, ignorant, and arrogant with it.

    The obvious solution is, in the strategy session, to designate a person to choose a certain colour. The other people agree to shut up. The team therefore has a 0.5 chance of winning.

    ...

    In any case, the guess itself is always random.

    "Some people are just incredibly stupid, ignorant, and arrogant with it. "

    If you're calling people names, at least get your facts straight. You think you're good? Smarter? You think you can read wikipedia and feel you can insult other people who have better skills at problem solving/probabilities/etc?

    Your whole post is just fucking stupid. What's that nonsense of people seeing each other reactions? It's just a game, a HYPOTHETICAL game. Geez...

    After reading 19 pages of comments, there are still morons who insist that 50% chance of winning is the best one, coming up with forms of cheating/breaking the rules.... Just fucking unbelievable.

    So to make it clear: there is a strategy that gives you a 75% winning chance, explained over and over through this thread.

    /cuadruple facepalm

  • Cruddles (unregistered) in reply to Poncho

    Amazing how the hat thing has gone on for so long!

    If you need convincing: this is a site for coders; pick your favorite language, take a few minutes and write a program to see if the solution works.

    ./hats.rb 1000000
    win=750197 (75.0197%) lose=249803 (24.9803%)

  • Zak (unregistered) in reply to Me!
    Me!:
    Weigh a 747? Use load cells or strain gauges. Elegant, accurate and repeatable. If you didn't know that such things exist, you would be using a sub-optimal solution. So maybe the best answer would be to ask someone who knows how to arrive at the correct answer so you could do it properly the first time rather than reinventing the (irregularly shaped) wheel.

    Glad I read 7 pages into this thread to find this (and got 11 pages in before posting, so dunno if this has been added since).

    Having actually weighed 747s (and 767s, and A330s), this is precisely how it's done. There's one load cell for each wheel (18 on a 747), which we tow the aircraft up and onto (with cute little ramps). That and an audit of all the removable equipment on board (life jackets, torches/flashlights etc), and a very slow, very boring, very thorough drain of all the fuel tanks gives a good, accurate measure of the mass of that (actual, particular, unique) aircraft. None of our aircraft weighs the same as any other.

    The idea of a "weight sensor" on the aircraft makes me smile... 747s are barely a step up from steam locomotives in some of their technology. Very light, flying locomotives - granted. For instance, to check they're level (when jacking them up) we use no lasers, no gyros, no theodolites, nothing electronic: a plumb bob on some string.

    To "measure the area of contact the tyres make with the ground" would be... difficult. I'd be impressed if the calculated mass were within 5% (8 tonnes) of the actual mass.

  • ashish thapa (unregistered) in reply to Rodyland

    take the chicken first...come back...n u take the grains... leave the grains but bring the chicken back... now take the fox..come back n collect the chicken ... done..!! wow it was posted 5 years back n m answering it... lol :)

  • JohnR (unregistered) in reply to JL

    By grouping the coins into 3 groups, the minimum amount of tries would be 2. You first weigh the 2 groups of coins with 3 coins against each other. If both groups weigh the same, then you know the coin you're looking for is with the 3rd group. If one group is heavier, then you know which group the coin belongs to. Whichever group of 3 coins you've determined the coin belongs to, you then weigh two of those coins against each other. If they weigh the same, then it's the 3rd coin. If they don't, then you know which of those 2 coins you're looking for.

  • Reiko (unregistered)

    For some reason, I managed to read through this entire goddamn thread, and now I think I may have reached a new plane of enlightenment or something. My head feels slightly fuzzy, and my faith in humanity, and programmers in specific, has wavered significantly. I think I need to go lie down and never read another comment again.

  • My name (unregistered)

    As for bike for blind people... I'll advice M$ to make four wheel bike (two small wheels for stabilization) and sell it with license to ride only on specially desined Microsoft track where rails prevent them from crashing. Also they'll need to download software updates for built in M$-surface-bike-PC. They cannot see or use it but it can support sales of surface. It's a win-win-win plan, okay?

  • Bushuevttn (unregistered)
    Comment held for moderation.
  • Ruslanborse (unregistered)
    Comment held for moderation.
  • Chaplyginwds (unregistered)
    Comment held for moderation.
  • Pruinhvu (unregistered)
    Comment held for moderation.
  • Ruslanborse (unregistered)
    Comment held for moderation.
  • Ruslanborse (unregistered)
    Comment held for moderation.
  • MalvinMot (unregistered)
    Comment held for moderation.
  • MartinMot (unregistered)
    Comment held for moderation.
  • Ruslanborse (unregistered)
    Comment held for moderation.
  • Jimmyanten (unregistered)
    Comment held for moderation.
  • Ruslanborse (unregistered)
    Comment held for moderation.
  • Derekwaisy (unregistered)
    Comment held for moderation.
  • Ruslanborse (unregistered)
    Comment held for moderation.
  • Ruslanborse (unregistered)

    What's up, for all time i used to check website posts here early in the dawn, because i enjoy to find out more and more. look also at my pages and give a rating

    XEvil is an easy, speedy and convenient program for thoroughly automatic recognition and bypass of the overwhelming majority of captchas (CAPTCHAs), without the want to connect any third-social gathering products and services.

    This system Just about completely replaces providers including AntiGate (Anti-Captcha), RuCaptcha, DeCaptcher and others. Concurrently, it noticeably exceeds them in recognition speed (ten moments or maybe more) and is absolutely free.

    http://www.copya.com/bbs/board.php?bo_table=print_qna&wr_id=146974 speedindex https://www.aura-invest.com/bbs/board.php?bo_table=free&wr_id=2186834 speed up indexing windows 10

    @d@=

  • Brianciz (unregistered)

    In addition to their technological prowess, fast backlink indexing services also prioritize privacy and protection. With increasing fears more than data privateness and on line security, end users can rely on that their lookup queries and searching activity are managed Using the utmost confidentiality and integrity. By utilizing sturdy encryption protocols, details anonymization procedures, and stringent accessibility controls, fast url indexing companies make certain that consumer facts remains guarded always. fast indexing tool free One of the key characteristics of fast hyperlink indexing companies is their capacity to prioritize and index content dependant on relevance and significance. By analyzing various signals, such as social media marketing activity, consumer engagement metrics, and material freshness, these services can intelligently prioritize the indexing of content material which is more than likely to resonate with users. This dynamic method of indexing ensures that consumers are presented with articles that's not only well timed but also very suitable for their interests and Tastes. speed up search indexing

    =Q=

  • Ruslanborse (unregistered)

    It's actually a cool and useful piece of information. I am happy that you just shared this useful info with us. Please stay us up to date like this. Thanks for sharing. look also at my pages and give a rating

    XEvil is a straightforward, quickly and convenient application for entirely automated recognition and bypass of the vast majority of captchas (CAPTCHAs), without the need to attach any 3rd-occasion solutions.

    The program Practically completely replaces companies such as AntiGate (Anti-Captcha), RuCaptcha, DeCaptcher and Some others. Concurrently, it noticeably exceeds them in recognition velocity (ten instances or more) and is completely free of charge.

    https://wiki.baytanc.com/index.php/User:LorenRicketts SpeedyIndex google translate http://safeedu.kr/bbs/board.php?bo_table=free&wr_id=23072 fast indexing on windows 10

    @d@=

  • (nodebb)

    thanks for info

    Addendum 2024-06-11 01:21: Get ready to travel to a place where fantasies are unrestricted and desires are limitless. In the midst of the endless options available on the internet, I came across free porno , which is a refuge of pure decadence. Each movie on this site is a work of art, carefully chosen to arouse the senses and fascinate the intellect. A symphony of bliss is created when flawless streaming, infinite variety, and unmatched quality come together to produce an experience that goes beyond simple entertainment.

  • Douglastab (unregistered)

    pharmacie en ligne sans ordonnance https://kamagraenligne.shop/# pharmacie en ligne avec ordonnance

  • Riannglork (unregistered)

    How to hitch: You generally is a member of your armed service, employee of the qualified Affiliation or business enterprise, employee of particular US government companies, employee or volunteer within the American Pink Cross, resident of certain regions, or member of the family of anybody who falls into 1 of these teams. https://aliantcu.org/ - Alliant Credit Union

    A lot of credit unions are local institutions, which suggests they might not have quite a few branches or ATMs. If you already know you can expect to journey lots, or if you wish to financial institution in several states, you'll want to determine if your credit union avoids ATM costs by partnering with absolutely free ATM networks, gives branches outside of your condition, or has an settlement with other credit unions that could Allow you utilize their branches to bank. https://aliantcu.org/ - Alliant Credit Union

    Insider’s Choose Connexus Credit Union is highlighted in our best credit unions manual. It is a wonderful preference if you'd like to lender with an internet based credit union, and it pays aggressive curiosity fees on its accounts. https://aliantcu.org/ - Alliant CU login

    Connexus pays competitive rates, and its Connexus Xtraordinary Examining Account could get paid you a really significant price in case you make use of your debit card frequently and/or spend at the very least $400 a month with your debit card. https://aliantcu.org/ - Alliant CU login

    HELOC: With an Alliant HELOC, you may accessibility a revolving credit line based upon your house equity and borrow just as much (or as little) dollars as you require over the attract interval. The HELOC has an ordinary ten-yr attract interval plus a twenty-calendar year repayment interval. https://aliantcu.org/ - Alliant Credit Union log in

    In any other case, you might not receive any excess dollars. What’s additional, you must make every month deposits of at the least $500 to qualify for the next APY, above traditional accounts, on cash and also to get paid cashback

  • https://Lvivforum.Pp.ua (unregistered)

    I've been surfing on-line more than 3 hours these days, yeet I by no means discovered any fascinating article like yours. It's beautifuil price sufficient for me. In my opinion, if all web owners and bloggers made good content as yyou probablyy did, the nett can be a lot more helpful than eer before. https://Lvivforum.Pp.ua

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

Log In or post as a guest

Replying to comment #:

« Return to Article