Project Euler #86: Cuboid route

  • + 2 comments

    Solved this problem in F#. Insights:

    • count only really distinct cuboids, for example the cuboids (A,B,C) (3,5,6) and (6,5,3) are considered equal.
    • key insight for me was that there are only 1.5 million pythagorean triplets that correspond to a cuboid with max size 400.000
    • if you use Euclid's formula (see for example https://en.wikipedia.org/wiki/Pythagorean_triple ) to generate pythagorean triplets and you are only interested in right triangles with maximum right side length M, then you can use 1.1*sqrt(M) as an upper bound for m.

    If anybody is interested, I can write down my approach to solve this problem.