mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2008-02-10, 00:56   #12
lavalamp
 
lavalamp's Avatar
 
Oct 2007
Manchester, UK

135710 Posts
Default

I'd made a couple of mistakes (I'd specifically tuned my code for the previous set of scores and hadn't re-tuned it for these, so it missed some combos), also somehow I missed out the second 24. Also I stopped at 14 darts instead of running to 17.

So yeah, NOW I also get 82339371.

Unfortunately I have no idea how FFTs work, so I don't know what specific methods you're refering to. However, I will read around and have a think as to how I could speed up my code (this last run 93 mins ).
lavalamp is offline   Reply With Quote
Old 2008-02-10, 11:25   #13
ckdo
 
ckdo's Avatar
 
Dec 2007
Cleves, Germany

2×5×53 Posts
Default

Somewhat optimized results:

Code:
kossy@leela:~/darts2> time ./darts2
Value for N=100 is 82339371.
Peak at N=667: 17496397018818748.
Peak at N=668: 17496397018818748.

real    0m0.002s
user    0m0.001s
sys     0m0.001s
kossy@leela:~/darts2>
Code might run faster with mprime stopped, but ... nah.

Where did the 1072 come from, again?
ckdo is offline   Reply With Quote
Old 2008-02-10, 11:42   #14
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

22·32·173 Posts
Default

Quote:
Originally Posted by ckdo View Post
Value for N=100 is 82339371.
Peak at N=667: 17496397018818748.
Peak at N=668: 17496397018818748.
Yes, I concur with that.
Quote:
Originally Posted by ckdo View Post
Where did the 1072 come from, again?
1072 was for the original problem with 43 unique targets. Your answer is for 62 unique targets with maximal sum of 1335, hence the peaks at floor[1335/2] and ceil[1335/2].
retina is online now   Reply With Quote
Old 2008-02-10, 11:59   #15
ckdo
 
ckdo's Avatar
 
Dec 2007
Cleves, Germany

2×5×53 Posts
Default

Quote:
Originally Posted by retina View Post
You need a better algorithm. It is a trivial Q actually. I ran all sums up to 1072 in <1 second. Think about using divide and conquer methods similar to FFT

[edit]For all area scores (62 areas will bullseye) I get 82339371 for N=100[/edit]
Ah, yes. It escaped me that the 1072 was in the unedited part of the message and I didn't conclude you were talking about the original problem.
ckdo is offline   Reply With Quote
Old 2008-02-10, 12:38   #16
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

11000010101002 Posts
Default

Quote:
Originally Posted by retina View Post
[edit]For all area scores (62 areas will bullseye) I get 82339371 for N=100[/edit]
Oops, that should be ... (62 areas with bullseye) ...
retina is online now   Reply With Quote
Old 2008-02-13, 03:07   #17
davar55
 
davar55's Avatar
 
May 2004
New York City

5·7·112 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
Compute the coefficient of x^100 in the generating function
1/[(1-x)(2-x)(3-x)(4-x)............(60-x)]
Is this the right generating function?
Shouldn't it be the coefficient of x^100 in
(1+x)(1+x^2)(1+x^3)(1+x^4).....(1+x^57)(1+x^60) [43 terms]?

And then if we want to allow for one dart per area,
just raise the appropriate term to the power = #areas with that value,
e.g. (1+x^6)^3 because 6 is the value of three areas.
(Which yields 62 terms.)

Last fiddled with by davar55 on 2008-02-13 at 03:13 Reason: add second paragraph
davar55 is offline   Reply With Quote
Old 2008-02-13, 14:38   #18
grandpascorpion
 
grandpascorpion's Avatar
 
Jan 2005
Transdniestr

503 Posts
Default

I think Davar is right.

If you wanted up to three terms, I believe the term would be

(1 + x^6 + x^12 + x^18) rather than (1+x^6)^3
grandpascorpion is offline   Reply With Quote
Old 2008-02-13, 15:47   #19
Kees
 
Kees's Avatar
 
Dec 2005

22·72 Posts
Default

An interesting link, slightly related

http://www.maa.org/mathland/mathland_5_19.html
Kees is offline   Reply With Quote
Old 2008-02-14, 00:18   #20
davieddy
 
davieddy's Avatar
 
"Lucan"
Dec 2006
England

2×3×13×83 Posts
Default

I'm still intrigued by Davar's choice of 43 numbers.
davieddy is offline   Reply With Quote
Old 2008-02-14, 00:39   #21
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

352210 Posts
Default

Quote:
Originally Posted by davieddy View Post
I'm still intrigued by Davar's choice of 43 numbers.
Intrigued by something other than the fact they are a list of all possible point values one can score by throwing one dart?
bsquared is offline   Reply With Quote
Old 2008-02-14, 09:13   #22
davieddy
 
davieddy's Avatar
 
"Lucan"
Dec 2006
England

194A16 Posts
Default

Doh
Quote:
Originally Posted by bsquared View Post
Intrigued by something other than the fact they are a list of all possible point values one can score by throwing one dart?
davieddy is offline   Reply With Quote
Reply

Thread Tools


All times are UTC. The time now is 23:31.


Fri Aug 6 23:31:53 UTC 2021 up 14 days, 18 hrs, 1 user, load averages: 4.26, 3.93, 3.96

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.