Alecs' Blog Did you ever go clear..

Project Euler

I came across Projuect Euler last year when i wanted to find some exercise to learn Haskell. And it's fun.

There's about one new problem in one week. The puzzles are math-based but you still have to program. The problems are in lots of branches of maths: number theory, combinatorics, graph theory, game theory, geometry, probability, statistics, etc. and in a broad range of difficulties: easy, hard, tricky and tedious ones all over. Trying to attack these interesting problems help you learn some new maths, broaden your mind and sharpen your coding skills. My current rating is "94% genius, having solved 185 out of 197 problems." I mainly use haskell (pure functional), occasionally python (memo decorator), sometimes C/C++ (brute force) and perl/lua/shell (in the mood for scripting). Besides, here are some tools and languages that might be useful as well (not only for project euler):

  1. Heavy math tools: three big M: Matlab, Mathematica, Maple.

  2. Alternative (specific) tools: PARI-GP for number theory, GLPK for linear programming / integer constraint programming, Maxima for symbolic processing, GAP for group theory.

  3. Good-at-math langs: APL, J, K.

  4. Library: gmp for large arbitrary-precision integer calculations (for languages that dont have 'bignum' builtin)

Once you has solved a problem correctly, you can view the corresponding forum thread, where you can see how others attacked the problem and share your own smartness. Just dont miss it.

Enjoy and have fun.

13 Jun 2008

Fork me on GitHub