The hyperexponentiation of a number.

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

A ++good blog.

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.

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.

October 11, 2012

Problem 148

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.

October 3, 2012

Problem 204

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.

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.

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.

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!

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!

September 12, 2012

Problem 174

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…

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.