Letters used: ABELORSTUV
Last digit of a square can be only [0, 1, 4, 5, 6, 9]
Last letters are AETUV
The first letters cannot be zero, in order: TROUVABLE so zero must be S.
Hmm, "trouvable" looks like a word. It is not in a dictionary that I can find, but introuvable means "impossible to find". More on this later. In retrospect we almost had the solution without looking any further.
Five different letters are last in a word and must be in {0,1,4,5,6,9} or actually {1,4,5,6,9} because 0 is already known to be "S".
S = 0
AETUV are in {1,4,5,6,9}
BLOR are in {2,3,7,8}
The last 2 letters are: ['UE', 'LE', 'TA', 'AT', 'RU', 'RV', 'UT', 'SU', 'VA']
The last 2 digits of squares, eliminating doubles, can be:
['01', '04', '09', '16', '21', '24', '25', '29', '36', '41', '49', '56', '61', '64', '69', '76', '81', '84', '89', '96']
The second to last digit of LTOVABERSU is 0, therefore U is in {1,4,9}
We have UE and UT so {E,T} must be in {6 , 1,9 , 6}
Summary: S=0, U in {1,4,9}, {E,T} in {1,6,9}
We have a word ending in SRV so RV is in {24, 25, 36, 76, 81, 84, 89} given constraints on R.
These constraints bring down the total number of possibilities from 10! to 156.
The nine numbers and their square roots are:
1026753849 32043.0
2076351489 45567.0
3074258916 55446.0
4730825961 68781.0
5803697124 76182.0
6471398025 80445.0
7935068241 89079.0
8135679204 90198.0
9814072356 99066.0
0123456789
STROUVABLE
How about that, the alphametic words were in numeric order.
So the solution was not INTROUVABLE, it waS_TROUVABLE.
From the Latin trouvare or French trouver (to find).
------------
from itertools import permutations
squares = [str(n**2) for n in range(31623, 100000)]
S = '0'
for per in permutations('2378'):
B = per[0]
L = per[1]
O = per[2]
R = per[3]
for perm in permutations('14569'):
V = perm[0]
if R == '2' and V not in '45':
continue
if R in '37' and V != '6':
continue
if R == '8' and V not in '149':
continue
U = perm[1]
if U not in '149':
continue
E = perm[2]
if E not in '169':
continue
T = perm[3]
if T not in '169':
continue
A = perm[4]
if T+S+R+A+B+V+O+L+U+E not in squares:
continue
if R+S+B+A+O+V+T+U+L+E not in squares:
continue
if O+S+B+U+R+V+L+E+T+A not in squares:
continue
if U+B+O+S+L+R+V+E+A+T not in squares:
continue
if V+L+S+O+A+E+B+T+R+U not in squares:
continue
if A+U+B+T+O+E+L+S+R+V not in squares:
continue
if B+E+O+V+S+A+L+R+U+T not in squares:
continue
if L+T+O+V+A+B+E+R+S+U not in squares:
continue
if E+L+T+U+S+B+R+O+V+A not in squares:
continue
print('',T+S+R+A+B+V+O+L+U+E, int(T+S+R+A+B+V+O+L+U+E)**.5, '\n',
R+S+B+A+O+V+T+U+L+E, int(R+S+B+A+O+V+T+U+L+E)**.5, '\n',
O+S+B+U+R+V+L+E+T+A, int(O+S+B+U+R+V+L+E+T+A)**.5, '\n',
U+B+O+S+L+R+V+E+A+T, int(U+B+O+S+L+R+V+E+A+T)**.5, '\n',
V+L+S+O+A+E+B+T+R+U, int(V+L+S+O+A+E+B+T+R+U)**.5, '\n',
A+U+B+T+O+E+L+S+R+V, int(A+U+B+T+O+E+L+S+R+V)**.5, '\n',
B+E+O+V+S+A+L+R+U+T, int(B+E+O+V+S+A+L+R+U+T)**.5, '\n',
L+T+O+V+A+B+E+R+S+U, int(L+T+O+V+A+B+E+R+S+U)**.5, '\n',
E+L+T+U+S+B+R+O+V+A, int(E+L+T+U+S+B+R+O+V+A)**.5)
|
Posted by Larry
on 2024-01-15 09:45:34 |