Flash Flash Revolution: Community Forums (http://www.flashflashrevolution.com/vbz/index.php)
-   Technology (http://www.flashflashrevolution.com/vbz/forumdisplay.php?f=74)
-   -   The Project Euler thread (http://www.flashflashrevolution.com/vbz/showthread.php?t=120818)

 Reincarnate 05-21-2014 07:59 AM

Re: The Project Euler thread

Not every problem can be done with pencil and paper.

 leonid 05-21-2014 12:53 PM

Re: The Project Euler thread

Rubix sent me to solve this

A bit of paperwork and then lots of wolframalpha

 Reincarnate 05-21-2014 04:15 PM

Re: The Project Euler thread

Nicely done

 stargroup100 05-21-2014 04:34 PM

Re: The Project Euler thread

sorry I should've been more clear

I was referring to problem nine specifically, involving pythagorean triples

 rushyrulz 05-21-2014 07:31 PM

Re: The Project Euler thread

brute forcing 12 and it's not going so well. I'm almost an hour in and still no solution.
Code:

```The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... Let us list the factors of the first seven triangle numbers:  1: 1  3: 1,3  6: 1,2,3,6 10: 1,2,5,10 15: 1,3,5,15 21: 1,3,7,21 28: 1,2,4,7,14,28 We can see that 28 is the first triangle number to have over five divisors. What is the value of the first triangle number to have over five hundred divisors?```
In hindsight, I probably would have used a much more efficient factor breakdown algorithm had I known it would take this long.

 Reincarnate 05-21-2014 07:59 PM

Re: The Project Euler thread

using brute force = not very interesting

usually more fun to try for the faster approaches

 rushyrulz 05-21-2014 08:09 PM

Re: The Project Euler thread

I'm sure there's a very elegant mathematical solution for all of these, but I'm just trying to get as far as I can :P

 stargroup100 05-21-2014 08:19 PM

Re: The Project Euler thread

I did the first 30 (excluding 12) and even a couple of the 300+ ones before I figured out 12. I don't know why but that one was hard for me

 rushyrulz 05-21-2014 08:34 PM

Re: The Project Euler thread

Probably since there are so many different things you need to account for in 12. Not only do you need a gigantic 500+ factor number, but it also needs to be a summation of n number which is tricky to check for.

 Guest15937 05-21-2014 08:42 PM

Re: The Project Euler thread

My brute force of 12 took 15 seconds to run.

 beary605 05-21-2014 08:52 PM

Re: The Project Euler thread

does project euler ever teach you algorithms, e.x. dynamic programming, breadth/depth first search

 rushyrulz 05-21-2014 09:18 PM

Re: The Project Euler thread

Project Euler doesn't directly 'teach' you anything.

 beary605 05-21-2014 09:23 PM

Re: The Project Euler thread

Quote:
 Originally Posted by rushyrulz (Post 4138341) Project Euler doesn't directly 'teach' you anything.
rephrasing question then

does project euler ever REQUIRE you to know algorithms, e.x. dynamic programming, breadth/depth first search

 rushyrulz 05-21-2014 09:32 PM

Re: The Project Euler thread

It's basically algorithm development, and if dynamic programming, breadth/depth first search is required for efficiency sake, then yes.

Also, rewrote my factorization algorithm and I solved 12 in 5 seconds :P

 Reincarnate 05-21-2014 09:43 PM

Re: The Project Euler thread

Quote:
 Originally Posted by beary605 (Post 4138326) does project euler ever teach you algorithms, e.x. dynamic programming, breadth/depth first search
absolutely

even more so once you start venturing into the harder stages (where the problems also become much more interesting)

DP, especially, is used quite often

 Reincarnate 05-21-2014 09:44 PM

Re: The Project Euler thread

For example, try your hand at any of these:

http://projecteuler.net/problem=161
http://projecteuler.net/problem=425
http://projecteuler.net/problem=442

 Reincarnate 05-21-2014 09:49 PM

Re: The Project Euler thread

And of course, (some) of the big kahunas that will require both mathematical and programmatical sorcery:

http://projecteuler.net/problem=289
http://projecteuler.net/problem=328
http://projecteuler.net/problem=344
http://projecteuler.net/problem=361
http://projecteuler.net/problem=415

 rushyrulz 05-21-2014 09:52 PM

Re: The Project Euler thread

you almost have to be too smart...

 stargroup100 05-21-2014 09:57 PM

Re: The Project Euler thread

ohhhh the eulerian circle one looks cool

really tempted to try that one lol

 beary605 05-21-2014 09:57 PM

Re: The Project Euler thread

ohoho this will be fun, i should get back to project euler

All times are GMT -5. The time now is 07:46 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright FlashFlashRevolution