Talk:9 billion names of God the integer: Difference between revisions
Talk:9 billion names of God the integer (view source)
Revision as of 12:22, 4 May 2013
, 11 years ago→The One True Triangle, Three Triangles in One Eternal Trinity
Line 18:
==The One True Triangle, Three Triangles in One Eternal Trinity==
[[File:ThreeTrianglesInOneEternalTrinity.png]]
:Clearly the 1's are
:The grey triangle is symetric
:The vertical edge of the green triangle is ina1 in [http://rosettacode.org/wiki/9_billion_names_of_God_the_integer#Full_Solution Ruby Full Solution] and is the horizontal edge of the grey triangle.
:The horizontal edge of the green triangle is ina2 in [http://rosettacode.org/wiki/9_billion_names_of_God_the_integer#Full_Solution Ruby Full Solution].
Line 29:
Solving consecutive hypotenuses for the green triangle starting with the longest and moving in does this easily. ina1 and ina2 may be obtained by taking the first and last entry in each vector calculated.
3 + sum over ina1 + sum over ina2 is the sum of row n. For rows less than n/2 it is available in ina1.
Technically I could solve the task simply by summing ina2 as we go, but saving ina1, ina2 and the last calculated hypoternuse is all that is required to stop and restart the algorithm at any point.
|