October 16, 2012
Problem 188

The hyperexponentiation of a number.

You get to the start of the trail by reading the Wikipedia article on tetration.

6:20pm  |   URL: http://tmblr.co/ZyENbyVPTnH2
Filed under: project euler 
October 15, 2012
Problem 110

Find an efficient algorithm to analyse the number of solutions of the equation 1/x + 1/y = 1/n.

We know from problem 108 how the answer is formed. The trick is to generate a number of integers from the prime factors, to find which combination has the most divisors.

3:15pm  |   URL: http://tmblr.co/ZyENbyVK-2YS
Filed under: project euler 
October 11, 2012
Problem 148

Exploring Pascal’s triangle.

This was a fun one, I did try a 2nd-order brute force approach after some research and realized it would break the 1-minute rule but let it run anyway for about 10 minutes and got the answer.

11:45am  |   URL: http://tmblr.co/ZyENbyV4ElT6
Filed under: project euler 
October 3, 2012
Problem 204

Generalised Hamming Numbers.

Did quite some research on this but in the end extended a “classic” Hamming number generator (for 5-smooth numbers) that I found on Rosettacode.com. Bit of a cheat and runs in 2 minutes instead of the required 1.

7:57pm  |   URL: http://tmblr.co/ZyENbyUZrRJ6
Filed under: project euler 
October 2, 2012
Problem 121

Investigate the game of chance involving coloured discs.

I suck at probabilities and had to google for hints for this one.

8:09pm  |   URL: http://tmblr.co/ZyENbyUVmaYh
Filed under: project euler 
October 1, 2012
Problem 144

Investigating multiple reflections of a laser beam.

This was fun, once I figured out the geometry. Another thing to watch out for is comparing 2 floats for equality.

10:06pm  |   URL: http://tmblr.co/ZyENbyUS6F_k
Filed under: project euler 
September 17, 2012
Problem 90

An unexpected way of using two cubes to make a square.

The key to this is to handle the fact that 6 and 9 are equivalent. Once I’d handled that I had to eliminate duplicates. Otherwise it’s pretty straightforward.

Hey, I got an award!

6:14pm  |   URL: http://tmblr.co/ZyENbyTZUbP4
Filed under: project euler 
September 13, 2012
Problem 93

Using four distinct digits and the rules of arithmetic, find the longest sequence of target numbers.

Straightforward brute force, helped by the Perl Algorithm::Combinatorics module to find different permutations and so on.

Runs in about 36s with some debugging info.

Made level 5 (=125 solved problems) with this one!

2:26pm  |   URL: http://tmblr.co/ZyENbyTJ4Hrq
Filed under: project euler 
September 12, 2012
Problem 174

Counting the number of “hollow” square laminae that can form one, two, three, … distinct arrangements.

This was basically the same as 173, my code needed changes to 3 lines and some hash counting code.

I’m one problem away from 125 problems solved and the next level…

7:33pm  |   URL: http://tmblr.co/ZyENbyTF_FCs
Filed under: project euler 
September 11, 2012
Problem 173

Using up to one million tiles how many different “hollow” square laminae can be formed?

On a roll today!

This wasn’t too hard once I sorted out all the fencepost errors.

11:04pm  |   URL: http://tmblr.co/ZyENbyTCrb3F
Filed under: project euler