Flash Flash Revolution (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)

 stargroup100 10-23-2011 05:03 PM

Re: THE project euler thread

lurker had the same problem

I'm trying to find the error as well

 LongGone 10-23-2011 06:00 PM

Re: THE project euler thread

Quote:
 Originally Posted by Reincarnate (Post 3556009) can anyone find the problem in my earlier list? should equal 1356, not 1355 (according to the problem description)

 stargroup100 10-23-2011 06:10 PM

Re: THE project euler thread

edit2: ok I was being stupid

EDIT: Rubix, your answer might be wrong but it looks pretty close :D

 Reincarnate 10-23-2011 06:13 PM

Re: THE project euler thread

A step-by-step runthrough of the Co(100) process:

 stargroup100 10-23-2011 06:21 PM

Re: THE project euler thread

 Reincarnate 10-23-2011 06:24 PM

Re: THE project euler thread

It's not adding just the largest possible number -- here, it's adding all possible numbers from 2 to (N-1) and checking how it affects the total after removing non-coprimes

 LongGone 10-23-2011 06:37 PM

Re: THE project euler thread

 stargroup100 10-23-2011 06:40 PM

Re: THE project euler thread

FFFF YOU ARE RIGHT

im dumb

 Reincarnate 10-23-2011 06:51 PM

Re: THE project euler thread

.ok apparently my problem is that it risks getting caught in local optima. when it detects a better sum, it may be adding a number (and keeping it) that winds up not being a part of the final solution (or prevents another number from doing the same). Going from 1 to n gives me a diff number from n to 1.

 stargroup100 10-23-2011 06:56 PM

Re: THE project euler thread

that's what I was trying to say lol

 Reincarnate 10-23-2011 06:59 PM

Re: THE project euler thread

ah ok misunderstood what you meant

 stargroup100 10-23-2011 07:12 PM

Re: THE project euler thread

what the hell I went back to look at the problems I already solved in project euler and I cannot for the life of me remember how I did these LOL

all I remember is that I did most of these with pencil/paper

 stargroup100 10-23-2011 07:37 PM

Re: THE project euler thread

Quote:
 Originally Posted by Reincarnate (Post 3556096) Maybe something like this (building off SG's idea) stuff
not quite

0 <= x < sqrt(n) list: [(1), 2, 3, 5]
sqrt(n) <= x < n/2 list: [7, 11, 13]
n/2 <= x list: [17, 19, 23, 29]

however, but my idea doesn't take into account longgone's new input, the fact that some of the primes from the first group might stand by themselves. however, if you combine your method with mine it should account for both cases pretty well.

 FFR4EVA_00 10-23-2011 08:37 PM

Re: THE project euler thread

psst

 stargroup100 10-23-2011 09:02 PM

Re: THE project euler thread

Thanks to lurker and LG I can fix up my method a bit.

 Reincarnate 10-23-2011 09:15 PM

Re: THE project euler thread

I'm trying to find something that doesn't require bruteforce (most of the problems I've solved don't require it) -- this problem is bugging the hell out of me because I can't figure out anything more elegant

 cry4eternity 10-23-2011 09:26 PM

Re: THE project euler thread

I just found this on Friday. Solved 1-22 as well as 67 now :p. This is actually pretty fun.

 stargroup100 10-23-2011 09:43 PM

Re: THE project euler thread

Quote:
 Originally Posted by Reincarnate (Post 3556158) I'm trying to find something that doesn't require bruteforce (most of the problems I've solved don't require it) -- this problem is bugging the hell out of me because I can't figure out anything more elegant
feelin ya bro

but it's possible this is along the lines of what they want. after all, they ARE programming problems.

 FFR4EVA_00 10-23-2011 10:45 PM

Re: THE project euler thread

i'm gonna go ahead and drop a gigantic hint for 354 since the upper bound is so insane i have no chance of programming it correctly:

 stargroup100 10-23-2011 11:49 PM

Re: THE project euler thread

Right now I'm trying to figure out methods to significantly reduce the number of calculations needed to solve this, whether it's skipping possible subsets or finding a totally new method.

However, it's getting late and I'm getting sleepy, difficult to focus. I'll work more on this tomorrow.

All times are GMT -5. The time now is 07:28 PM.