Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Right triangles

 
Ryan McGuire
Ranch Hand
Posts: 1078
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More of an exercise than a tricky brain buster.

How may right triangles with all integer side lengths have a side that is 60 units long?

(The hypotenuse is a "side".)
 
fred rosenberger
lowercase baba
Bartender
Posts: 12196
35
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ummm... an infinite? or do you not allow for translations/rotations/reflections?
 
Ryan McGuire
Ranch Hand
Posts: 1078
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by fred rosenberger:
ummm... an infinite? or do you not allow for translations/rotations/reflections?


Do you REALLY not understand what I'm asking?
 
Ram Bhakt
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
p**2 + b**2 = 60**2
or
60**2 + b**2 = h**2 ( same as p**2 + 60**2 = h**2 )

where p, b, and h are the lengths of perpendicular, base, and height.

I am not going to solve them but eq 1 will probably have a limited number of solutions (or may be even none) but eq 2 will have unlimited solutions unless there is some mathematical trick involving some property of squares. I guess, one could write a simple program that can use brute force algorithm to start putting values for b as 1 to N and seeing whether sq root of the sum of 60**2 + b**2 is an integer or not.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12196
35
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you REALLY not understand what I'm asking?

i just enjoy being a pain in the ass sometimess
 
Jayesh Lalwani
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I) Assume hypotenuse = 60
a^2 + b^2 = 60^2
a^2 = 60^2 - b^2 = (60+b)(60-b)
a = sqrt[(60+b)(60-b)] where 0 < b <60

So, for a to be an integer 60 + b and 60 - b should be squares of integers

So, let 60 + b = m^2, where m is an integer, and 60< (60+b)<120
Possible values of m are 8, 9 and 10

FOr all possible values of m, find 60 - b such that 60 - b is a square
For m = 8, b= 4, 60 - b = 56, not a square, won't work
For m = 9, b= 21, 60 - b = 39, not a square, won't work
For m = 10, b= 40, 60 - b = 20, not a square, won't work

So, there is no right angle triangle with all integer side lengths have a hypotenuse that is 60 units long

II) Assume side = 60
a ^2 + 60^2 = b^2
a ^2 = b^2 - 60^2 = (b+60)(b-60)where b>60
a = sqrt[(b+60)(b-60)] where b>60
let b+60 = m^2 where m is an integer > 10
b - 60 = n^2 where n is an integer > 0


m^2 - n^2 = 120
(m+n)(m-n) = 120


Let m + n = 2q, m-n = 2r where q and r are integers
Solving we get m = q + r, and n = q-r

so, 4.q.r = 120
q.r = 30 = 2.3.5

So, q = 15, r = 2 OR q = 6, r = 5 OR q = 10, r = 3

So, m = 17, n = 13 OR m = 11, n = 1 OR m= 13, n = 7

So, a = 221 OR a = 11 OR a = 91
b = 229 OR b = 61 OR b = 109

So, there are 3 rt triangles with integer side lengths that have a side that is 60 units long
(221, 60, 229); (11, 60, 61); (91, 60, 109)
 
Peter van de Riet
Ranch Hand
Posts: 112
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jayesh Lalwani:
I) Assume hypotenuse = 60
...
So, there is no right angle triangle with all integer side lengths have a hypotenuse that is 60 units long


The proof on this assumption can't be right:

The famous 3 - 4 - 5 triangle can be multiplied by 12:
36 - 48 - 60 ->
1296 + 2304 = 3600, so there is at least one triangle with hypotenuse 60.
 
Peter van de Riet
Ranch Hand
Posts: 112
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Beside 36-48-60, all other possibilities are:

60-11-61
60-25-65
60-32-68
60-45-75
60-63-87
60-80-100
60-91-109
60-144-156
60-175-185
60-221-229
60-297-303
60-448-452
60-899-901

Originally posted by Ryan McGuire:
How may right triangles with all integer side lengths have a side that is 60 units long?


The answer is 14.
 
Arjunkumar Shastry
Ranch Hand
Posts: 986
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ryan,last year you posed this puzzle.and we solved it.
 
Ryan McGuire
Ranch Hand
Posts: 1078
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Arjunkumar Shastry:
Ryan,last year you posed this puzzle.and we solved it.


Damn!

I just gave someone else grief for posting variations on a previous theme, and then I go and post an exact duplicate of one of my own. However the discussion we've gotten this time around does prove that it's still new to someone.

Yeah that's it... I knew I'd posted it before and I just wanted to see if people would realize it's a previously-solved problem.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could at least replace the number 60 with something much bigger, like 60^4. That way you'd weed out the O(N^2) solutions, as well as invite some additional possible numeric errors if the programmer isn't careful.
[ March 28, 2006: Message edited by: Jim Yingst ]
 
Ryan McGuire
Ranch Hand
Posts: 1078
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jim Yingst:
You could at least replace the number 60 with something much bigger, like 60^4. That way you'd weed out the O(N^2) solutions, as well as invite some additional possible numeric errors if the programmer isn't careful.

[ March 28, 2006: Message edited by: Jim Yingst ]


Ok, how about this:

What number less than or equal to 10,000 is in the most (all-integer) pythagorean triples?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
9240
 
fred rosenberger
lowercase baba
Bartender
Posts: 12196
35
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
9240


i assume at some point proof will be supplied?
 
Garrett Rowe
Ranch Hand
Posts: 1296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by "The Mice":
In the absence of any authoritative mathematical proof, always assume the correct answer is 42.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[Fred]: i assume at some point proof will be supplied?

What, don't you trust me?

Oh, very well:
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now you have unearthed a controversy that has been ongoing in the mathematics community since the 1970s: is a computer program a proof?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic