Monthly Archives: November 2015

When Stuck Try Writing the Algorithm

I just finished solving EulerProject Problem 33 but not without some difficulties. Initially I tried writing some code to enumerate fractions in the problem. I still could not get the answer and even trying to follow all the fractions and number manipulations became confusing. Eventually I stopped trying. Write Out the Algorithm I knew I needed to try a different tract, so I decided to just write down an algorithm with pencil and paper that detailed the steps to solve the problem. The hand drawn Continue reading →

Range Restriction

I recently solved ProjectEuler Problem 46 – Goldbach’s Other Conjecture. I noticed a pattern that improved the performance of my solution. The pattern is related to domain restrictions. It involved tossing out range values in order to improve performance and reduce memory consumption. Goldbach’s Other Conjecture I picked problem 46 because solving it gets me one step closer to achieving the As Easy As Pi award. The award is based on problem numbers that are part of Pi: 3.14 15 92 65 35 89 79 32 38 46. Continue reading →

Integer Right Triangles – Pythagorean Triplet

I solved a second ProjectEuler problem that involves right angle triangles. Problem 39 – Integer Right Triangles If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120. {20,48,52}, {24,45,51}, {30,40,50} For which value of p ≤ 1000, is the number of solutions maximised? When I saw this problem it looked somewhat familiar to EulerProject Problem 9. That problem requires find a Pythagorean Triplet for a triangle with a perimeter of 1,000. Since Continue reading →

Git / GitHub Revisited

As I was committing a ProjectEuler change into Git, I noticed that I had reach 500 commits on GitHub. This is mainly the result of the work I did early this year finding solutions to TopCoder and ProjectEuler problems. After using Git/GitHub for about six months, how do they stack up against traditional centralized version control systems? Where’s the Git Server? Git beats a centralized system in terms of reliability because the centralized system has a server that goes down once and a while but Continue reading →