The Project Euler thread
for getting stargroup mad at people leaking answers EXCEPT NOT BECAUSE WE HAVE...
http://projecteuler.net/ what you do is simple: 1. make an account 2. open a problem 3. solve the shit out of it 4. rinse and repeat a lot of the problems, ESPECIALLY later on, require you to find a general solution via programming and plug some ridiculously large parameters into them anyway, i have completed: 113, 16, 18, 28, 33, 52, 67, 79, 108, 110, 157, 267, 355 and i am working on something... 
Re: THE project euler thread
I've completed 3 of the puzzles so far, mostly because I have very little time to complete them. I will be going in linear order from start to finish! Using C++ as my language because I'm taking a course on it right now.
Excellent idea ffr4eva. When people run into problems they can post their questions here, just remember to hide your solutions in spoiler tags and try not to ever post the complete solution! 
Re: THE project euler thread
Quote:
i have 125, 28 and 30 And i work with java 
Re: THE project euler thread
So far I've done 1,2,3,5 and 6. I just learned about the bigInteger type in Java so now I'll be using that (since the 'long' type isn't ****ing long enough __.)

Re: THE project euler thread
Quote:
I used manual math with arrays of integers 
Re: THE project euler thread
Quote:

Re: THE project euler thread
This seems really interesting. I could try to do this on my free time to work on my computer skills.

Re: THE project euler thread
I'm currently at 49, using mostly Maple. I have done a couple in C++ too, where speed mattered.
I should get back into it. Friend key is 62306152188978_1d29510ddc0c52e8c33db3cdbaf399db for interested people. 
Re: THE project euler thread
* Working on P83 *
I'm mostly using Ruby and C My friend key: 1858629421787_a864c4e88f44e36b8023644c0f14493e 
Re: THE project euler thread
I just started today and got 1, 2, 3, 5, 6, 7, 9, 10, 16, 20, 25, 45, 48, and 52 solved. I'm using Mathematica here.
Friend Key: 76814575274714_b466b39d7ef7730e66d3da5b16df2525 
Re: THE project euler thread
By the way... Friend Key: 41335338220707_9d1fa87f00c010a47b494214e8b3416e ^_^
EDIT: I managed to do a few today, and now I have 110 done. ^_^ Quote:

Re: THE project euler thread
I was into this for a while but got bored. It's a lot of fun, though. Some of the later problems are very tricky.

Re: THE project euler thread
@leonid: I got an answer to #80 but I don't understand why it's not the correct answer. Can you help me figure out the problem in my code?
Just to see if there is something wrong in my code, I tried using my program to help me determine some values. Let's define the digital sum of the first 100 digits of radical n to be f(n). Are these values correct? I chose a few test numbers just to see if my program is telling me the right digital sum. It did tell me that f(2) = 475 which was given in the problem. f(3) = 441 f(7) = 398 f(35) = 440 f(69) = 439 f(95) = 460 Any help would be appreciated. Thanks! 
Re: THE project euler thread
From what I can see, you seem to be rounding off your 100th decimal.

Re: THE project euler thread
Quote:
I don't think it's a rounding error because the 100th decimal digit of radical 2 is 7, which would round the 99th decimal digit up. When I created that set of digits, 2 was the last element of that set, so that doesn't seem to be the problem in my program. 
Re: THE project euler thread
Let's take f(95). Its 100 digits are: (note my program counts backwards)
which gives a sum of 459. The 101st decimal is a 6, so if rounded up the 7, you would get to your answer of 460. And yes the problem isn't clear, but thanks to the example, you can understand they mean to have 100 significant digits. 
Re: THE project euler thread
hmm maybe I will get back into this
seeing leonid ahead of me is making my competitive core act up (by that I mean he could kick my ass at this shit but idgaf) heh solved problem 68 in excel 
Re: THE project euler thread
Quote:

Re: THE project euler thread
I think I'm going to get started with this. Wanted to work on my programming skills. On my reading week and nobody else I know is so why not. Probably going to work in C or Perl.

Re: THE project euler thread
Problem 96 is solving 50 sudoku problems. I'm very tempted to cheat

Re: THE project euler thread
How do I learn this stuff and become a cool programmer like you guys ; _;

Re: THE project euler thread
I'm interested in playing this but I have very little coding experience, haha.

Re: THE project euler thread
Good way to learn imo

Re: THE project euler thread
Quote:
If, on the other hand, you just want to learn programming, this is one way of starting out. At least it gives you a goal. Man, I need to find more time to do this. 
Re: THE project euler thread
Thanks OP for giving me something to do with my brain while I'm in between jobs. This is awesome. I'll be programming in MATLAB/Octave. I just did the first two problems as a bit of a warm up and it was a lot of fun.
Problem 1 Problem 2 Had to first write a function to calculate the numbers in the Fibonacci sequence given any input: I then implemented that function in the script file below to find the solution: 
Re: THE project euler thread
Interesting, I actually had to augment the source code in MATLAB in order to do Problem 3.
For some reason MATLAB arbitrarily sets a limit on prime factoring numbers larger than 2^32. Opened up the factor.m and changed it to 2^50, so this solution pretty much became a oneliner. Problem 3 
Re: THE project euler thread
hit a wall with this problem :

Re: THE project euler thread
I'm not gonna use programs. :3
Problem 1: 
Re: THE project euler thread
Upon first glance, that problem looks pretty trivial. But since Rubix is having trouble with it, it must be far from that. LOL
I'll take a crack at it. 
Re: THE project euler thread
After taking a look at the problem, here's what I have so far. (I'm sure you already figured out this much, it's all the obvious stuff.)
Problem 355: I'll edit with more content once I figure out more. BRB FOOD LOL 
Re: THE project euler thread
Sounds like you could just write a script for euler's totient function and then run a for loop or something >.>
Though I'm sure there's a more elegant way of doing it. Also, any way to check answers without registering? 
Re: THE project euler thread
Quote:
and no you have to register 
Re: THE project euler thread
UGH
okay this problem is seriously impossible tackling it the way I'm doing it unless there's some beautiful optimization trick this is not working 
Re: THE project euler thread
getting close but still off
the way I am tackling it is actually very similar to what you posed above (raising primes to powers) but figuring out where to fix things is tricky 
Re: THE project euler thread
Should 99 be in your sorted mainlist for Co(100)?
I'm thinking about an approach right now, but I haven't come up with anything yet. 
Re: THE project euler thread
Quote:

Re: THE project euler thread
Hm somehow it's one off, wtf

Re: THE project euler thread
Quote:

Re: THE project euler thread

Re: THE project euler thread
can anyone find the problem in my earlier list? should equal 1356, not 1355 (according to the problem description)

Re: THE project euler thread
lurker had the same problem
I'm trying to find the error as well 
Re: THE project euler thread
Quote:

Re: THE project euler thread
edit2: ok I was being stupid
EDIT: Rubix, your answer might be wrong but it looks pretty close :D 
Re: THE project euler thread
A stepbystep runthrough of the Co(100) process:

Re: THE project euler thread

Re: THE project euler thread
It's not adding just the largest possible number  here, it's adding all possible numbers from 2 to (N1) and checking how it affects the total after removing noncoprimes

Re: THE project euler thread

Re: THE project euler thread
FFFF YOU ARE RIGHT
im dumb 
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.

Re: THE project euler thread
that's what I was trying to say lol

Re: THE project euler thread
ah ok misunderstood what you meant

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 
Re: THE project euler thread
Quote:
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. 
Re: THE project euler thread
psst

Re: THE project euler thread
Thanks to lurker and LG I can fix up my method a bit.

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

Re: THE project euler thread
I just found this on Friday. Solved 122 as well as 67 now :p. This is actually pretty fun.

Re: THE project euler thread
Quote:
but it's possible this is along the lines of what they want. after all, they ARE programming problems. 
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:

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. 
Re: THE project euler thread
i'm seriously advocating that the quickest method would be starting at the set for Co(100) and drawing each Co(n+1) from Co(n)

Re: THE project euler thread
it's predictable though
basically it comes down to an iterative process i think the hardest part would be how to arrange the arrays for optimal speed i was thinking that you would basically set it up like this: [a_2, a_3, a_5, a_7, ..., a_p] p is the largest prime below n, and the a_i are not necessarily distinct, so that when you actually wanted to find Co(n) you'd remove duplicates and add 1 
Re: THE project euler thread

Re: THE project euler thread
like i said: the set doesn't have to be distinct in this arrangement
i could easily just leave empty spaces but hey, programming doesn't really like those and 16 only has one factor i have no idea what you're talking about what's going on with 21 is this: if a < b < c, then ac+b > ab+c i just threw in the snippet about testing 20 because i figured a program would try it 
Re: THE project euler thread

Re: THE project euler thread
longgone is correct on 1 and 2
here's what you're confused about if i am right: Quote:
Quote:

Re: THE project euler thread
Quote:

Re: THE project euler thread
1+64+81+25+49+11+13+17+19+23+29+31+37+41+43+47+53+59+61+67+71+73+79+83+89+97+
(952519)+(914913)+(886411) =1356 
Re: THE project euler thread
Worked on this for a little bit one night. Did 1, 2, and 6 all in C:
Question 1: Question 2: Question 6: Easy stuff so far but I'm not really all that knowledgeable about math at all so I'm not sure how far I'll get with this lol. 
Re: THE project euler thread
Quote:
Quote:

Re: THE project euler thread
yeah, i never said what those were, i'm sorry
a_p is just the number that is divisible by p in whatever set we're looking at (since we're supposed to be looking at coprime sets there is exactly one a_p for every p but not all a_p are unique) the reason why i'm duplicating the terms is that i think it will be easier for a computer to traverse 
Re: THE project euler thread
Quote:

Re: THE project euler thread
Quote:

Re: THE project euler thread
@Reincarnate that is correct, yes
now i'm messing around with a bruteforce solution of sorts though, NOTHING like what i was doing before 
Re: THE project euler thread

Re: THE project euler thread
congrats FFR4, nicely done

Re: THE project euler thread

Re: THE project euler thread
Got #71 with pencil and paper xD
EDIT: Nice FFREva! 
Re: THE project euler thread
http://projecteuler.net/eulerians
"For the twelve most recent problems the difference, d, in the length of time to solve the problem (in minutes) between each member and the slowest in the table is calculated and log2(max(d,2)) points are awarded." so every time someone solves the problem, the points of everyone who already solved it go up in other words cosmovibe has 8 points now 
Re: THE project euler thread

All times are GMT 5. The time now is 05:02 PM. 
Powered by vBulletin® Version 3.8.1
Copyright ©2000  2021, Jelsoft Enterprises Ltd.
Copyright FlashFlashRevolution