Flash Flash Revolution: Community Forums (http://www.flashflashrevolution.com/vbz/index.php)
-   Technology (http://www.flashflashrevolution.com/vbz/forumdisplay.php?f=74)

 stargroup100 10-23-2011 06:03 PM

I'm trying to find the error as well

 LongGone 10-23-2011 07:00 PM

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 07:10 PM

edit2: ok I was being stupid

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

 Reincarnate 10-23-2011 07:13 PM

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

 stargroup100 10-23-2011 07:21 PM

 Reincarnate 10-23-2011 07:24 PM

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 07:37 PM

 stargroup100 10-23-2011 07:40 PM

FFFF YOU ARE RIGHT

im dumb

 Reincarnate 10-23-2011 07:51 PM

.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 07:56 PM

that's what I was trying to say lol

 Reincarnate 10-23-2011 07:59 PM

ah ok misunderstood what you meant

 stargroup100 10-23-2011 08:12 PM

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 08:37 PM

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 09:37 PM

psst

 stargroup100 10-23-2011 10:02 PM

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

 Reincarnate 10-23-2011 10:15 PM

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 10:26 PM

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

 stargroup100 10-23-2011 10:43 PM

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 11:45 PM

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-24-2011 12:49 AM