WoodCentral Forums

Est. 1998 — 27 years of woodworking knowledge

Friday Puzzle -- How big a square

Posts

Friday Puzzle -- How big a square

#1

Friday Puzzle -- How big a square

Alex Y

I drew a square whose sides were less than 80 units long.

Within the top left-hand quarter of the square I marked four points, each of which

was an integral, non-zero, number of units, not only from each side of the square but also from both the top left-hand corner and the bottom right-hand corner of the square.

How long was each side of the square?

Source: New Scientist magazine, 05 May 2010.

By Richard England.

Re: Friday Puzzle -- How big a square

#2

Re: Friday Puzzle -- How big a square

David Weaver

OK...I'm busy drawing triangles. two of the points must belong to triangles with lengths 3, 4, 5

Trying to find the next size triangle where there is a relationship with x^2 + y^2 = z^2 with integers for all three.

Re: Friday Puzzle -- How big a square

#3

Re: Friday Puzzle -- How big a square

David Weaver

The way I'm attempting to solve this (by putting together all integer solutions to the pythagorean theorem and then finding other solutions where legs the complement to the length of the sides is solved also within those) is labor intensive.

For example. If triangles of 3,4,5 and 6,8,10 make up the four points in the upper quadrant, then the solution needs to have legs of x (<77), x-1, x-3 and x-5.

Then I'd have to actually do the work to find those sets, and it may be that none are satisfied with the numbers I have, and that the triangles that make up the corners may be larger, like 5,12,13 or something like that.

That's a lot of work! I'll get back to it, but not during regular work hours.

I think I could set up a system of equations to solve that would "do the work" for me, but it would take more organization than I have time for now. I have all of the solutions for the pythagorean theorem where each leg is less than 77.

Re: Friday Puzzle -- How big a square

#4

Labor intensive

Alex Y

Yes, this puzzle seems very computer-friendly, and since my computer "programming" skills are mainly spreadsheet macros, I found solving this one difficult. I took the same approach you have, but made a very stupid error, leading to a conclusion that there was no solution.

Re: Friday Puzzle -- How big a square

#5

Re: Friday Puzzle -- How big a square

David Weaver

well, I've got one solution at 60 length sides so far.

It is made up of triangles with side lengths

er...except that wouldn't put the second two sets of points from the 15,36 in the upper left quadrant.

I'll keep going. Those would've been:

(5,12)*

(55,48)

(15,36)*

(45,24)

Re: Friday Puzzle -- How big a square

#6

Re: Friday Puzzle -- How big a square

David Weaver

I have a solution at 72 now

(16,30), (56,42)

(9,12), (63,60)

Those being the lengths and heights of the various triangles needed to get to 72 total to make the square's sides.

Re: Friday Puzzle -- How big a square

#7

The easy way

Bill Earl

David beat me to the answer. But here is the programmatic solution (in C#)

using System;

using System.Text;

namespace pythagoras

{

class Program

{

static void Main(string[] args)

{

for (int side = 1; side < 80; side++)

{

TestSquare(side);

}

Console.ReadLine();

}

private static void TestSquare(int side)

{

Console.WriteLine("Testing side = " + side.ToString());

for (int x = 1; x < side / 2; x++)

{

for (int y = 1; y < side / 2; y++)

{

double Hyp1 = Math.Sqrt(Math.Pow(x, 2) + Math.Pow(y, 2));

double Hyp2 = Math.Sqrt(Math.Pow(side-x, 2) + Math.Pow(side-y, 2));

if (Math.Floor(Hyp1) == Hyp1 && Math.Floor(Hyp2) == Hyp2)

{

Console.WriteLine("Side = {0}; x = {1}, y = {2}, Hyp11 = {3}, Hyp2 = {4}", side, x, y, Hyp1, Hyp2);

}

}

}

}

}

}

Re: Friday Puzzle -- How big a square

#8

The complete output:

Bill Earl

Testing side = 1

Testing side = 2

Testing side = 3

Testing side = 4

Testing side = 5

Testing side = 6

Testing side = 7

Testing side = 8

Testing side = 9

Testing side = 10

Testing side = 11

Testing side = 12

Testing side = 13

Testing side = 14

Testing side = 15

Testing side = 16

Testing side = 17

Testing side = 18

Testing side = 19

Testing side = 20

Testing side = 21

Testing side = 22

Testing side = 23

Testing side = 24

Side = 24; x = 3, y = 4, Hyp11 = 5, Hyp2 = 29

Side = 24; x = 4, y = 3, Hyp11 = 5, Hyp2 = 29

Testing side = 25

Testing side = 26

Testing side = 27

Testing side = 28

Testing side = 29

Testing side = 30

Testing side = 31

Testing side = 32

Testing side = 33

Side = 33; x = 5, y = 12, Hyp11 = 13, Hyp2 = 35

Side = 33; x = 12, y = 5, Hyp11 = 13, Hyp2 = 35

Testing side = 34

Testing side = 35

Testing side = 36

Side = 36; x = 8, y = 15, Hyp11 = 17, Hyp2 = 35

Side = 36; x = 15, y = 8, Hyp11 = 17, Hyp2 = 35

Testing side = 37

Testing side = 38

Testing side = 39

Testing side = 40

Testing side = 41

Testing side = 42

Testing side = 43

Testing side = 44

Testing side = 45

Testing side = 46

Testing side = 47

Testing side = 48

Side = 48; x = 6, y = 8, Hyp11 = 10, Hyp2 = 58

Side = 48; x = 8, y = 6, Hyp11 = 10, Hyp2 = 58

Testing side = 49

Testing side = 50

Testing side = 51

Testing side = 52

Side = 52; x = 7, y = 24, Hyp11 = 25, Hyp2 = 53

Side = 52; x = 24, y = 7, Hyp11 = 25, Hyp2 = 53

Testing side = 53

Testing side = 54

Testing side = 55

Testing side = 56

Testing side = 57

Testing side = 58

Testing side = 59

Testing side = 60

Side = 60; x = 5, y = 12, Hyp11 = 13, Hyp2 = 73

Side = 60; x = 12, y = 5, Hyp11 = 13, Hyp2 = 73

Testing side = 61

Testing side = 62

Testing side = 63

Side = 63; x = 8, y = 15, Hyp11 = 17, Hyp2 = 73

Side = 63; x = 15, y = 8, Hyp11 = 17, Hyp2 = 73

Testing side = 64

Testing side = 65

Testing side = 66

Side = 66; x = 10, y = 24, Hyp11 = 26, Hyp2 = 70

Side = 66; x = 24, y = 10, Hyp11 = 26, Hyp2 = 70

Testing side = 67

Testing side = 68

Testing side = 69

Testing side = 70

Testing side = 71

Testing side = 72

Side = 72; x = 9, y = 12, Hyp11 = 15, Hyp2 = 87

Side = 72; x = 12, y = 9, Hyp11 = 15, Hyp2 = 87

Side = 72; x = 16, y = 30, Hyp11 = 34, Hyp2 = 70

Side = 72; x = 30, y = 16, Hyp11 = 34, Hyp2 = 70

Testing side = 73

Testing side = 74

Testing side = 75

Side = 75; x = 7, y = 24, Hyp11 = 25, Hyp2 = 85

Side = 75; x = 24, y = 7, Hyp11 = 25, Hyp2 = 85

Testing side = 76

Side = 76; x = 21, y = 28, Hyp11 = 35, Hyp2 = 73

Side = 76; x = 28, y = 21, Hyp11 = 35, Hyp2 = 73

Testing side = 77

Side = 77; x = 5, y = 12, Hyp11 = 13, Hyp2 = 97

Side = 77; x = 12, y = 5, Hyp11 = 13, Hyp2 = 97

Testing side = 78

Testing side = 79

Re: Friday Puzzle -- How big a square

#9

  good job


Re: Friday Puzzle -- How big a square

#10

40 years ago

Alex Y

I might have done this in Fortran, but no more!

Re: Friday Puzzle -- How big a square

#11

My error

Alex Y

I said I was following the same tack, but made a stupid error. Specifically, I was looking for small and large triangles, then seeing which two pairs had legs that added to the same number. But looking at the small triangles in the first quadrant, I looked only up to size 19 (1/4 --quadrant?!?!--of a number smaller than 80) rather than to 39!

DOH!! Stupid, stupid, stupid.

Good job David and Bill

Re: Friday Puzzle -- How big a square

#12

Re: My error

David Weaver

i almost gave up around that point just out of fatigue.

logical errors on trivial things are tough to eliminate!

👍 This page answered my questions

Your vote helps other woodworkers quickly find the answers and techniques that actually work in the shop.