• stupid puzzler (unregistered)

    The socks

    In a software context: just take them all, ram is cheap and the unwanted ones will be garbage collected once a pair is chosen. And hurry up, we have to get this code out the door.

  • ceiswyn (unregistered) in reply to CodeRage
    CodeRage:
    The puzzle (this particular version) has these elements: you, a box, a switch, light bulbs

    Using only those elements, find the solution. Of course you have to make some RIDICULOUS assumptions, such as that you, a human, can detect heat. Or, that a light bulb holds its heat, and dissipates its heat in a reasonable amount of time. You know, like almost every light bulb ever made!

    But that IS adding in another element: the real-world knowledge that most light bulbs emit heat. And that's an unwarranted assumption, given that not only are we apparently using highly uncommon objects of other kinds (doors that no light escapes from, and that can only be opened once, are not exactly the most common type) but any other attempts to use real-world knowledge are specifically disallowed by the question-asker.

    Allowing ONE single piece of real-world knowledge and NO OTHERS (hey, if it's that kind of bulb, I'll just have a look at it and see if the coil's broken - what do you mean I can't?) makes this a trick, not a puzzle.

    And using trick questions in an interview is the mark of a very bad interviewer.

  • (cs) in reply to ceiswyn
    ceiswyn:
    CodeRage:
    The puzzle (this particular version) has these elements: you, a box, a switch, light bulbs

    Using only those elements, find the solution. Of course you have to make some RIDICULOUS assumptions, such as that you, a human, can detect heat. Or, that a light bulb holds its heat, and dissipates its heat in a reasonable amount of time. You know, like almost every light bulb ever made!

    But that IS adding in another element: the real-world knowledge that most light bulbs emit heat. And that's an unwarranted assumption, given that not only are we apparently using highly uncommon objects of other kinds (doors that no light escapes from, and that can only be opened once, are not exactly the most common type) but any other attempts to use real-world knowledge are specifically disallowed by the question-asker.

    Allowing ONE single piece of real-world knowledge and NO OTHERS (hey, if it's that kind of bulb, I'll just have a look at it and see if the coil's broken - what do you mean I can't?) makes this a trick, not a puzzle.

    And using trick questions in an interview is the mark of a very bad interviewer.

    First, it is a question to get an idea of how someone solves problems, not to trick them. These kind of thinking problems usually involve a discussion, where the problem solver asks questions to eliminate assumptions. This puzzle really doesn't require many, of course, except for your claim that the problem solver's real-world knowledge is an outside element, you know, along with the assumption they have hands, can detect heat, can flip a switch, has eyes, and understands the language the puzzle was presented in!

    The point is problem solving.

    ... Solver: Hey, are there any cracks in the box. Asker: Nope. Solver: What kind of bulb is it? Asker: A standard incandescent bulb. ...

    There are many interview questions used in IT interviews that test not only knowledge, but the ability to solve problems.

    I don't think you know what a good interview is. Maybe you have had difficulty with interviewers that want to know your problem solving skills, in addition to your book knowledge, memorization, and work history.

  • muteKi (unregistered) in reply to geoffrey

    One thing to point out is that covers aren't just held in place by friction along the sides. There's a ledge/lip along the edge that the cover rests on! If you make that ledge much wider than the hole the workers go through, you can avoid that issue.

    You'll end up needing to use more material than with a round cover, though. It's an easy solution to design, but needlessly inefficient.

  • muteKi (unregistered) in reply to geoffrey

    Oh. I see. Your stuff's all enterprisey. Everything makes sense now.

  • Machtyn (unregistered)

    I know this is way late. But if Omar wasn't ready to move on, the simple thing to do is apply for his job through the outsource company. Bang, new hire, no training, and hopefully he gets paid better.

  • DoucheBag (unregistered) in reply to CodeRage
    CodeRage:
    ceiswyn:
    CodeRage:
    The puzzle (this particular version) has these elements: you, a box, a switch, light bulbs

    Using only those elements, find the solution. Of course you have to make some RIDICULOUS assumptions, such as that you, a human, can detect heat. Or, that a light bulb holds its heat, and dissipates its heat in a reasonable amount of time. You know, like almost every light bulb ever made!

    But that IS adding in another element: the real-world knowledge that most light bulbs emit heat. And that's an unwarranted assumption, given that not only are we apparently using highly uncommon objects of other kinds (doors that no light escapes from, and that can only be opened once, are not exactly the most common type) but any other attempts to use real-world knowledge are specifically disallowed by the question-asker.

    Allowing ONE single piece of real-world knowledge and NO OTHERS (hey, if it's that kind of bulb, I'll just have a look at it and see if the coil's broken - what do you mean I can't?) makes this a trick, not a puzzle.

    And using trick questions in an interview is the mark of a very bad interviewer.

    First, it is a question to get an idea of how someone solves problems, not to trick them. These kind of thinking problems usually involve a discussion, where the problem solver asks questions to eliminate assumptions. This puzzle really doesn't require many, of course, except for your claim that the problem solver's real-world knowledge is an outside element, you know, along with the assumption they have hands, can detect heat, can flip a switch, has eyes, and understands the language the puzzle was presented in!

    The point is problem solving.

    ... Solver: Hey, are there any cracks in the box. Asker: Nope. Solver: What kind of bulb is it? Asker: A standard incandescent bulb. ...

    There are many interview questions used in IT interviews that test not only knowledge, but the ability to solve problems.

    I don't think you know what a good interview is. Maybe you have had difficulty with interviewers that want to know your problem solving skills, in addition to your book knowledge, memorization, and work history.

    To be honest I'm going to stop trying to be logic and simply use 'real world' knowledge.

    Take the Chicken, Fox & Grain puzzle.

    Why not simply kill the fox or chicken? It's not specified they have to get across the river alive.

    You could tie the fox to the boat by the neck and force it to 'swim or sink'.

    Honestly thought I'd assume the river is seasonal and simply wait for it to dry up. Some rivers do dry up and nothing specified says that this river doesn't - much like assuming that a hypothetical light-bulb should somehow generate heat.

    [On that note, the real solution for the light-bulbs is easy - given I'm free to assume the box/cupboard is transparent to the light.]

  • Bummer (unregistered) in reply to Nagesh
    Nagesh:
    Outsoursing company story sound fishie to me.

    Not to me. I habe been in a similar situation when I was working for a bodyshopper where i was told to say that i had worked on XYz project and done such-and such things. The projects were never real.

  • Ronnie Overby (unregistered) in reply to ping floyd

    You beat me to it!

  • (cs) in reply to Bummer
    Bummer:
    Nagesh:
    Outsoursing company story sound fishie to me.

    Not to me. I habe been in a similar situation when I was working for a bodyshopper where i was told to say that i had worked on XYz project and done such-and such things. The projects were never real.

    Plz supply name of bodyshopers in US of A.

  • N.G. Hahs (unregistered) in reply to Nagesh
    Nagesh:
    Bummer:
    Nagesh:
    Outsoursing company story sound fishie to me.

    Not to me. I habe been in a similar situation when I was working for a bodyshopper where i was told to say that i had worked on XYz project and done such-and such things. The projects were never real.

    Plz supply name of bodyshopers in US of A.

    America no sell full bodies any longer. It'd be chopped and sourced out. You'd be putting "Head & Shoulders" or similar to internet browser, yes.

  • (cs)

    Are you guys seriously telling me, that if you were actually presented, in real life, with the problem of determining which of three light bulbs was burned out, and they were switched off, you wouldn't just feel them with your hand? Really really?

    The question seems to be geared to determine whether the interviewee has a functioning brain stem, not an actual test of anything.

  • big picture thinker (unregistered)

    FTA: "Being someone who has heard of a brainteaser before..."

    Really, you heard of a brainteaser?

  • Smokingman (unregistered)

    I accidentally left my resume available on the web for a short time and received it unchanged from 3 different outsourcing companies.

    In each case I told the person, "I'm surprised I don't remember you from EVERY job I ever worked."

  • roy (unregistered) in reply to Nagesh

    i always thought it was so they couldn't fall to their death- a square manhole cover can fit 'through' its hole diagonally - a circle has no larger diagonal than it's width, so no fall through-

  • Cbuttius (unregistered)

    If you know whether the odd coin is heavier or lighter, then with N weighings you can have as many as 3^N (3 to the power of N) coins.

    If you do not know then the maximum number is 2^N (2 to the power of N).

    In the first case then on each iteration you weigh one third on one side, one third on the other and eliminate 2/3.

    In the second case you normally weigh 1/4 on each side until the last weighing, and eliminate half. (If they balance they are eliminated, if not the other half are).

    On the last weighing you have 2 coins so you must weigh one against one of the rejected coins. If they balance then it is the last coin, if they do not it is the one you did not already reject.

  • Cbuttius (unregistered)

    Actually I reckon you can reduce always by a 3rd each time.

    Weigh 1/3 against 1/3. If they balance, reject them all and keep the other third.

    If not then we have 2/3 remaining at this point but now take 1/3 of the heavier ones and 1/3 of the lighter ones on each side, and you will find that you can iterate through this and eliminate 2/3 of them now. (If they balance it's in the ones that were left behind, and if not you reject the ones that switched from being on the light side to the heavy side and vice versa).

    It's not an exact log(base 3) N but it's that plus a constant.

    Alternatively, within 2 weighings you can find out if your extra is heavy or light then iterate through log(base 3)(N). One example of two such weighings is obviously half vs half and then from one half, half vs half again. Not the most efficient way but you will know for certain whether we have a heavy or light object and will be able to eliminate at least a half. More efficient would be 1/3 vs 1/3 to start and if they don't balance, pick half from each of those against the ones we left behind to start with. Now we have 1/6 of our original set and know if we are heavier or lighter, but if the first weighing balanced we will have to continue this strategy until we get a mis-balance. (However we have reduced by a third).

    Therefore we can say it is halving for one weighing and then a third subsequently but if we get down to 6 (or 4) we require 2 weighings, so for W weighings we can manage with 4 * 3^(W-2)

    W N 2 4 3 12 4 36 5 108 6 324

    etc.

  • Cbuttius (unregistered)

    I can't edit my comments because I'm not logged in. Actually the maximum is 3^(W-1) or 2^W whichever is greater.

    N W 2 4 3 9 4 27 5 81

    etc.

  • muteKi (unregistered) in reply to smxlong

    Why the hell would I do that without prior knowledge of the temperature that the light bulbs can reach?

    I mean given all the other bizarre shit that has to be true in order for the problem to make any sense at all. I mean, obviously the contraption isn't useful for giving off light, so surely it's designed to create heat?

  • Kuba (unregistered) in reply to CrisW
    CrisW:
    Light bulbs don't give out any detectable heat any more. (well, not so that you could detect it by touch anyway.)
    You're entirely silly. Try it. Larger CFLs get too hot to touch. Even LED replacements for lightbulbs get notceably warm.
  • David (unregistered) in reply to clcto

    I think we've established the interviewer wasn't big on brain power :)

  • Voice (unregistered) in reply to clcto

    Yeah, 5 in 3 measures isn't particularly difficult. Here's a solutions.

    Put 1 weight on either side of the scale. If it balances, set one aside as a known-good, and discard the other. If it doesn't, replace one with one of the others. If they balance, it's the one you replaced. If they don't it's the one you didn't. If the first set balances, pick another set. If they balance, it's the last weight which hasn't been measured. if they don't, replace one of them with the known-good weight. If they balance, it's the replaced one, if not, it's the one you didn't replace.

  • Shark8 (unregistered) in reply to Master Troll (formerly Top3Coder)
    Master Troll (formerly Top3Coder):
    If you create a 20GB XML file, you're doing it wrong.

    Yeah, that is a lightweight. ;)

  • Dave M (unregistered) in reply to Richard

    Binary search isn't really as clever as "trinary" search.

    I always asked this one specifying that the object is either heavier or lighter.

    Then the algorithm is:

    Divide objects into 3 nearly even piles. Weigh the two equally numbered piles. They are either equal or one is the heavier(or lighter). The number of weighs required is ceil(log3(n)). Because log3(5) < log3(9), log3(5) < 2, and ceil(log3(n)) = 2 weighs.

    For 8 objects, it is also 2 weighs.

  • Smithc64 (unregistered) in reply to HockeyMonkey

    I've been absent for a while, but now I remember why I used to love this site. Thank you, I'll try and check back more frequently. How frequently you update your site? cdebgkdbbadeaekc

  • (cs) in reply to Smithc64
    Smithc64:
    I've been absent for a while
    Oh No!
    Smithc64:
    but now I remember why I used to love this site.
    Oh Good :)
    Smithc64:
    Thank you, I'll try and check back more frequently.
    Oh OK.
    Smithc64:
    How frequently you update your site?
    Oh Daily :^P
    Smithc64:
    cdebgkdbbadeaekc
    Oh what?
  • eric bloedow (unregistered) in reply to clcto

    i've read several versions with 12 weights in 3 weightings.

Leave a comment on “More Limitin', Wrong Major, and Parallel Universe Replacement”

Log In or post as a guest

Replying to comment #:

« Return to Article