Friday, May 22, 2009

Microsoft Brain Teaser

Q.

You have 4 jars of pills. Each pill is a certain weight, except for contaminated pills contained in one jar, where each pill is weight + 1. How could you tell which jar had the contaminated pills in just one measurement?
A. I would take a pill out bottle 1, and a pill out of bottle 2. I would put pill 1 and bottle 3 on scale and then pill 2 and bottle 4 on the other side of the scale. If the scale tips a lot on one side, the bottle on that side will have the contiminate. If scale tips a little on one side, the pill on that side is the contaminate. If it's not a balance scale....

Let me think... I don't think I could figure out a way to find the contaminated pills with no comparison...

Q.You are an airport manager. You need to fit a 1.5 mile runway onto a 1mi square plot of land (1 mi by 1 mi). How do you do it?

A. Well the diagonal is square root of 2 which is about 1.41 so that won't work. What about down hill? Or off a cliff? Does it have to be straight runway? Circle? Maybe the the plane can turn? Ok I got it. Make an elevator that lifts the plane on to a ramp that's 1.5 miles long. The base is 1 mile but because your height can be over 1 mile high, your third side can be 1.5 miles long. I think there might be a more practical way but that's what I came up. Actually it makes more sense to make the base the diagonal that way you don't have to make the incline so steep. So base is 1.41 miles, side is 1.5 and height will be 1.5^2-2^(.5)=.25, so your height is .5.

OK one more before bed.


Q.You've got someone working for you for seven days and a gold bar to pay them. The gold bar is segmented into seven connected pieces. You must give them a piece of gold at the end of every day. If you are only allowed to make two breaks in the gold bar, how do you pay your worker?
A. Wow. I don't know how to do this one. Even if you don't have to give equal sizes. Two breaks means only 3 parts. You have to pay at the end of every day. So what about I break it in 3+4. No. I break it into 1+6. I give him 1 the first day. Then day 2. I break 6 into 2+4. I give him 2 and he gives me back 1. He has 2 gold bars. I have a 1, and a 4. Day 3. I give him 1. He has 3. Day 4, he gives me 3 and I give him the 4 piece. Day 5. I give him 1. He has 1 and 4. I have 2. Day 6 I give him 2, he gives me 1. Day 7. I give him 1. Wow. I did it.

No comments: