POV-Ray : Newsgroups : povray.off-topic : Project Euler : Re: Project Euler metadiscussion Server Time
11 Oct 2024 13:16:25 EDT (-0400)
  Re: Project Euler metadiscussion  
From: Invisible
Date: 29 Nov 2007 05:02:28
Message: <474e8e34$1@news.povray.org>
Mueen Nawaz wrote:
> Invisible wrote:
>> Currently for each problem, you either get the answer right or you get
>> it wrong. I think it would be nice if you could check intermediate parts
>> of the calculation. (E.g., is 103 a prime number? Is 187 an abundant
>> number? etc.)
> 
> 	Well, for all but one of the problems I've worked on, the definitions
> in the problem statements are fairly unambiguous.

Well, for "find the millionth prime number" or something, there's not 
much to check. But when the problem is "sum all the primes below 1 
million", it might be nice to know, for example, how many primes there 
are. (Or rather, be able to ask "are there 722 primes?" and get a yes/no 
answer.)

[BTW, I'm damn-well *sure* there used to be a site that tells you 
whether a number is prime, and what the Nth prime number is, and how 
many primes there are below N. Google can no longer find it though...]

>> On the other hand, I suppose they don't want to give too much data away,
>> otherwise you could just "solve" the problem by asking the Project Euler
>> website a sufficient number of questions. ;-)
> 
> 	True - almost. If you submit too many answers in a short period of
> time, the Web site blocks you for a while.

I know what *would* be nice - if the site would keep a list of the 
answers you've already tried which turned out to be wrong! (So many 
off-by-one bugs...)

>> I'd kinda like to make my own website like Project Euler. However, I had
>> a look, and to get hosting that gives you server-side scripting and a
>> database is 5x the price of what I'm currently paying. :-S I can't
>> really afford that kind of money...
> 
> 	The weakened Dollar may help you there.<G>
> 
> 	What price are you talking about. You definitely can get it for under
> $10/mo, and if your needs aren't too stringent, probably $5/mo is not
> hard to find.




> 	The tricky part is making the problems interesting enough for people to
> come. A number of problems on the Project Euler site *may* lead you into
> some interesting number theory topics...

I don't know - almost all of the problems seem to be a case of "write 
this brute-force search algorithm so it doesn't take all day". Very few 
problems appear to possess an elegant mathematical solution. For example:

- Find the 10,001st prime number. Well, sure, there's only one possible 
way to do that. You can't know whether a given prime is the 10,001st or 
not without finding all 10,000 primes below it! Brute-force search, 
plain and simple.

- Take this file full of data, generate some numbers from it, find the 
highest one. Well, again, no mathematics involved. It's a trivial search 
problems. Just gotta write a program fast enough.

- Find a number having some highly obscure property. Well you can 
probably use elegant mathematics to elimatine a few classes of 
possibilities, but it still comes down to a simple search in the end.

A few of the problems admit an elegant mathematical solution. The thing 
with Pythagorean triples, or finding the sum of numbers or the number of 
combinations or something. Slightly more involve some actual maths 
somewhere. But most seem to just involve blindly searching as fast as 
possible. It's not very interesting, but I like seeing my score 
increase. :^)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.