Teaser 3183: Partial eclipse
From The Sunday Times, 24th September 2023 [link] [link]
Alf, Bert and Charlie were comparing their experiences of the eclipse from different locations. The moon appeared to be exactly the same size as the sun as it passed in front of part of the sun’s disc. The magnitude of an eclipse measures the maximum part of the diameter of the sun’s disc that is obscured. Taking the apparent diameter of the sun as 100, they noted the following:
Alf: “My magnitude was a whole number”.
Bert: “If I took the part of the sun’s circumference that was obscured, multiplied it by the radius and then subtracted the area of the sun’s disc that was obscured, I also got a whole number”.
Charlie: “Both of those statements are true for all of us, but we all saw different magnitudes greater than 10”.In increasing order, what were those three magnitudes?
As well as this puzzle being Teaser 3183 there are now 3183 puzzles posted in total between the Enigmatic Code and S2T2 sites.
[teaser3183]

Jim Randell 4:55 pm on 22 September 2023 Permalink |
If we suppose the apparent radius of the two discs is R, and we consider the part of the circumference of the sun that is obscured, then it forms the arc of a circular sector that subtends an angle of 2θ at the centre of the sun’s disc. The length of the obscured circumference is then: 2Rθ.
The area of the part of the sun’s disc that is obscured A can be calculated as the sum of two equal obscured segments, each being the area of the circular sector less the area of the triangle formed by replacing the arc of the sector with a chord.
(See also: [@wikipedia])
And so B’s measure is:
And A’s measure (the magnitude) m is given by:
So given an integer magnitude, we can calculate a rational value for cos(θ), and using the identity cos²(θ) + sin²(θ) = 1 we can calculate a value for sin(θ), which must also be rational if B is to have an integer value.
This Python program runs in 61ms. (Internal runtime is 413µs).
from enigma import (Rational, irange, is_square_q, sq, as_int, printf) Q = Rational() # apparent radius R = 50 # consider possible magnitudes from 11 to 99 for m in irange(11, 99): # calculate cos(theta), sin(theta) cost = 1 - Q(m, 2 * R) sint = is_square_q(1 - sq(cost), F=Q) if sint is None: continue # calculate B's measure B = 2 * sq(R) * sint * cost # is it an integer? B = as_int(B, default=None) if B is None: continue # output solution printf("m={m} -> B={B}")Solution: The magnitudes are: 20, 40, 72.
And we have:
There are only 3 values because the “partner” value for m = 72 (which also gives B = 1344) is m = 4.
LikeLike
Frits 8:47 pm on 22 September 2023 Permalink |
I had to look up some formula and came to the same formula for B.
# apparent radius R = 50 # consider possible magnitudes from 11 to 99 for m in range(11, 100): # calculate cos(theta) c = 1.0 - m / (2 * R) # calculate sin(theta), c^2 + s^2 = 1 s = (1 - c**2)**.5 # B = r^2.sin(2 * theta), sin(2x) = 2.sin(x).cos(x) B = 2 * R * R * s * c # is it close to an integer? if abs(B - round(B)) > 1e-6: continue # output solution print(f"m={m} -> B={B:.2f}")LikeLike
Jim Randell 2:38 pm on 23 September 2023 Permalink |
With a bit more work we can simplify the calculation of B to:
Which gives a simpler program, that only uses integers:
Run: [ @replit ]
from enigma import (irange, is_square, div, printf) # apparent radius R = 50 # consider possible magnitudes from 11 to 99 for m in irange(11, 99): r = is_square(m * (4 * R - m)) if r is None: continue B = div((2 * R - m) * r, 2) if B is None: continue # output solution printf("m={m} -> B={B}")LikeLike