|
|
| Programming Discussions about computer programming |
04-25-2011, 11:15 AM
|
#31
|
|
journeyman
Join Date: Jun 2009
Posts: 265
|
Re: Any interest in a Project Euler Group?
Count me in.
|
|
|
04-25-2011, 11:45 AM
|
#32
|
|
old hand
Join Date: Aug 2009
Posts: 1,983
|
Re: Any interest in a Project Euler Group?
Sounds fun, if I have time I'll participate
|
|
|
04-27-2011, 05:13 PM
|
#33
|
|
adept
Join Date: Nov 2005
Location: Colorado
Posts: 844
|
Re: Any interest in a Project Euler Group?
Quote:
Originally Posted by Zurvan
This is a great idea. I will attempt to participate, although my history with Project Euler is that I just don't have a strong enough background in math to do them well.
|
I was afraid of that when I started, too. I decided I would try to figure everything out from first principles. It's painful, and there are some stubborn problems I've come to again and again without solving. Others I just skipped entirely since I had no clue how to approach them. But I have learned a lot, and highly recommend project euler for anyone looking to improve. I used Haskell, fwiw, and am level 3 at the moment, although I haven't had much time for this in a great while, alas.
|
|
|
04-27-2011, 05:20 PM
|
#34
|
|
Carpal \'Tunnel
Join Date: Apr 2008
Location: blog.jcarter.ca
Posts: 7,260
|
Re: Any interest in a Project Euler Group?
Will try to get a little organizational stuff taken care of later this week.
|
|
|
04-27-2011, 09:17 PM
|
#35
|
|
Carpal \'Tunnel
Join Date: Sep 2004
Posts: 10,213
|
Re: Any interest in a Project Euler Group?
How many can Wolfram Alpha solve? It seems to get confused a lot but it did manage to understand and answer some correctly:
"Find the 10001st prime."
"Calculate the sum of all the primes below two million."
"Find the sum of digits in 100!"
Anybody tried all the problems and seen how many it can solve?
Juk
|
|
|
04-28-2011, 09:10 PM
|
#36
|
|
Carpal \'Tunnel
Join Date: Oct 2004
Location: taking notes on u (see profile)
Posts: 11,948
|
Re: Any interest in a Project Euler Group?
Quote:
Originally Posted by bachfan
I was afraid of that when I started, too. I decided I would try to figure everything out from first principles. It's painful, and there are some stubborn problems I've come to again and again without solving. Others I just skipped entirely since I had no clue how to approach them. But I have learned a lot, and highly recommend project euler for anyone looking to improve. I used Haskell, fwiw, and am level 3 at the moment, although I haven't had much time for this in a great while, alas.

|
bachfan,
very nice. i've got a haskell question for you, since i've just been learning it. i think it's great, but apparently for speed/memory intensive applications it can fall short. this post:
http://stackoverflow.com/questions/3.../377124#377124
was pretty disturbing to me. it seems that if you are doing anything like simulations (eg, counterfactual regret stuff for poker) then haskell could easily perform very poorly. any thoughts on this?
|
|
|
04-28-2011, 09:17 PM
|
#37
|
|
adept
Join Date: Nov 2005
Location: Colorado
Posts: 844
|
Re: Any interest in a Project Euler Group?
I love Haskell, although I'm far from an expert. I love its compact syntax, functional-to-the-hilt philosophy, and super-strong type system. But I have never coded anything more than small programs in it, so I'm not really qualified to comment on engineering anything serious in Haskell.
I know that there _are_ folks who write hard-core, compute-intensive stuff with Haskell. I have heard that in many cases the performance characteristics of a Haskell program can be counter-intuitive, and sometimes seriously hacking is required to get things to run very fast. Personally, I'm not sure if it would be much worse than any other language in that regard, but I don't really know what I'm talking about.
Cheers,
bachfan
Quote:
Originally Posted by gaming_mouse
bachfan,
very nice. i've got a haskell question for you, since i've just been learning it. i think it's great, but apparently for speed/memory intensive applications it can fall short. this post:
http://stackoverflow.com/questions/3.../377124#377124
was pretty disturbing to me. it seems that if you are doing anything like simulations (eg, counterfactual regret stuff for poker) then haskell could easily perform very poorly. any thoughts on this?
|
|
|
|
04-28-2011, 10:50 PM
|
#38
|
|
veteran
Join Date: Jan 2010
Location: within the goldilocks zone
Posts: 2,596
|
Re: Any interest in a Project Euler Group?
Would a knowledge of Calc 2 be sufficient for a decent amount of these? Or are we talking Differential Eq.+?
|
|
|
04-28-2011, 10:52 PM
|
#39
|
|
Carpal \'Tunnel
Join Date: Apr 2008
Location: blog.jcarter.ca
Posts: 7,260
|
Re: Any interest in a Project Euler Group?
Quote:
Originally Posted by xplore111
Would a knowledge of Calc 2 be sufficient for a decent amount of these? Or are we talking Differential Eq.+?
|
I think so. I don't see myself being too successful with too many DE programming problems in this endeavour.
|
|
|
04-28-2011, 11:26 PM
|
#40
|
|
ɹǝʍoʇpunoɹ
Join Date: Feb 2005
Location: soah made my profile
Posts: 13,926
|
Re: Any interest in a Project Euler Group?
Quote:
Originally Posted by xplore111
Would a knowledge of Calc 2 be sufficient for a decent amount of these? Or are we talking Differential Eq.+?
|
no need for calculus at all imo, it's 90% number theory, more about being very adept at very basic maths.
I think all of the problems could be explained to a bright sixth-grader. Normally there's a simple example given for say N=5 that you can test your programs on, but you have to figure out a fast algorithm to calculate it for N=10000 or something. Of course knowing some advanced maths might help you find a shortcut.
I have 113 solved it looks like, mostly in Common LISP. I have some elegant solutions but like Haskell it isn't really made for the number crunching required in the more advanced problems. Maybe I'll try and overtake bachfan...
|
|
|
04-28-2011, 11:36 PM
|
#41
|
|
Carpal \'Tunnel
Join Date: Oct 2004
Location: taking notes on u (see profile)
Posts: 11,948
|
Re: Any interest in a Project Euler Group?
Quote:
Originally Posted by xplore111
Would a knowledge of Calc 2 be sufficient for a decent amount of these? Or are we talking Differential Eq.+?
|
the project isn't about advanced math skills, it's about programming skills, so calc2 makes you overqualified....
|
|
|
04-29-2011, 12:01 AM
|
#42
|
|
veteran
Join Date: Jan 2010
Location: within the goldilocks zone
Posts: 2,596
|
Re: Any interest in a Project Euler Group?
Quote:
Originally Posted by gaming_mouse
the project isn't about advanced math skills, it's about programming skills, so calc2 makes you overqualified....
|
Oh I see, just curious.
After glancing at Problem 1 is it plainly asking for the summation of all multiples of 3 OR 5? Meaning if I choose my multiple to be 3, n(1)=3, n(2)=6, n(3)=9 etc and you simply test that n(X) is less than < 1000 and then add it to the pooling sum?
and the result is around 650 i think i saw?
|
|
|
04-29-2011, 08:03 AM
|
#43
|
|
ɹǝʍoʇpunoɹ
Join Date: Feb 2005
Location: soah made my profile
Posts: 13,926
|
Re: Any interest in a Project Euler Group?
Quote:
Originally Posted by xplore111
Oh I see, just curious.
After glancing at Problem 1 is it plainly asking for the summation of all multiples of 3 OR 5? Meaning if I choose my multiple to be 3, n(1)=3, n(2)=6, n(3)=9 etc and you simply test that n(X) is less than < 1000 and then add it to the pooling sum?
and the result is around 650 i think i saw?
|
the question and example makes it really clear what it's asking for. You don't have a choice.
|
|
|
04-29-2011, 01:16 PM
|
#44
|
|
adept
Join Date: Nov 2005
Location: Colorado
Posts: 844
|
Re: Any interest in a Project Euler Group?
Quote:
Originally Posted by bachfan
I used Haskell
|
Fair disclosure - I used Haskell for 90% of the problems. For those few problems that really cried out for an imperative solution, I used Ruby or C. (It is possible to write in imperative style in Haskell, but what's the point?)
- bachfan
|
|
|
04-29-2011, 01:55 PM
|
#45
|
|
ɹǝʍoʇpunoɹ
Join Date: Feb 2005
Location: soah made my profile
Posts: 13,926
|
Re: Any interest in a Project Euler Group?
118 now! did the last few in Python or pen and paper.
Having thought about it, I don't really think the problems are suitable for a "find the code that outputs the answer the fastest" competition. The best solutions don't calculate everything from first principles but use educated guesses/insights. You don't have to go as far as goofy/clown's solutions to get a program that "just happens" to work for the given problem, but isn't very extensible, and it's not really possible to tell the difference between a program that was reverse engineered from knowing the solution and one that uses some clever mathematical insight, because either way the effect is to rule out some portion of the search space.
They are designed for exactly what the site suggests: find a solution using any method in a reasonably short amount of time (milliseconds to a minute).
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 08:43 AM.
|