Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. **There will be no changes to other Yahoo properties or services, or your Yahoo account.** You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

## Trending News

# Tiling the smallest square with 5 Pythagorean triangles?

Can you beat this record?

Engr No, ELCE:

I will not say much, you may want to recheck your answer :)

Look I have NOT told ANY right angle triangle by Pythagorean triangle I mean triangle with integer sides. Hope this makes it clear.

### 1 Answer

- QuadrilleratorLv 51 decade agoFavorite Answer
I think the answer to your question (what is length of a side of the smallest square that can be partitioned into 5 Pythagorean Triangles?) is 1248, as shown in the link you gave.

In broad strokes (which logic may be faulty), my thinking was as follows:

There are no isosceles Pythagorean triangles.

Since Pythagorean triples are given by 2krs, k(r²-s²), k(r²+s²) it is straightforward to see that the area of any Pythagorean triangle must always be a multiple of 6, hence the side length must be a multiple of 6. This however, did not help for the rest of the problem.

My next observation was that the sum of the degrees must be 5*180. The 4 corners of the square are worth 2*180, so there should be 3*180 degrees still in play. A point (triangle vertex) on the side of the square is worth 180 degrees, while an internal point is worth either 360 or 180 (this latter if it is on the side of a triangle (as in the link you gave).

At most there can be one internal 360 degree point. If there is a 360 degree point, then it must have at least 4 segments emanate from it, which segments must terminate on other vertices (ie. 4 corners and the remaining point). That means at least 3 corners, but since the included sides would have to be hypotenuses, that forces the 360 degree point to the center of the square, resulting in isosceles right triangles, contradition.

With logic like the prior paragraph, one looks at the placement of 3 180 degree points. There were three interesting situations. For the first case, I figured to divide the square up into two rectangles where I would split each of the two ractangles into two Pythagorean trianges, and then I would subdivide one of the Pythagoran triangles. I could not find any "Pythagorean rectangles" that would assemble into a square (but I don't have a proof for it).

For the 2nd case, I figured to put a point on one side of the square, and connect that point to the two vertices on the opposite edge (and then I would subdivide the non Pythagorean triangle and one of the Pythagorean ones). I didn't find any point that would yield two Pythagorean triangles. Again I did not see a quick proof.

Finally, I tried putting a point each on two adjacent sides, and connecting those points (and subdividing the internal triangle formed) - this is what the figure in the link shows, and this led to values in the link.

When I say I tried looking at, I mean that I wrote a program (in PHP) that exhaustively tried all combinations of valid integer (leg1,leg2,hypotenuse) for the situations given. It might be the case that I missed a different configuration that my PHP program did not analyze.

The final solution, for reference, is:

(1248,261;1275) + (1248,364;1300) + (987,884;1325) + (1125,600;1275) + (1125,700;1325)

Oh, and just to show that my heart is in the right place, here is the next largest solution that I found:

(2340,1353;2703) + (2340,1456;2756) + (987,884;1325) + (1272,2385;2703) + (1272,371;1325)

PHP code follows:

<?php

$aLegs = array(); // $aLegs[$leg1][$leg2] = $hypotenuse

$aHyps = array(); // $aHyps[$hypotenuse][$leg] = $otherLeg

$aMatch = array(); // Results array

generateTriples (2500, $aLegs, $aHyps);

ksort ($aLegs); // not required; ensure output ascends

// Main routine

// Checks to see if it's possible for one internal point

// and 2 on adjacent legs

foreach ($aLegs as $height => $aLeg) {

foreach ($aLeg as $leg2 => $hyp) { // get a 2nd leg

if ($leg2 > $height) continue; // which must be less

if (!$aLegs[$leg4 =$height-$leg2]) continue;

foreach ($aLegs[$height] as $leg3 => $hyp3) {

if ($leg3<=$leg2) continue;

if ($leg3 > $height) continue;

if (!$aLegs[$leg4][$leg5 = $height-$leg3]) continue;

$hyp5 = $aLegs[$leg4][$leg5];

$aRes = array();

subdivideTriangle ($hyp, $hyp3, $hyp5, $aHyps, $aRes);

subdivideTriangle ($hyp3, $hyp5, $hyp, $aHyps, $aRes);

subdivideTriangle ($hyp5, $hyp, $hyp3, $aHyps, $aRes);

foreach ($aRes as $match) $aMatch[] =

"($height,$leg2;$hyp) + " .

"($height,$leg3;$hyp3) + " .

"($leg4,$leg5;$hyp5) + " .

"({$match[0]},{$match[1]}; {$match[2]}) + " .

"({$match[0]},{$match[3]}; {$match[4]})"; } } }

// Display result

foreach ($aMatch as $match) print "<br>\n$match ";

function subdivideTriangle ($hyp1, $hyp2,

$hyp3, $aHyps, &$aRes) {

// If the triangle with sides $hyp1, $hyp2, $hyp3 can

// be divided, $aRes will be augmented by the quntuplet:

// ($altitude, $baseX, $hypX, $baseY, $hypY)

foreach (array_intersect_key (

$aHyps[$hyp1], $aHyps[$hyp2]) as $alt => $whatever) {

if (($base1=$aHyps[$hyp1][$alt]) +

($base2=$aHyps[$hyp2][$alt]) != $hyp3) continue;

$aRes[] = array($alt, $base1, $hyp1, $base2, $hyp2); }

return $aRes; }

function generateTriples($squareLen, &$aLegs, &$aHyps) {

// Fills $aLegs and $aHyps with Pythagorean Triples

$squareHyp = $squareLen * sqrt(2);

$rStart = floor (sqrt($squareHyp-1));

for ($r=$rStart;$r>=2;--$r)

for ($s=$r-1;$s>=1;--$s)

for ($k=floor($squareHyp/ ($r*$r+$s*$s)); $k; --$k) {

$a = 2*$r*$s*$k;

$b = $k*($r*$r-$s*$s);

$c = $k*($r*$r+$s*$s);

if (!$aLegs[$a]) $aLegs[$a] = array();

if (!$aLegs[$b]) $aLegs[$b] = array();

if (!$aHyps[$c]) $aHyps[$c] = array();

$aLegs[$a][$b] = $c;

$aLegs[$b][$a] = $c;

$aHyps[$c][$a] = $b;

$aHyps[$c][$b] = $a; } }

?>