- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
The real tricky one is 12 in 3 balances (all outcomes covered)
Admin
Yes, I'm a feckin' eejit. I meant to write CEIL(Log(N)/Log(3)) - aka CEIL(Log3(N)) - which is correct when you do know whether the fake coin is heavier or lighter.
Admin
Step 2 is flawed. G and H are obviously going to weigh differently. Which is which? You don't know.
What you can do is weigh A against G, and if G is lighter/heavier then G's the odd one, if not then H is - but you can't know whether H is heavier or lighter.
Admin
How do you know he didn't offer you two shaved coins?
You brought your scales, but forgot to bring a Reference Tarsk?
Since your prices aren't posted, tell everyone else the price is 12 C.T. but tell the Warrior 13. Then it doesn't matter if one of them is bad.
3A. If, in talking to others at the Marketplace, the Warrior learns you are selling chickens for 12 CT to everyone but him, offer him a 1 CT refund. Now he has to sweat that you might give him the false CT!
Admin
The first one is just wrong. After all, HTML + CSS is Turing Complete, and therefore it is in principle possible to write a Java interpreter in it...
Admin
Admin
The only correct answer is: "Don't replace the lightbulb, it's inside a box and completly useless. Why change it?" Think outside the box.
Admin
Admin
Admin
Oh God, I'm so embarrassed that I caught the reference...
Admin
I believe he may be travelling incognito under the alias Bosk ... You will find him by the trail of meek, submissive, exquisitely-ringed and -silked slave girls he leaves in his wake.
Admin
You get someone else to look in the box each time a switch is turned "on" (this assumes that the lights are off to begin with). This only needs to happen twice.
Then you get to look in the box and marvel at the stupidity ad pointlessness of making an opaque box containing light bulbs that can be switched on when the box is closed.
Admin
Light bulbs don't give out any detectable heat any more. (well, not so that you could detect it by touch anyway.)
Admin
Probably that same idiot who wired up the bulb in the sock drawer puzzle
Admin
I would grab as many socks as possible.
Also, I may be suffering from "puppeteer's bias".
Admin
That's not thinking outside the box. It's thinking pragmatically. I would give you points for your ability to triage a situation. Not all defects need to be fixed.
Admin
Look, as long as the box is closed, you can't observe the light bulbs so there is a 50% chance that each one is on or off. More precisely, each one is 50% on and 50% off until you open the lid, at which point the universe tosses a coin (of full standard weight) and the wavefunction resolves.
Just make sure someone is watching you open the lid, so your wavefunction resolves to ensure your own existence.
That's why I always have someone watch me while I watch porn.
Admin
When I took the socks out of the laundry, I would bundle them into matching pairs before putting them in the drawer.
100% that I'll get a matched pair.
Admin
One is almost tempted to say to the interviewer: "In such a set of circumstances, I would ask myself: What would Jesus do?"
Admin
Eh, just change all light bulbs. The beancounters will complain about the cost, but who cares about that, amiright?
Admin
I would use a tricorder to determine the odd weight out and which lightbulb in the box is broken. I don't think they work on socks but since their display gives off light I can use that to get a matching pair with only two socks, a 50% improvement over the stated goal! My solutions not only show my out-of-the-box thinking and imagination, but also my wittiness because I said "out-of-the-box" while dealing with lightbulbs that are in a box.
Admin
That's an assumption that is only going to get worse, and it begs the question - if you're giving me physical access to the bulbs and the switches, why don't I have access to the wiring?
It's also a question that assumes that you're willing to play with electricity with no gear. Always wondered why this would be considered a desirable trait, considering how high Worker's Comp premiums can go...
Admin
Q: Why are manhole covers round? A: Because God made them that way.
Admin
Admin
They won't complain when you compare the cost of developer time to the cost of light bulbs, and when you point out that you can donate the old bulbs to some poor but noble charitable organization and get a tax advantage plus good fodder for the goodwill advertising.
Picture it! The dark screen, suddenly illuminated, and we see a hand pulling away from a light bulb. Scenes of people doing Important Work, all of them illuminated by light bulbs in subtly prominent positions in shot. Moves into a montage of young and ethnically-diverse staff people helping younger and slightly less ethnically-diverse blind indigent tap dancers to perfect their steps in a brightly-lit dance studio, as the voiceover comes in: "SymBoolean is proud to support the efforts of the home for blind indigent tap dancers. SymBoolean... helping everyone to look on the bright side of life!"
Followed of course by the fast disclaimer mumble:
"...except when there isn't a bright side because the light bulb doesn't work, but hell, they're blind, what do they need light bulbs for? whaddaya want from us, blood?"
At least, that's what I'm spending my morning on, 'cause nothing much is going on the day before the holiday weekend.
Admin
First, challenge the interviewer to justify the purpose of the box with light bulbs inside it. If it doesn't serve a legitimate business function, then performing any maintenance on it whatsoever is a waste of company time and it should be decommissioned.
But let's say for argument's sake that it's part of an industrial cookie-making machine. The uncooked rounds of dough travel along a conveyor belt, where they are cooked to a perfect golden brown by a gauntlet of infrared lamps; if one of the lamps has stopped working, then cookies are ruined and the company loses money. This scenario also validates the assumption that these lamps give off a discernible amount of heat.
Opening the box to determine which lamp has malfunctioned requires the entire line to be shut down, which also costs the company money, explaining the restriction that the box can only be opened and observed once.
The solution as typically given is only part of the full solution.
After the errant bulb has been replaced, the next step is to check the maintenance logs and see who is responsible for the switches being installed improperly; each should be labeled, and each should have the same orientation. Find that person and fire them.
If insufficient logs exist, find the person responsible for the maintenance logs and fire them.
Finally, fix the actual problems. Re-install the switches correctly, label each one, and wire up an external indicator lamp in series with each infrared lamp, so that in the future when a lamp dies, it will be immediately obvious which one.
Now you have more time to work on optimizing the machine that figures out which of the 6 million cookies manufactured today is outside of the acceptable weight range.
Admin
Admin
What if my tree has 1025 leaves? You need to give me a probability distribution of leaf counts in the population of trees to be able to assess whether the most leaves drop on the last day or second to last day.
Admin
If one of the bulbs has gone on strike, then fire any idiot who's running the machine and wasting cookie dough while the machine is not working. Then fire the maintenance guy who's apparently sitting on his thumbs instead of fixing the damned busted bulb by opening the box and turning on the switches until he finds the busted one. And then re-hire him and fire him again for not having an effective schedule for bulb replacement. These bulbs should be replaced before they hit expected end-of-life, not after they fail. Then fire everyone in the place and outsource the thing to Hyderabad and ship the cookies back to the states.
Nagesh, we have work for you!
Admin
Your atitude is very demeening. Sorry!
Admin
Okay, you're fired.
Shiva, we have work for you!
Admin
Admin
Decide for yourself.
Admin
Manhole cover is round because the mold to make them is round. If mold to meke them is square, then you can have square or rectangle or any shape you like. [image]
Admin
Why you don't have access to the wiring is irrelevant. You do not get to dictate the conditions under which you can solve a problem.
This quiz weeds out the bystanders from the go-getters. Case in point.
Admin
"Do you want me to fix the stupid light-bulb? Then get out of my way and let me get on with the damn job!"
Admin
I also enjoy putting them back in someone's drawer when I'm done - you know, icing on the cake.
Admin
Actually, the hardest problem is 12 weights, 3 weighings, and you do not know if the odd one is heavier or lighter. I don't know how that fits into the general solution, but there is a solution for this.
Admin
Admin
The puzzle says "Each day it drops twice as many as the day before", so the number of leaves on the tree must be of the form k(2^n - 1). (Strictly speaking there is no solution: the first day that any leaves fall fails to satisfy the condition.)
Admin
The puzzle is not broken. The idea is to solve the problem without adding additional elements. From your examples, "I peek through a crack in the box" adds an element, a crack in the box. "I trace the wires" adds an element, some object that lets you trace the wires.
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 even with these RIDICULOUS assumptions, the correct solution is the most elegant, creative, and requires no additional elements added to the puzzle. Second, it's not just the solution that matters, but the process you go through to rule out those "extra elements", and to discover those "reasonable assumptions", that really leads to the "correct" solution. That is what the puzzle is about.
Sorry you don't like the puzzle.
Admin
Admin
Admin
I don't care about that. I'm not firing him for bulbs failing, I'm firing him for not having a bulb replacement schedule. If he had a bulb replacement schedule, I'll fire him for something else. I don't like that guy. I don't like the cut of his jib, if you know what I mean.
Admin
Or are you queer and would have preferred him un-cut?
Now we see the true purpose of "rules": a means of establishing arbitrary authority to get rid of people you don't like.
Admin
Yep. That's what we need around here - we need some rules.
Admin
Admin
It'd have been +2, but I had to deduct a point for spelling "make" both correctly and incorrectly in the same comment.
Admin
Normally I'd agree, but in this case he had a very specific reason for doing so -- he already suspected the interviewee was simply regurgitating his own responses to the outsourcing company, and used this specific question because it was one of the examples he'd given them. He wasn't testing the interviewee's knowledge; he was testing whether the interviewee (and the outsourcing company) was cheating. It worked, so I don't see any WTF in this case.
Admin
Seriously, I always assumed that made them more user-friendly because they don't need to be rotated during placing.