PDA

View Full Version : Die Hard With A Vengeance--That trick with the water jugs

Spectre of Pithecanthropus
04-14-2005, 11:54 PM
I'm just now watching Die Hard With A Vengeance. There's a scene where Samuel Jackson and Bruce Willis have a 5-gallon jug and a 3-gallon jug of water, by a fountain, and they have to put exactly four gallons of water on a bomb to disarm it. They figured out that if they started out with both jugs empty, and filled the larger one, they could then fill the smaller one from the larger and they'd have exactly two gallons left in the larger jug. Then there was more but they were talking so fast and I was distracted, so I didn't get the whole thing. How did they do it?

If they had a third container I can see how it could easily be done, but as far as I can tell they only had the two jugs. Did they have a third container that I missed?

Hunter Hawk
04-14-2005, 11:58 PM
It's a standard interview question. Scroll down on this page (http://www.careertrip.net/JSresources/Articles/OrdealbyRiddl.htm) for the answer.

04-15-2005, 01:03 AM
In the movie they did it slightly differently to that answer.

Fill the five, then use that to fill the three, leaves 2g.
Empty the three, fill it with the 2g that's in the five.
Fill the five, empty it into the three, there's only the space for 1g in the three.
That leaves 4g in the five.

gum
04-15-2005, 02:55 AM
"Jezus? Do I look Puerto Rican to you?"

Colophon
04-15-2005, 06:38 AM
It's a standard interview question. Scroll down on this page (http://www.careertrip.net/JSresources/Articles/OrdealbyRiddl.htm) for the answer.
Sorry to hijack, but I'm not following the maths on this question:

2. How many square feet of pizza are eaten in the United States each month?
Take your figure of 300 million people in America. How many people eat pizza? Let's say 200 million. Now let's say the average pizza-eating person eats pizza twice a month, and eats two slices at a time. That's four slices a month. If the average slice of pizza is perhaps six inches at the base and 10 inches long, then the slice is 30 square inches of pizza. So four pizza slices would be 120 square inches. Therefore, there are a billion square feet of pizza eaten every month.

As far as I can see, using their logic, that makes 120 square inches x 200 million = 24,000 million or 24 billion square inches. Now unless a square foot has suddenly be redefined as 24 square inches, that doesn't add up. I make it only 166 million square feet. :confused:

JeffB
04-15-2005, 08:37 AM
I think they meant per year.

NutMagnet
04-15-2005, 09:34 AM
From the site:
http://www.careertrip.net/JSresources/Articles/OrdealbyRiddl.htm

13. Say you are driving on a one-mile track. You do one lap at 30 miles an hour. How fast do you have to go to average 60 miles an hour?
This is something of a trick question. The first thought of many people is to say 90 miles an hour, but consider: If you have done a lap at 30 miles an hour, you have already taken two minutes. Two minutes is the total amount of time you would have to take in order to average 60 miles an hour. Therefore, you can not average 60 miles an hour over the two laps

The question is misstated. They don't mention the 2 minute limit. If the limit were 3 or more minutes, 90 mph is right.

Zebra
04-15-2005, 09:38 AM
IIRC that scene in DHwaV is poorly edited. They leave out a step or two that Willis and Jackson take to get to the correct solution.

Colophon
04-15-2005, 10:35 AM
I think they meant per year.
Well then they still screwed up, because that makes two billion square feet. What a poorly written page all round.

Mmmm.... two billion square feet of pizza....

paperbackwriter
04-15-2005, 11:58 AM
From the site:
http://www.careertrip.net/JSresources/Articles/OrdealbyRiddl.htm

13. Say you are driving on a one-mile track. You do one lap at 30 miles an hour. How fast do you have to go to average 60 miles an hour?
The question is misstated.
Still misstated. The correct answer to "How fast do you have to go?" is a rate of speed, not a distance or a time. The rate is already given: 60mph.

Spectre of Pithecanthropus
04-17-2005, 12:09 PM
IIRC that scene in DHwaV is poorly edited. They leave out a step or two that Willis and Jackson take to get to the correct solution.

Oh well, if you think that's bad, you should hear Spencer Tracy spouting database design technology in Desk Set.

Bryan Ekers
04-17-2005, 12:20 PM
Oh well, if you think that's bad, you should hear Spencer Tracy spouting database design technology in Desk Set.

Or Matthew Broderick explaining computers in WarGames.

Chronos
04-17-2005, 02:45 PM
If you have a two minute time limit, then you're fine, and the answer is 90 mph. What the problem needs is a two-lap distance limit.

SPOOFE
04-17-2005, 05:29 PM
IIRC that scene in DHwaV is poorly edited. They leave out a step or two that Willis and Jackson take to get to the correct solution.
I think that's keeping with the Die Hard series' shtick of McClane often succeeding through dumb luck and happenstance in addition to his physical prowess.

Nightime
04-17-2005, 06:24 PM
If you have a two minute time limit, then you're fine, and the answer is 90 mph. What the problem needs is a two-lap distance limit.

Yeah, I just assumed the two lap limit for some reason. My first thought on reading the problem was "go 120 mph for your next two laps."