Project Euler - What you've learned

  • Thread starter Thread starter Edgardo
  • Start date Start date
  • Tags Tags
    Euler Project
Click For Summary

Discussion Overview

This thread discusses participants' experiences and learnings from solving problems on Project Euler, a platform for mathematical and computational challenges. The conversation includes insights on programming languages, algorithm efficiency, and various techniques that enhance problem-solving skills.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants express enjoyment and addiction to Project Euler, noting the diversity of approaches used by others, including unconventional programming languages.
  • One participant mentions the use of memoization as a technique to improve efficiency in problem-solving.
  • Another participant highlights the performance improvement achieved by using a Python compiler, indicating a significant speed boost for their program.
  • There are discussions about the comparative speed of programming languages, with some stating that C++ is faster than Python, while others note Python's ability to handle large numbers effectively.
  • One participant mentions the challenges of using Java's BigInteger datatype, questioning its efficiency and usability.
  • Another participant shares insights about C being able to handle larger numbers than C++, and the value of thinking through problems before coding to save time.
  • Some participants suggest that many algorithms are already well-implemented in libraries like Mathematica, and that open-source projects often provide necessary implementations.
  • One participant mentions using Pari for problem-solving, noting its strengths and weaknesses in handling different types of tasks.

Areas of Agreement / Disagreement

Participants express a variety of opinions on programming languages and techniques, with no clear consensus on the best approaches or languages for solving Project Euler problems. Disagreements exist regarding the efficiency of different languages and the best practices for algorithm implementation.

Contextual Notes

Some discussions reference specific programming techniques and libraries, but there are limitations in the assumptions made about language performance and the applicability of certain methods across different problems.

Who May Find This Useful

This discussion may be useful for individuals interested in computational problem-solving, programming languages, and algorithm efficiency, particularly those engaged in platforms like Project Euler and similar coding challenges.

Edgardo
Messages
706
Reaction score
17
So I registered on http://projecteuler.net/" and I must say: it's quite addictive!
I didn't expect it to be that much fun.

I'd like to share what things I've learned from solving the problems:


- When solving a problem you get access to a thread. I was impressed
how different the approaches are. People use "crazy languages" like K where
the code looks like this: */_*a@&1000=+/'a:b,'(_sqrt+/)'b*b:,/n,/:'1+!:'n:!1000

- http://en.wikipedia.org/wiki/Memoization" : Use results that you've calculated before

- Using http://psyco.sourceforge.net/" (a Python compiler) improved the Python performance of one my programs by a factor of 4.

- C++ is much faster than Python. But Python can handle really big numbers.
I will probably have to learn using http://gmplib.org/" .

- Java is fast. But the BigInteger datatype is slow (maybe I used it in the wrong way?) and hard to use :frown:


What did you learn (for example what kind of techniques boosted the speed
of your programs)?
What programming languages do you use and prefer?
 
Last edited by a moderator:
Technology news on Phys.org
Hi, I registered in spoj.pl , www.topcoder.com[/url] , [url]www.codechef.com[/URL], and many acm judges ... i am chandubaba everywhere. Read the book "introduction to algorithms" by cormen, awesome! Very good for all these sites. But i am not there in project euler ... i am not familiar with gcj stuff. Also we need to do a lot of math (learn it fun way, ie not preparing for exam but for fun)... dynamic programming and graph theory seems to be everywhere at the elementary level.
 
Last edited by a moderator:
I learned:
C can handle bigger numbers than C++
Many algorithms are already better implemented than I ever could, especially in Mathematica
Thinking about a problem first can reduce the time needed to get the answer significantly
 
chandubaba said:
Hi, I registered in spoj.pl , www.topcoder.com[/url] , [url]www.codechef.com[/URL], and many acm judges ... i am chandubaba everywhere. Read the book "introduction to algorithms" by cormen, awesome! Very good for all these sites. But i am not there in project euler ... i am not familiar with gcj stuff. Also we need to do a lot of math (learn it fun way, ie not preparing for exam but for fun)... dynamic programming and graph theory seems to be everywhere at the elementary level.[/QUOTE]

Interesting. I'm currently reading Cormen's book and I like it. But I wouldn't have thought that it is actually useful for the problems on the aforementioned websites.
 
Last edited by a moderator:
There are larger int objects in C++ as well, however for project euler I can recommend vectorized python (numpy).
 
I did it in Pari. It makes most of the problems trivial -- though I'll admit it's pretty bad at string manipulation.
 
Project euler taught me the hard way about algorithm efficiency...
 
I learned that pretty much everything I ever need to implement has been implemented by an open source project somewhere along the line...
 
Edgardo what's your handle in topcoder?
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 133 ·
5
Replies
133
Views
12K
  • · Replies 397 ·
14
Replies
397
Views
21K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
16
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 31 ·
2
Replies
31
Views
5K
  • · Replies 97 ·
4
Replies
97
Views
9K