### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,158)
- misc (2)
- project euler (2)
- puzzle (40)
- site news (44)
- tantalizer (42)
- teaser (3)

### Site Stats

- 177,959 hits

Advertisements

Programming Enigma Puzzles

23 July 2012

Posted by on **From New Scientist #2689, 3rd January 2009** [link]

Joe did not trust the accuracy of his two digital thermometers, but he knew he could be confident that their percentage errors were constant over the range he needed to use them.

He placed the sensors of both thermometers in a beaker of oil and noted the temperatures indicated as the oil slowly warmed up. When one indicated 76.3°C the other indicated 150.1°F, and when one indicated 98.1°C, the other indicated 184.3°F.

As the oil cooled down, one indicated temperature was 167.2°F and Joe found he was able to calculate the corresponding true temperature of the oil in degrees celsius.

What was the true temperature?

[enigma1526]

Advertisements

%d bloggers like this:

This Python program is an expansion of the Perl code I wrote originally to solve the problem. It checks possible temperatures for the first reading (from 20.0°C to 200.0°C in increments of 0.1°C), computes the errors for each thermometer and then finds the value for which the calculated second temperatures for each thermometer are closest. It runs in 44ms.

Solution:The true temperature is 80°C.And here’s an algebraic solution using SymPy.

I think this one can be done with pencil and paper. Let’s suppose the readings need to be multiplied by c and f respectively to give the true temperatures:

1.8 × 76.3 c = 150.1 f – 32

1.8 × 98.1 c = 184.3 f – 32

Not the neatest pair of simultaneous equations, but they can be solved to give f = 20/19 = 1/0.95.

So we divide 167.2 by 0.95 to give 176°F = 80° Celsius. That’s probably what you’re doing, but less transparently!

I have to say it’s a most unreasonable assumption that a thermometer would have an error proportional to the difference from some arbitrary point (the freezing point of water or the temperature of Herr Fahrenheit’s ice & salt mixture). I have one where the crossover point appears to be about 12.5°, but the slope could just as easily be negative.