Tricky homework problem for an eight year old



Please help me help my eight year old with her homework:

Can you find three different odd numbers [positive integers implied]
that add up to 25?
Can you find all possible answers?
How do you know you have found them all?

The best I could do was to find use SQL and the standard trick of a
'Sequence' table of integers and 'Cartesian Product' (CROSS JOIN):

SELECT S1.seq, S2.seq, S3.seq
FROM Sequence AS S1, Sequence AS S2, Sequence AS S3
WHERE S1.seq BETWEEN 1 AND 25
AND S1.seq % 2 = 1
AND S2.seq BETWEEN 1 AND 25
AND S2.seq % 2 = 1
AND S3.seq BETWEEN 1 AND 25
AND S3.seq % 2 = 1
AND S1.seq < S2.seq
AND S2.seq < S3.seq
AND S1.seq + S2.seq + S3.seq = 25;

I started off with no predicates (no WHERE clause), added them one by
one and she could follow OK. But I still can't answer how I know these
are all the possible 'answers'.
.


Quantcast