- Feature Articles
- CodeSOD
-
Error'd
- Most Recent Articles
- Retry Fail
- Office Politics
- Secret Horror
- Not Impossible
- Monkeys
- Killing Time
- Hypersensitive
- Infallabella
- 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
Unless you remove the top cover from the grill: Six sides in total means minimum three batches, so:
Admin
In three heating sessions, but I won't tell you folks how. ;-)
Admin
Oh, and for you bitcounters out there, I've got a bit of a disappointment for you: it turns out the most prozaic methods are fastest. snif
Admin
The correct technical and practical answer would be reading out the weight sensors inside the airplane. A plane of this class MUST have a device to read out its weight before takeoff, and pressure in hydraulics of the wheel gear is easy enough to convert to weight.
being a smartass, I prefer googling for mass of boeing 747. The cargo is not a part of the plane, and they asked me to weight the plane.
Admin
The table of transitions of values in a binary encoder is, for rotation left: channel: A B 0 0 0 1 1 1 1 0 for rotation right: A B 0 0 1 0 1 1 0 1
What bit operation (one mnemonic!) would enable you to determine the direction of rotation of the encoder?
How to easily implement error checking (illegal transitions)?
Admin
You can do this the other way too. Fill up the 3l jug. Pour from it to the 5l jug. Refill and repeat. After two fills, you will have 1L in the 3l jug and a full 5l jug. Empty the 5l jug and pour the 1L from 3l jug into the 5l jug. Fill the 3l again and pour into the 5l jug - you now have 1L + 3l = 4l in the 5l jug.
The mathematical treatment would be to find a,b such that 5a - 3b = 4 or 3a - 5b = 4. If you observe that multiples of 5 necessarily end with 5 or 0, you can get the smallest integer pair satisfying given condition as 2,2 in case 1 (your solution) or 3,1 in case 2 (my solution).
Admin
There are people who don't know the answers? oO
Admin
the strategy is the same for all people. if the hats of the other two people are different colours, they pass. if the other hats are the same colour, they guess that their own hat is the opposite colour. this way they win 75% of the time.
Admin
This whole 8 coins thing - i always remember it being 12 coins
12 indentical looking coins 1 is heavier or lighter, but you dont know which You get 3 weighings, no more. Find the odd coin out, and determine whether it is heavier or lighter than the others.
Admin
This would let you fit right in as a programmer in certain environments in which I have worked.
<cliche>Just remember that when you assume you make an ASS out of U and ME.</cliche>
Admin
Addendum (2007-05-16 07:02): A better approach would be to compute the Earth's volume and multiply it by a guesstimated average density. IIRC most kinds of rock are about 6 or 7.
Admin
More or less, yes. I usually clarify "If that is what you wanted, here's your trivial, express answer, in 2% of the time allocated for the project. If this is not what you wanted, I want a precise, detailed specification of the project on my desk. I'm paid for writing programs to specification, you're paid for writing the specification, don't make me do work of us both.
This is a kind of tactics of educating the business units and project offices what is their role - not just get an idea out of blue sky and tell programmers "do it", but analyse, prepare details, find caveats and so on. Otherwise you'll keep getting orders more and more vague and get all the blame for the result not working as the manager imagined it (but never bothered to tell).
If the question was "devise a way of finding the mass of ladden airplanes including ones of size of boeing 747, within an airport, precision no worse than 2% of the mass of the plane, it should be implemented as an airport facility" I could start thinking further, because I see the project makes sense. If they want "finding weight of an 747", I suggest finding, aka googling it.
Admin
Radius of earth about 6000km, diameter 12000, round down to 10000km that is 10^7m, approximate sphere with a cube, 10^21m volume, about 1 ton per cubic meter of soil, earth mass is around 10^21 tons, plus minus an order of magnitude. What was the allowed tollerance again?
alternatively: http://www.google.pl/search?q=mass+of+earth=
Admin
Problem is, you have no way of knowing if the proportion blue vs red is evenly matched. It's guided purely by chance.
It could also be that the coin is fixed. :)
Admin
Exactly, haven't y'all played Knights of the Old Republic? Or you just all played the dark side?
Admin
Therre is a simple truth that often is overlooked. Not evrything in life is worth doing well. Silly riddles are at best only entetainment,
Admin
Initial strategy session: Person A is the guesser, B and C will pass. In the room, if B stands to C's left, A's hat is red, otherwise it is blue.
Admin
Weight of a 747, hmmm ...
A South African or European 747?
Admin
There. Ran rings around you logically.
Admin
Alternatively, search for HAKMEM 169 - might give you better results. :)
Admin
Ok, this has many WTFs in its own, but let's extend the boat ride riddle:
In one side of the river there are:
The boat has a capacity of two, but only the father, mother and security guard can operate it.
The father can't stand the girl if her mother is on the other side of the river The mother can't stand the boy if his father is on the other side of the river The prisoner will kill any one if the guard is on the other side of the river
How can they all get to the other side of the river?
CAPTCHA: tacos (the riddle reward)
Admin
It's a clever answer, but when I first heard the riddle I threw my hands up in the air because I didn't assume that each switch controlled one and only one light bulb. It's a black box! Who knows how it's wired?
Admin
Chicken -> Grain -> Chicken <- Fox -> Chicken ->
Done ...
Admin
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.
Admin
As far as 0.9 recurring = 1: presumably those who don't accept that numbers may have several numeral representations would also claim that 1 is not equal to 1.0000 recurring?
Did some FE analysis for a chap who, amongst other things, made manhole covers about 10 years ago. His professional opinion: nobody gives a shit if some idiot drops a manhole cover into a manhole, because they're the one who has to fetch it out. Manhole covers are round (in the cases where they are) because round covers distribute the stress better (you don't have to reinforce corners) and are therefore slightly cheaper to make.
Admin
"NB: this is definitely against the manufacturer's recommended guidelines."
Not only that, it isn't safe sex, and against the premise of the question. While you may be ok, woman 2 has an exposure risk.
I'm not sure I'd work for someone who proposes riddles that come complete with inbuilt misogyny and irresponsible behaviour.
Admin
The interviewer would tell you that the weight sensor in the plane is broken. Now how would you figure it out? Or the interviewer could be a dick and just let you fail miserably on that question and continue on. It's like the old riddle... how do you get an elephant in a fridge? Open the door and put him in! The interviewer wants to see you apply some analytical thinking. Maybe if you prefaced your solution with that trivia, you would be in good shape.
Admin
Hire Bruce Willis and Samuel L Jackson to do this for me. Ala Die Hard 3.
Sorry if someone already said this, but I'm not reading 325 replies.
Admin
Actually, it's perfectly correct, the mass of the Earth is concentrated at it's center. While the side of the Earth you're standing on is 1 radii closer to you than the center and therefore attracting stronger, the side directly opposite is 1 radii further away and is attracting weaker.
So if you sum all the attractions from every grain of sand and piece of rock over the entire volume you'll find that it all balances out, and the result is identical to the graviational attraction of a single massive pellet at the center with you suspended in space 1 radii above it.
Physics 101. Comes in handy sometimes.
Admin
It is only misogyny and irresponsible behavior if you use an incorrect solution.
Admin
I disagree. Brainteasers are what managers and HR people think as being lateral thinking. I get brainteasers, or exams im likely to either walk out of the interview or turn down the job.
My favourite question to ask is "Why do you work here", especially in group interviews. Very few can answer it!!!
Admin
that is the longest way, but it works. If you want the shortest (weighing 3 times at the most)
Admin
The hat problem is easy. No one can know what color hat they have so forget about your own hat. This is simple misdicrection. You need to follow the rules. Only person has to be correct and they don't have to prove how they know what color they have and they are in no way onbligated to be serious about trying to guess.
The first player agrees to say his hat is the color of someone elses hat that he knows to be true because he can see it. To make the game efficent agree to say the most common color is their hat. In turn all the rest of the people agree to say they have the same color as what the first player said what his hat color. Sooner or later the person with the hat that the first player saw will say they have the correct color. They don't have to provve how they knew.
Admin
This one I have to comment since you ignored not just one but two of the premises. Everyone will lose if anyone gives a wrong answer, and all the guesses are made simultaneously.
What's more, it should be obvious to anyone that without either of those two premises, the riddle isn't much of a riddle at all.
Admin
The interviewer would tell you that the weight sensor in the plane is broken.
I'd get it fixed. Having the sensor in working order can't be less important than knowing the mass of the plane and fixing it would automatically solve the problem. Besides, measuring the pressure in the hydraulics would be about the least hassle-free, cheapest method of weighting the plane, without ever moving it from a place.
No pressure in the hydraulics? Seal it, and repressurize it. Sorry, moving the plane anywhere in current condition (in order to weight it) would break its gear beyond repair, so it needs to be done anyway. And so on :]
Measuring the goddamned time the barometer takes to fall from the top of the tower. "No, sir, you won't ass me into putting the goddamned plane on a goddamned barque, no matter how hard you try."
Admin
Um, nope - that doesn't work because you will infect yourself with whatever 1 was carrying. (The outside of condom B would become the inside when you were having sex with 3)
The real WTF here is that I've actually spent time thinking about this O.o
Admin
How about this to weigh the Boeing 747:
Admin
Incorrect. Condom A never comes off. The outside of B comes in contact with woman #1. The outside of A with #2, and the inside of B with #3. At this point, the outsides of A and B are in contact with each other (B is inside-out), and you're still wearing A correctly, having never removed it.
Admin
Sorry, this comment: Actually, it's perfectly correct, the mass of the Earth is concentrated at it's center. While the side of the Earth you're standing on is 1 radii closer to you than the center and therefore attracting stronger, the side directly opposite is 1 radii further away and is attracting weaker.
So if you sum all the attractions from every grain of sand and piece of rock over the entire volume you'll find that it all balances out, and the result is identical to the graviational attraction of a single massive pellet at the center with you suspended in space 1 radii above it.
Physics 101. Comes in handy sometimes.
Was in response to this:
Admin
Um, you put three strangers together, and you monitor their strategy session. Good luck in breaking the rules THEN.
Admin
Microsoft was asking brain teasers before Google was so much as a thought.
Of course, in the past few years, I haven't been asked a brain teaser, so I think it's no longer something that they (or at least most groups) do. I'm assuming that this is because the answer to most of these brain teasers are online and their usefulness is limited to people who don't search the internet to prepare for an interview.
The purpose behind asking the brain teaser is to evaluate how you approach problems. Most interviewers could care less if you manage to get the right answer. In fact, I don't think that I've ever correctly answered a brain teaser while interviewing.
One of my favorites:
There are three vending machines. Each dispenses one item per quarter. One machine dispenses apples, one oranges, and one has a mixture of apples and oranges. There are signs on each machine indicating what is dispensed, however the signs are wrong. How many quarters would it take to determine which sign goes on which machine?
Oh, and I love how you substituted the $ for an S. You're just sooooo cool.
Admin
Bravo! :-D
captcha: muhahaha
Admin
First of all, the whole hat thing has evolved to be quite a WTF itself... It's funny to see how many intelligent(?) people just can't accept what has been said to them like million times in this thread :)
Let's try (f=father, s=son, m=mother, d=daughter, g=guard and p=prisoner):
Admin
Assuming you mean that all signs are guaranteed to be wrong on the vending machines, you only need 2 quarters.
Admin
Given the agreed-upon rules, you only answer if you see two hats of the same color.
If all 3 answer, there is a 100% chance you lose. You cannot have 2 answer. If 1 answers, there is a 100% chance you win. You cannot have 0 answer.
There is a 25% chance that all 3 will answer, and a 75% chance that 1 will answer.
Net result: there is a 75% chance you win.
Admin
Here's my attempt:
Put on A and B. Have sex with 1. Remove B. Have sex with 2. Place B inside-out over A. Have sex with 3.
By delaying the use of the inside-out B, you have not "contaminated" A until after it has been used.
Admin
Yes, the color(s) of the other hats has no effect on the probability of your hat being a particular color. However, the fact that you will not give an answer 50% of the time is relevent, and is what changes the odds from 50-50 to 75-25 in your favor.
Admin
Admin
Admin