The program as originally written, requiring an exact equality, did not find any result. I changed it to ask only for an approximate answer, starting within 1 of equality. That degree of approximation was too wide, giving many results. I had to narrow it down to within 0.0028 to get down to one solution.
Even trying negative square roots did not produce an exact answer.
sqrt(492) + 48 ~= 70.18
sqrt(4925) ~= 70.18
but the respective values are more precisely approximately 70.1810730128188 and 70.178344238091.
digsets=digs(combinator(9,5,'p'));
for i=1:length(digsets)
digs=digsets(i,:);
tea='teatoteam';
for j=1:5
tea=replace(tea,lets(j),digs(j));
end
team0=str2double(tea(6:9));
to=str2double(tea(4:5));
tea0=str2double(tea(1:3));
for tea=[tea0 -tea0]
for team=[team0 -team0]
if abs(sqrt(tea)+to-sqrt(team))<.0028
disp([tea to team])
disp([sqrt(tea)+to sqrt(team)])
end
end
end
end
It finds
TEA TO TEAM
492 48 4925
70.1810730128188 70.178344238091
showing values of LHS and RHS on the line below those of TEA, TO and TEAM.
|
Posted by Charlie
on 2023-03-28 09:28:52 |