Sunday Times Teaser 2501 – No Title
by Peter Harrison
Published August 30 2010 (link)
Mark took two identical regular tetrahedra and stuck them together to make a “triangular bipyramid” with six triangular faces, five vertices and nine edges. On each edge he wrote a number, choosing them so the sum of the three numbers around any face gave the same “face total”. Furthermore if you chose any vertex and added up the numbers on the three or four edges meeting there, then you got the same “vertex sum” each time. Mark then noticed that if he reversed the order of the three digits in the “face sum” then he got the “vertex sum”.
What is the sum of the nine numbers?
One Comment
Leave one →
-
Brian Gladman permalink1234567891011121314151617181920212223242526272829303132333435from sympy import symbols, linsolve, Eq, evalf# a..i are the edge values, v is the vertex sum, w is the face suma, b, c, d, e, f, g, h, i, v, w = symbols('a b c d e f g h i v w')# find a solution for the edge values and the vertex sum# in terms of the face sum (w)sol=linsolve([# vertex sums (sum v)a + b + c - v, a + d + e + g - v, b + e + f + h - v,c + d + f + i - v , g + h + i - v,# face sums (sum w)a + c + d - w, a + b + e - w, b + c + f - w,d + g + i - w, e + g + h - w, f + h + i - w],# variables to solve for (use w as the independent variable)(a, b, c, d, e, f, g, h, i, v))# there is only one solutionsol, = sol# consider possible values for the face sumfor fs in range(100, 1000):# evaluate the vertex sumvs = sol[-1].evalf(subs={w:fs})# is the vertex sum the reverse of the face sum?if vs == int(str(fs)[::-1]):# evaluate the edge values and convert them to integersa2i = tuple(ex.evalf(subs={w:fs}) for ex in sol[:-1])a2i = tuple(int(x) if int(x) == x else None for x in a2i)if all(a2i):print(f'Sums: edge {sum(a2i)}, vertex {int(vs)}, face {fs}, a..i = {a2i}')