## Search found 179 matches

Fri Jan 01, 2010 6:24 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 270
Replies: 13
Views: 4215

### Re: Problem 270

I don't know... I don't think it really matters. Congratulations for solving it, by the way. This problem is wicked sick... I had an Eureka a few times and was sure I was going to solve it but so far came up with nothing :\ Yeah, it's a fun one. Took me three eureka moments: My first trick which wa...
Thu Dec 31, 2009 9:27 pm
Forum: News, Suggestions, and FAQ
Topic: Need more easier problems
Replies: 2
Views: 1035

### Re: Need more easier problems

To be honest, I like the hard hard questions. If I can chew on a problem for a few days it lets me exercise my brain more [while sleeping, driving, showering, etc] than if I just look at something and go: "oh, DP" and pound out a solution in 5 minutes and then go admire the tulips until next week ro...
Sat Dec 26, 2009 6:38 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 270
Replies: 13
Views: 4215

### Re: Problem 270

Just double checking my brüte force works:
C(3) = 604
C(4) = 12168

That being said, I'd rather not wait a few hours for that to run on C(30).
Wed Dec 09, 2009 7:11 pm
Forum: Recreational
Topic: Factorization problem
Replies: 8
Views: 2743

### Re: Factorization problem

Another method which might be nice to learn is the Quadratic Sieve method. It's surprisingly straight forward to program once you fully understand the steps of the algorithm. I found it was fascinating to implement from an academic standpoint. The only pre-requisite algorithm you'll need is the Shan...
Sun Dec 06, 2009 6:28 pm
Forum: Recreational
Topic: Factorization problem
Replies: 8
Views: 2743

### Re: Factorization problem

I'm rather curious what you mean by this, as it's not easily illustrated what's given here. Can you give an example? Are you given S & n?
Fri Oct 30, 2009 3:12 am
Forum: Number Theory
Topic: Diophantine equations
Replies: 3
Views: 3867

### Re: Diophantine equations

Felt like I'd post a second example just because well... why not, clearer illustration and because I want to: Solve: 2x 2 + 5xy + y 2 - 2y = 1 x = (-5y[plusmn][radic](17y 2 +16y+8))/4 z 2 = 17y 2 +16y+8 y = (-8[plusmn][radic](17z 2 -72))/17 w 2 = 17z 2 -72 Solutions to: w 2 -17z 2 = -72 (w,z) = (9,3...
Fri Oct 30, 2009 2:33 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 261
Replies: 26
Views: 7169

### Re: Problem 261

zwuupeape wrote:Got it !!

Tricky and hard. A possible candidate, I think, for the hardest problem ever on PE, at least judging by the number of solvers so far ..
I'm pretty sure 245 had lower by around this length... but it's pretty close.
Thu Oct 29, 2009 7:02 pm
Forum: Number Theory
Topic: Diophantine equations
Replies: 3
Views: 3867

### Re: Diophantine equations

The closest thing I can help you with is the algorithm I found and was able to successfully implement regarding Generalized Pell's Equation. See the post a few down regarding quadratic residues for a link to the paper. I've found that you can (if you're willing to be slightly non-optimal) manipulate...
Thu Oct 29, 2009 5:16 am
Forum: Number Theory
Topic: Maximum Time to Reach a Happy Loop
Replies: 9
Views: 3961

### Re: Maximum Time to Reach a Happy Loop

elendiastarman wrote:....I think this may be one of the fastest growing functions...
http://en.wikipedia.org/wiki/Ackermann_function
http://en.wikipedia.org/wiki/Busy_beaver_function
Tue Oct 27, 2009 2:56 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 261
Replies: 26
Views: 7169

### Re: Problem 261

If it makes you feel any better, my 'O(sqrt(n))' algorithm took 3h42m to calculate in Python. Massively inefficient. It turns out there are a few odd side-cases one wouldn't normally expect (as everyone here seems to have noticed with their values being slightly low).
Mon Oct 26, 2009 10:51 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 261
Replies: 26
Views: 7169

### Re: Problem 261

Finally got my missing part written so that my algorithm can work!

But curses, my algorithm runs in <1 second for 105, but I'm just shy of the correct amount (my result was juuuust lower than zwuupeape's result)... and brute force takes way too long. Time for a very lengthy debug time. *grumble*
Mon Oct 26, 2009 5:50 pm
Forum: Number Theory
Replies: 9
Views: 4501

Sweet deal, finally got a function that can near instantly solve for x^2 [cong] a (mod n) (given any a,n -- they can be composite, have gcd(a,n)>0, etc). That's way too many sub-functions to post here, but for a generalized version of my above function, for posterity: #Finds all roots of the equatio...
Mon Oct 26, 2009 6:35 am
Forum: Number Theory
Replies: 9
Views: 4501

What is a quadratic residue equation and how could you solve them? Well, I've come across equations of this nature many times before, but now that I've finally bunkered down & decided to write a generalized Pell's Equation solver (x 2 - D*y 2 = N) via the LMM algorithm detailed here , I need a good...
Sun Oct 25, 2009 9:24 pm
Forum: Number Theory
Replies: 9
Views: 4501

Ok, so I think I've finally covered all conditions, and I was kind of curious to find cases that I didn't see covered above, perhaps because I only understood about 3/4'ths of that (sadly, not from a math background). So, for the laymen in the audience, if you're curious & wish to revisit this (we t...
Sun Oct 25, 2009 12:53 am
Forum: Number Theory
Replies: 9
Views: 4501

If a is even, a = 2 t *u, u odd (t < x), a isn't a square if t is odd, otherwise solve w 2 [cong] u (mod 2 x-t ) as above. The solutions to s 2 [cong] a (mod 2 x ) are then 2 t/2 *(k*2 x-t-1 [plusmn]w). First off, huuuuuge thanks for this. It's something I've been trying to put together now for the...
Sat Oct 24, 2009 3:52 pm
Forum: Number Theory
Replies: 9
Views: 4501

So, I've been working on my generalized Pell Equation solver, and I was curious -- Is there any general method for finding the roots of: s 2 [cong]a (mod 2 x )? I know how to do it with any other primes and exponents, but for p=2 I can't seem to find anywhere and its behavior seems very erratic in e...
Wed Oct 21, 2009 11:38 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 239
Replies: 21
Views: 6241

### Re: Problem 239

I thought Haskell had some restrictions on whitespace too? I seemed to end up running into those a few times while writing some Haskell code once. Ideas? Well, in Haskell you can use layout to structure your code, and that's what's normally done, because the code is far more readable. But you can a...
Wed Oct 21, 2009 3:19 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 239
Replies: 21
Views: 6241

### Re: Problem 239

It would certainly cause me serious mental issues if it turns out problem 212 is solvable in one line :) Well, I don't know if it's possible in Python, but in C or Java or Haskell, you can put the entire programme on one line. I would revoke your coding licence if you did, but you could 8-) Unless ...
Wed Oct 21, 2009 12:16 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 239
Replies: 21
Views: 6241

### Re: Problem 239

It would certainly cause me serious mental issues if it turns out problem 212 is solvable in one line :) Nah, that's one that takes a little bit of work, but it's completely straight up algorithmic in nature -- no hidden math or crazy stuff involved. Actually, come to think of it, both of your unso...
Fri Oct 16, 2009 10:51 pm
Forum: News, Suggestions, and FAQ
Topic: What's with this silly correct solution limit?
Replies: 12
Views: 3084

### Re: What's with this silly correct solution limit?

does anybody even care enough to cheat here? Yes, a surprising amount. Seriously, why would anybody bother doing such a thing? It's not like there are some prizes for solving puzzles here, are there? It sounds pretty retarded to me too, but it's there. Kind of like a pseudo-rule-34 for cheaters.