Teaser 2987: Table mats
From The Sunday Times, 22nd December 2019 [link] [link]
Beth and Sam were using computers to design two table mats shaped as regular polygons.
The interior angles of Beth’s polygon were measured in degrees; Sam’s were measured in grads. [A complete turn is equivalent to 360 degrees or 400 grads.]
On completion they discovered that all of the interior angles in the 2 polygons had the same numerical whole number value.
If I told you the last digit of that number, you should be able to work out the number of edges in (a) Beth’s table mat and (b) Sam’s table mat.
What were those numbers?
[teaser2987]
Jim Randell 8:53 pm on 20 December 2019 Permalink |
This Python program determines the regular polygons with integer internal angles for 360 divisions (degrees) and 400 divisions (grads). It then finds the common values, and which of those are unique mod 10. It runs in 77ms.
Run: [ @repl.it ]
from enigma import (divisors_pairs, intersect, filter_unique, printf) # record n-gons by internal angles # t is the number of subdivisions in a circle # return map of: <internal angle> -> <number of sides> def ngons(t): r = dict() for (d, n) in divisors_pairs(t, every=1): if n > 2: r[t // 2 - d] = n return r # find n-gons for 360 subdivisions and 400 subdivisions A = ngons(360) B = ngons(400) # find interior angles that match ss = intersect([A.keys(), B.keys()]) # filter them by the units digit ss = filter_unique(ss, (lambda x: x % 10)) # output solution for i in ss.unique: printf("angle = {i} -> (a) {a}-gon, (b) {b}-gon", a=A[i], b=B[i])Solution: (a) Beth’s polygon has 72 sides; (b) Sam’s polygon has 16 sides.
A 72-gon has internal angles measuring 175°. A 16-gon has internal angles measuring 157.5° = 175 grads.
There are 4 numbers which will give regular n-gons for angles expressed in degrees and grads. These are:
Obviously only the last of these is uniquely identified by the final (units) digit.
LikeLike
GeoffR 8:53 am on 24 December 2019 Permalink |
This programme gives four answers to the constraints in the puzzle.
The first three answers have a common units digit of zero, and the fourth answer has a unique digit of five, which provides the answer to the puzzle. Merry Xmas!
LikeLike