General Discussion Undecided where to post - do it here. |
Reply to Thread New Thread |
![]() |
#2 |
|
|
![]() |
![]() |
#5 |
|
|
![]() |
![]() |
#8 |
|
Originally posted by Kuciwalker
My point was that it was less impressive than the Google one. The problem is trivial compared to the Google billboard. (Both are fairly easy.) Well, if they're both easy then what's the solution to the google one? Tom P. (mostly cause I'm so bad at math I'm not even sure I understand the question) |
![]() |
![]() |
#9 |
|
|
![]() |
![]() |
#10 |
|
How would you actually go about this. First calculate e with a gazillion digits, then store it in a variable (can variables even hold that many digits???) and then start from the first digit, and checking if that sequence of 10 digits is a prime, and if not, move 1 digit further and recheck?
Asmodean |
![]() |
![]() |
#11 |
|
|
![]() |
![]() |
#12 |
|
|
![]() |
![]() |
#14 |
|
Originally posted by Asmodean
How would you actually go about this. First calculate e with a gazillion digits, then store it in a variable (can variables even hold that many digits???) and then start from the first digit, and checking if that sequence of 10 digits is a prime, and if not, move 1 digit further and recheck? Essentially. Except as I noted you can't use a naive check; instead, you have to use a method that is likely to produce the right answer, but not guaranteed. |
![]() |
![]() |
#16 |
|
Originally posted by Lul Thyme
The fact that it's O(sqrt(n)) in itself doesn't mean anything about whether a particular problem is solvable by naive approach. It depends on the constants involved and the size of the problem, among other things. Asymptotics are all very important, but they don't tell the whole story, and sometimes even tell the wrong story in practical problems. EDIT1: you still havn't explained why it being harder to find the "answer" in this case make it lame. Is google the new threshold for "lameness" for such type of ads in the future? EDIT2:I really don't see how the naive approach wouldn't work. From the prime number theorem, the density of primes for 10 digit numbers is about 5%. If the digits of e were random (which they are believed to be for many different definitions), you would expect to find the first prime after 20 tries. You can plug them in Mathematica by hand, running a Miller Rabin for primality, and find the answer in minutes. Seems pretty straightforward and "naive" to me. I understood the numbers, 10 and 20, and that's about it. I thought there was no way to test for primes? Finding prime numbers is NP-complete, right? You just have to look for them. Or am I missing the biggest mathematical breakthrough in the last 200 years? Seriously though, I thought you couldn't "test" for primality without just dividing by each number along the way. Tom P. |
![]() |
![]() |
#17 |
|
Originally posted by Lul Thyme
you still havn't explained why it being harder to find the "answer" in this case make it lame. Is google the new threshold for "lameness" for such type of ads in the future? Google does a cute, geeky ad that requires just a little bit of thought to complete (for the intended audience). Later, EA does another geeky ad, except it's completely trivial - type that in and add printf and you have the answer. Meh. It's a copycat and a poor one. Thus, lame. |
![]() |
![]() |
#18 |
|
|
![]() |
![]() |
#19 |
|
I thought everything was in NP. The difference comes in being in P (can "prove" it quicker than "solve" it) or being NP Complete (absolutly cannot prove it without solving it completly).
So being "in NP" is not really noteworthy. Again, I'm not a mathmetician... but I'm getting a lot out of this. Tom P. |
![]() |
![]() |
#20 |
|
Originally posted by Lul Thyme
Well sure you can always find dumber ways to do almost anything. Even YOUR naive method is really smart compared to some other methods I could describe. I don't see how checking each number in mathematica one by one using the Prime[n] function is anything but naive. I mention it because one of my groupmates attempted exactly the implementation I described... not every language has a primality test like that built in, and not everyone knows that such a primality test exists (I only knew because I'd seen it in the Java API). |
![]() |
Reply to Thread New Thread |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|