Chaos Project

General => Electronic and Computer Section => Programming / Scripting / Web => Topic started by: fugibo on March 14, 2010, 01:29:53 am

Title: Project Euler
Post by: fugibo on March 14, 2010, 01:29:53 am
http://projecteuler.net/

Lots of interesting math/comp. sci. problems.

...it also has proven to me how much I suck at math/programming.

EDIT:
QuoteFind the sum of all the positive integers which cannot be written as the sum of two abundant numbers.


and my processor is still eating away at #3 and #10 ><

EDIT:
I gave up on #3 for now, my prime number algorithm needs some serious revision. I'm currently taking the factorial of 1,000,000 for my lexicographic permutation prediction algorithm on one core while the other continues to try and find prime numbers up to 2,000,000 (and then add them!).
Title: Re: Project Euler
Post by: Zeriab on March 14, 2010, 01:56:05 pm
Project Euler can be quite fun ^_^
I did a couple of the problems before becoming bored and doing something else >_>

I suggest implementing Sieve of Eratosthenes (http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes) where you only look at add number and keep 2 as a special case.
It's a nice and simple algorithm which is good to have.

I don't understand how you can have your processor still eating away at #3 ?_?
The number is so small that you can easily bruteforce it.
My naive Java implementation does the job in less than 50 milliseconds with the only optimization being 2 as a special case and otherwise odd numbers > 2.
Title: Re: Project Euler
Post by: fugibo on March 14, 2010, 02:06:46 pm
I was staying up really late and I was doing some really stupid stuff. ><

I'd rather work out most of my algorithms myself. Just because I like the challenge, and it makes me feel special. :V
Title: Re: Project Euler
Post by: Aqua on March 14, 2010, 02:21:23 pm
Lol I've done #1 and #6
Title: Re: Project Euler
Post by: Diokatsu on March 14, 2010, 02:30:09 pm
Looks boring as fuck.
Title: Re: Project Euler
Post by: winkio on March 14, 2010, 02:32:54 pm
We actually have a club that does these problems every monday.  I stopped going a while ago, but it's pretty fun stuff.

Quote from: Gym Leader Diokatsu on March 14, 2010, 02:30:09 pm
Looks boring as fuck.

False

Title: Re: Project Euler
Post by: Diokatsu on March 14, 2010, 02:34:46 pm
Quote from: Arceus on March 14, 2010, 02:32:54 pm
Quote from: Gym Leader Diokatsu on March 14, 2010, 02:30:09 pm
Looks boring as fuck.

False

Prove it
Title: Re: Project Euler
Post by: winkio on March 14, 2010, 02:44:00 pm
Proof: computers
Title: Re: Project Euler
Post by: Zeriab on March 14, 2010, 03:51:10 pm
Damn you...

Now you made me work on problems there -_-