--- title: "The Solution of the Puzzle of the Month" type: "article" slug: "the-solution-of-the-puzzle-of-the-month" url: "http://localhost/article/the-solution-of-the-puzzle-of-the-month/" markdown_url: "http://localhost/article/the-solution-of-the-puzzle-of-the-month.md" published_at: "2026-11-03T17:32:01+00:00" modified_at: "2026-11-03T17:32:01+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Puzzle of the Month The GIVENS of this puzzle are: A. There are 5 children, all more than 1 year old and younger than 25. B. Their combined ages total 40. C. The product of the boys' ages is 39 times the product of the girls' ages. D. Next year, the product of the boys'…" post_tag: - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Cedric Bastiaans" slug: "bastiaans-cedric" taxonomy: "indiv" url: "http://localhost/indiv/bastiaans-cedric/" publication: "Time Designs Magazine" publication_r: id: 10277 title: "Time Designs Magazine" type: "periodical" url: "http://localhost/periodical/time-designs-magazine/" authors: "Cedric R. Bastiaans" volume: "4" issue: "5" issues_articles: - id: 26788 title: "Time Designs Magazine v4 n5" type: "issue" url: "http://localhost/issue/time-designs-magazine-v4-n5/" pages: "27, 29" pubdate: "July/August 1988" archive_link: false volumeissue: "v4n5" --- # The Solution of the Puzzle of the Month ### Puzzle of the Month The GIVENS of this puzzle are: A. There are 5 children, all more than 1 year old and younger than 25. B. Their combined ages total 40. C. The product of the boys’ ages is 39 times the product of the girls’ ages. D. Next year, the product of the boys’ ages is an even number of times the product of the girls’ ages. CAN YOU COME UP WITH A PROGRAM FOR OUR COMPUTERS TO FIGURE OUT THE AGES OF THE FIVE CHILDREN??? ### The Solution of the Puzzle of the Month First, we’ll give the children some simple names, very simple like a, b, c, d and e. Then, we will assume that there are 3 girls and 2 boys. Maybe it’s the other way around, but we’ll see. Furthermore, the number 39 can only be composed of 1×39 or 3×13. What this means is that one of the boys simply HAS to be 13 years old, while another boy’s age HAS to be divisible by 3. We may thus write: ``` a=13 and b=3t, where t=1,2,3....8 (maximum 8, because no one can be older than 24). ``` The girls being called c,d and e, we may write (algebraically): ``` 39cde = 13(3t) or cde = t ........................(1) Also: c+d+e+13+(3t) = 40 or c+d+e = 27-3t ..............(2) ``` Since c,d and e are older than or as old as 2 years, we can write: ``` cde >= 8 ...............................................(3) and c+d+e >= 6 .............................................(4) ``` From equations (1) and (3) follows that: ``` t >= 8 .................................................(5) ``` On the other hand, from (2) and (4) we find: ``` t <= 7 .................................................(6) ``` Equations (5) and (6) contradict and the truth is therefore that we have THREE boys and only TWO girls! The situation for the 3 boys a, b and c and the 2 girls d and e is therefore a trifle different: ``` 39de = 13(3t)c or de = tc or c = de/t .........(7) ``` while, however, equation (2) still holds true! Substituting for c in (2) yields: ``` 3t+de/t+d+e = 27 or 3t²+de+dt+et = 27t or t²+de+dt+et = 27t-2t² or (d+t)(e+t) = t(27-2t) ..................................(8) ``` We may thusly write the following program: ``` 10 LET A=13 20 FOR T=2 TO 7 30 LET B=3*T 40 REM EQUATION (8): LET SUM=T*(27-2*T) 50 FOR D=2 TO 24 60 FOR E=D TO 24 70 REM EQUATION (7): LET C=D*E/T 80 IF C=INT(C) AND (D+T)*(E+T)=SUM THEN GOSUB 1000 90 NEXT E 100 NEXT D 110 NEXT T 120 STOP 1000 REM NEXT YEAR AND SOLUTION 1010 LET X=(A+1)*(B+1)*(C+1) 1020 LET Y=(D+1)*(E+1) 1030 IF X/Y=INT(X/Y) THEN PRINT "THE BOYS ARE ";A;", ";B; " AND";C;" YEARS, THE GIRLS ARE ";D;" AND ";E;"." 1040 RETURN ``` With this program keyed into my TS2068, it displayed the solution in 11 seconds BOYS 13, 9 and 8; GIRLS 4 and 6.