6Nov/0823

## A simple but disturbing Math problem

My brother gave me a Math problem this morning. He and I both know how to solve it but we're both disturbed by the fact that the right answer seems unintuitive. I'm interested to see if one of you can explain the answer in a way that **is** intuitive.

Here's the problem: A car gets 50 miles per gallon for a 10 mile stretch of a trip and 40 miles per gallon for the next 10 mile stretch of the trip. What's the average miles per gallon for the two stretches of the trip?

Again, the point isn't to get the right answer. Go ahead and solve it, though, for your personal satisfaction. The point is how one can see that the answer isn't 45 miles per gallon.

Thoughts?

DavidNovember 6th, 2008 - 13:21

Could it be like the same problem with velocity? Like, you go 20 miles an hour for 10 miles, then 50 miles an hour for 10 more miles, what is your avg speed? Since you go faster for the second half, you spend less time doing so.

In fact, probably you are doing something like that here to get such different MPG ratings for those parts of the trip.

Andrea McBethNovember 6th, 2008 - 14:06

If your car gets 50 miles per gallon and you drive 10 miles — you have used 1/5 of a gallon.

If your car gets 40 miles per gallon and you drive 10 miles — you have used 1/4 of a gallon.

So, you have used 1/5 + 1/4 of a gallon — which is 9/20 of a gallon.

Miles per gallon is Miles divide by gallons

So…. A total of 20 miles … A total of 9/20 of a gallon.

20 divided by 9/20 is 44.4444444 miles per gallon.

(I think I am thinking correctly)

AnonymousNovember 6th, 2008 - 14:16

It is counter intuitive because the problem flips the result we expect like x behaves to 1/x.

Joshua ZuckerNovember 6th, 2008 - 14:16

If you lived in most any other part of the world, not only would it be kilometers and liters instead of miles and gallons, but your fuel efficiency would be given as “liters per hundred kilometers”.

To me, the difference there is that they think “I have so far to go, how much gas will I use?” while Americans think “I have so much gas in my tank, how far can I go?”

Anyway, with those common-sense units, your car gets 2 gallons per hundred miles for the first 10 miles, and 2.5 gallons per hundred miles for the next 10 miles, so you use 2.25 gallons per hundred miles overall.

The problem is whether the two stretches of the trip are equal. If your denominator is miles, as in my example, then they are equal. If your denominator is gallons, as in your statement of the problem, then since you don’t use an equal number of gallons in the two parts of the trip, you need a weighted average mpg according to the number of gallons rather than the number of miles.

And as the previous commenter mentioned, the same thing is true with average speeds. If you use miles per hour, then you can do simple averages as long as the number of hours is equal, but if the number of miles is equal then you need to weight your average, or use units where miles are in the denominator.

Sue D. NymmeNovember 6th, 2008 - 14:19

“Gallons per mile” is the same measure as “miles per gallon”; it’s just that the latter is more familiar to us. Since the problem is stated in terms of how many miles were traveled, gpm is a more useful measure.

50 mpg = 0.02 gpm

40 mpg = 0.025 gpm

Average = 0.0225 gpm = 44.44 mpg.

aria turnsNovember 6th, 2008 - 21:20

so ,what is the right answer?

SolNovember 6th, 2008 - 21:31

Andrea and Sue posted the right answer in the comments: 44 4/9

efriqueNovember 6th, 2008 - 23:01

Here’s one way to think of it:

At most one of “miles per gallon” and “gallons per mile” will average in the way you want (they can’t both do it, because of Jensen’s Inequality).

If you think about it for a few seconds, you;ll see why gallons per mile must average, so as a result miles per gallon cannot.

[The metric unit for fuel economy is liters/100km. That averages just fine.]

Consequently you work average mileage out via the harmonic mean (inverse of average of inverse), rather than the arithmetic mean.

pat ballewNovember 7th, 2008 - 00:37

I think this kind of problem first started out in the literature as a cistern filling problem. Pipe A can fill the cistern in 40 minutes, Pipe B can fill it in 50 minutes, How long will it take both pipes working together. I think that would be 22.22 minutes, which is one half the 44.44 (because there are two pipes). 44.4444 … is called the harmonic mean or harmonic average of the two numbers 40 and 50. Interestingly, one of the places I’ve seen this show up lately is in finding the length of the side of a square inscribed in a right triangle with one vertex of the square at the right angle. The answer, like the cistern problem, is one-half the harmonic mean of the two legs of the triangle.

Tristram BrelstaffNovember 7th, 2008 - 03:10

From the way the question is posed it is very tempting to think of the problem in terms of a graph of “miles per gallon” on the y-axis versus “miles” on the x-axis.

However, the answer is required in terms of “miles per gallon” so it is better to think of it as a graph of “miles travelled” versus “gallons used”.

This gives a line which consists of two segments: one between 0 and 4/20 gallons with a gradient of 50 miles per gallon, and another between 4/20 and 9/20 gallons with a gradient of 40 miles per gallon.

Because these two segments cover different sized sections of the x-axis (4/20 and 5/20) it is obviously incorrect to give the 50 mpg and 40 mpg equal weighting in finding the overall miles per gallon figure.

Nick JohnsonNovember 7th, 2008 - 07:09

+1 to Joshua Zucker for describing it clearly and succinctly. 🙂

notedscholarNovember 7th, 2008 - 17:33

The answer has to do with compounding numbers and equal fixed distance and gas amounts. It’s a deceptive equivalence problem, but pretty easy to see through. There is more information than just 50 and 40 and equal distance. The 50, for example, is happening every time period.

P. SwickardNovember 9th, 2008 - 03:56

Easiest way I can explain the answer to this particular problem to myself is to use numbers that come out more evenly:

Suppose you go 200 miles at 40 mpg, then go 200 miles at 50 mpg. (Or repeat the “10 miles at 40mpg and 10 miles at 50mpg” 20 times.) For the 40mpg stretch you use a total of 5 gallons of gas. For the 50mpg stretch you use a total of 4 gallons of gas. So you went a total of 400 miles and used a total of 9 gallons of gas, thus your average mpg is 400/9 or 44 4/9 mpg.

Part of what makes this particular problem insidious is that the actual answer is fairly close to the “intuitive” answer. Suppose you have a different situation, where you go ten miles at 10mpg and ten miles at 100,000 mpg. In this case, it is much more obvious that your fuel efficiency for the trip isn’t going to be the average of 10 and 100,000. And if you try to estimate this without doing the math, you reason that you get 10mpg and use a gallon of gas the first part of the trip and use nearly no gas the second part, so you go 20 miles for just a tiny bit over 1 gallon–thus your answer should be close to 20mpg, which is indeed close to the right answer.

A good follow-up for this is to figure out the more general case, when you travel A miles at x mpg and B miles at y mpg, how far off is the actual answer from being equal to the “intuitive” answer you get by averaging the miles per gallon? And how big does this difference get before it starts to become obvious that averaging the fuel efficiencies isn’t going to give you the right answer? Also, if x and y are different, what condition has to be true for the value to come out exactly to the intuitive answer you get by averaging x and y? Is this condition itself intuitive?

AlexNovember 9th, 2008 - 15:21

P. Swickard, your last question is quite easy to answer. As several people have mentioned, the answer is 44.44… which is the Harmonic Mean of 40 and 50 – whereas the intuitive answer, 45, is the Arithmetic Mean got by adding them up and halving the answer.

It’s a well-known (and easily proven) fact that the two means are only equal when x and y are the same.

P. SwickardNovember 10th, 2008 - 01:39

Let me clarify–imagine instead that x and y are different but the distances A and B don’t have to be equal. In this case it should be obvious that the average mpg will be somewhere between x and y–and in fact that we can adjust A and B to get any value between x and y we desire. What condition has to be met for the average mpg for the whole trip to work out to the arithmetic mean of x and y? And is it obvious why this is the case?

Not supposed to be a difficult problem, especially if you work it out with some actual numbers. And being able to state the condition in plain English is a good concrete way to convince yourself that the average mpg for the trip will never be equal to just the arithmetic mean of the individual mpgs if the distances are the same but the fuel efficiencies are different…

SolNovember 10th, 2008 - 07:39

Everyone,

I’m very impressed with the caliber of comments on this post. I’m seeing that there’s an interest in my blogging odd little Math problems that are perhaps more accessible to folks than the MMM contests, which don’t appeal to everyone.

konayukiNovember 10th, 2008 - 16:02

Probably you want to check out this website: http://betterexplained.com/articles/how-to-analyze-data-using-the-average/

The concept we’re looking at in this case is introduced as a harmonic mean, which means the value of comparison is taken as a rate.

RobertoNovember 11th, 2008 - 01:54

The issue, as various have pointed out, is that it’s a combination of gas used in some given miles. In order for the miles per gallon measurement to simply average as one would think intuitively then you have to fix the amount of gas used at the various speeds and therefore change the distances traveled at those speeds accordingly.

For example, if you travel at 50mpg for 10 miles you use 1/5 gallons of gas. Then if you travel 40mpg for 8 miles you also use 1/5 gallons of gas. Then the average fuel efficiency for the 18 miles traveled = (50+40)/2 = 45mpg

TaviNovember 19th, 2008 - 23:46

If you live in continetal Europe the problem is quite intuitive.

Here we mesure the fuel consumption (or efficiency) instead of how many miles a vehicle can travel on one gallon of fue. This is a mesured in liters per 100 kilometers.

This is an inverse mesure as mpg, the smaller it is the more efficient car you have.

So converting in L/100km is just an arithmetic mean problem.

Lets use google for the conversion:

http://www.google.ro/search?hl=en&q=50+mpg+in+liters+per+100+kilometer&btnG=Search&aq=f&oq=

http://www.google.ro/search?hl=en&q=40+mpg+in+liters+per+100+kilometer&btnG=Search&aq=f&oq=

50 mpg = 4.70429167 liters per (100 kilometer)

40 mpg = 5.88036458 liters per (100 kilometer)

As the 2 distangnces are equals the average fuel usage is the arithmetic mean

(4.70429167 + 5.88036458

)/2 = 5.292328125

Converting back in mpg

http://www.google.ro/search?hl=en&q=5.292328125+liters+per+(100+kilometer)+in+mpg&btnG=Search&aq=f&oq=

(5.292328125 liters) per (100 kilometer) = 44.4444444 miles per gallon

sharon jNovember 25th, 2008 - 08:48

what is the remainder for 192 to the 400th power divided by 10?

TaviNovember 25th, 2008 - 10:13

the last digit of 192^400 is same as 2^400

2^400 = 16^100 has same digit as 6^100

6 to any power end in 6.

So the answer is 6.

SilverdevilboyDecember 24th, 2008 - 13:21

It’s simply the fact that the average you are taking is the average of the miles per gallon, the arithmetic mean. Unforunately, since you are calculating the mean rate, and the constant is the miles rather than the gallons, your variable is a 1/X rather than X. That means you are using the harmonic mean instead.

TyciaFebruary 22nd, 2010 - 20:22

how can you get 50 miles/gallon or even 40miles/ gallon in a 10 mile strip? This may seam like a dumb question but that just doesn’t make sense to me