Brainteaser 1822: Teasing triangles
From The Sunday Times, 17th August 1997 [link]
Each of the ten line segments in the picture have been given a different whole number value from 0 to 9. A figure shown in a triangle equals the sum of the three values assigned to the sides of the triangle. The figures which have not been given from the other two triangles are the same as each other and the two add together to give a perfect square.
What are the numbers assigned to each side?
This puzzle is included in the book Brainteasers (2002). The puzzle text above is taken from the book.
[teaser1822]

Jim Randell 8:11 am on 28 June 2020 Permalink |
We can use the [[
SubstitutedExpression()]] solver from the enigma.py library to solve this puzzle.The following run file executes in 96ms.
Run: [ @repl.it ]
Solution: The numbers assigned to each line are shown below:
LikeLike
Jim Randell 12:38 pm on 30 June 2020 Permalink |
The puzzle as originally published in The Sunday Times was worded as follows:
CD being the external edge of the 23 triangle (which is the value C in my solution).
We can adjust the run-file accordingly:
And we find that there are 24 ways to fill out the numbers, but the value on the required edge is always 9.
LikeLike
GeoffR 4:09 pm on 29 June 2020 Permalink |
% A Solution in MiniZinc include "globals.mzn"; % using the vertex labels A,B,C,D and E (as original diagram in link) % plus F for the central point % outside edges of the pentagon var 0..9:AB; var 0..9:BC; var 0..9:CD; var 0..9:DE; var 0..9:EA; % internal lines to central point F var 0..9:AF; var 0..9:BF; var 0..9:CF; var 0..9:DF; var 0..9:EF; constraint all_different ([AB, BC, CD, DE, EA, AF, BF, CF, DF, EF]); % three given triangles are AEF, ABF and CDF constraint AF + EF + EA == 7; constraint AB + AF + BF == 9; constraint CF + DF + CD == 23; % the other two triangle sides (BCF and DEF) are the same total % and the two add together to give a perfect square constraint DE + EF + DF == BF + CF + BC; set of int: sq = {16, 25, 36, 49, 64, 81}; constraint (DE + EF + DF + BF + CF + BC) in sq; solve satisfy; % AB = 0; BC = 3; CD = 6; DE = 5; EA = 1; % AF = 2; BF = 7; CF = 8; DF = 9; EF = 4; % % time elapsed: 0.06 s % ---------- % ==========LikeLike
GeoffR 1:46 pm on 8 July 2020 Permalink |
My solution below is updated for the original Sunday Times description, the solution above being the solution being based on the teaser in the book Brainteasers (2002, edited by Victor Bryant).
LikeLike