Die Hard With A Vengeance--That trick with the water jugs

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?

It’s a standard interview question. Scroll down on this page for the answer.

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.

*“Jezus? Do I look Puerto Rican to you?” *

Sorry to hijack, but I’m not following the maths on this question:

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:

I think they meant per year.

From the site:
http://www.careertrip.net/JSresources/Articles/OrdealbyRiddl.htm

  1. 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.

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.

Well then they still screwed up, because that makes two billion square feet. What a poorly written page all round.

[Homer]
Mmmm… two billion square feet of pizza…
[/Homer]

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.

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.

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.

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.

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.”