# Enigmatic Code

Programming Enigma Puzzles

## Enigma 858: A matter of degree

From New Scientist #2013, 20th January 1996 [link]

Within the Earth’s atmospheric range, it is not possible to convert any whole number of degrees Fahrenheit into Celsius by reversing the digits. There is a good approximation in the case of 82 °F, which is nearly 28 °C the same may be said for 61 °F and 16 °C, but in neither case is the conversion exact.

It is possible to construct another scale to Celsius, sharing zero as freezing point, but with a different boiling point, which is a whole number berween Celsius’s 100° and Fahrenheit’s 212°, so that there is a positive point on the Fahrenheit scale which may be converted exactly into the equivalent temperature on the alternative scale simply by reversing the two digits.

What is boiling point on the alternative scale, and what is the convertible Fahrenheit temperature?

[enigma858]

### 2 responses to “Enigma 858: A matter of degree”

1. Jim Randell 17 June 2022 at 10:36 am

If B is the boiling point of water on the “Enigma” (E) scale (100 < B ≤ 212) then we can convert from C to E as follows:

E(C) = B × C / 100

And we can convert F to C with:

C(F) = (5/9)(F − 32)

So, if we start with a measurement in F, the corresponding E value is:

E(F) = B × (F − 32) / 180

So, alphametically, starting with a 2-digit F measurement of XY, we have:

B × (XY − 32) / 180 = YX
B = 180 × YX / (XY − 32)

And we can use this function with the [[ `SubstitutedExpression` ]] solver from the enigma.py library to solve the puzzle.

The following run file executes in 82ms.

Run: [ @replit ]

```#! python3 -m enigma -r

SubstitutedExpression

--digits="1-9"
--distinct=""

--code="B = lambda XY, YX: div(180 * YX, XY - 32)"

"99 < B({XY}, {YX}) < 213"

```

Solution: The boiling point of water on the alternative scale is 156. A temperature of 62 on the Fahrenheit scale is equivalent to a temperature of 26 on the alternative scale.

So: 62 °F = 26 °E = 16.(6)… °C.

Somewhat cooler than today’s projected maximum temperature in the UK.

2. Hugh Casement 17 June 2022 at 3:00 pm

Without the restriction on the range of boiling points, there are many possible solutions.
For example B = 87°, 92°F converts to 29°; or B = 225°, 52°F converts to 25°.

This site uses Akismet to reduce spam. Learn how your comment data is processed.