Project Euler: A fun way to learn programming and mathematics

A couple of years ago when I was still a graduate student in NUS, I used to have regular drinks with my good friend Andreas Keil. Those were evenings well-spent as we exchanged lots of views over lots of topics.

One evening over a couple of Tigers, Andreas ranted about solving some cool problems posted in the internet, using a language called Python (that was the first time I heard of it) Thus I was introduced to Project Euler (named after Leonhard Euler (pronounced as “Oiler”). When trying to solve these problems, I soon discovered the limits of my knowledge in R and also some areas of mathematics. This provided a great stimulus to try to cover existing gaps, and to learn some new stuff as well. I think the questions are great exercises when one is learning a particular programming language, as it breaks the monotony of typical textbook problems and pushes one’s skills to the limits.

Here’s a picture of Leonhard Euler. This is the man who gave us the wonderful Famous Five equation: , which relates five of the most important constants in mathematics.


About Tsung Fei

A teacher, researcher in the bioinformatics division at the University of Malaya
This entry was posted in Project Euler. Bookmark the permalink.

4 Responses to Project Euler: A fun way to learn programming and mathematics

  1. norain mohamed salleh says:

    Dr. Kang,
    I have registered for project euler website that u linked.
    I tried to solve some questions given but none of them are successful …hahahaha..
    surely i find it is very interesting! and very curious to know the answer =D
    do i have to know some R language programming to solve them?
    hope u can share =)

    • Tsung Fei says:

      Hi Norain,
      You can use any language you like. Generally, the are two types of people working on project euler problems. The first type are problem junkies who probably have mastered a particular language, and just want to test their math and programming skills. The second type are people who use the problems to stimulate the learning of a previously unknown language (you set goals and you want to achieve them). So if you wish to learn R, you can read up the basics of R, and then try solving the problem. If you succeed, usually you have learned something.

      • norain mohamed salleh says:

        Dr. Khang,
        firstly sorry bcoz misspell your name..(typo error).. =)
        thanks for your info..
        currently i’m working on understanding the R language..
        a bit same like C++ but R more towards mathematics..
        but the Project Euler Questions surely a tricky Qusetions for me..
        feel like dizzy to calculate it manually..hehe..
        so question 1 (sort by ascending difficulty) is still in progress..
        i’m not really master on maths but i love study add maths since high school..
        hope u can support and teach me more.. =D
        thanks Dr. Khang…
        really appreciate it!

  2. Tsung Fei says:

    Hi Norain,
    The fun is in finding out things on your own. If you get stuck, you can always look up for some references in the internet, or some suitable books.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s