For a puzzle on another site I wrote a program that calculated the number of distinct finishes in darts.
It works by creating 3 arrays, singles, doubles and triples where doubles and triples are singles * 2 and singles * 3. Doubles also contain 50 and singles contain 25 and 50.
It then runs through every combination of singles, doubles and triples (3, 2 and 1 dart combinations) and checks if the result is under the limit it's looking for.
The initial problem was to find the sum of the total number of outs for all scores under 100.
I was wondering, could this done just using a formula ?
Is their a formula that would generate the sequence shown below (left is limit, right is the number of outs). When you solve the problem you get access to the answer thread but all the answers are variations on the programming approach I took and no one seemingly found a pattern.
Limit - Outs
3 - 1
4 - 2
5 - 6
6 - 11
7 - 22
8 - 34
9 - 56
10 - 78
11 - 114
12 - 150
13 - 203
14 - 255
15 - 331
16 - 402
98 - 37656
99 - 37967
100 - 38182
Example: if limit is 5 the number of outs is 6
Single 1 : Single 1 : Double 1 = 4
Single 1 : Double 1 = 3
Single 2 : Double 1 = 4
Double 1 : Double 1 = 4
Double 1 = 2
Double 2 = 4
It works by creating 3 arrays, singles, doubles and triples where doubles and triples are singles * 2 and singles * 3. Doubles also contain 50 and singles contain 25 and 50.
It then runs through every combination of singles, doubles and triples (3, 2 and 1 dart combinations) and checks if the result is under the limit it's looking for.
The initial problem was to find the sum of the total number of outs for all scores under 100.
I was wondering, could this done just using a formula ?
Is their a formula that would generate the sequence shown below (left is limit, right is the number of outs). When you solve the problem you get access to the answer thread but all the answers are variations on the programming approach I took and no one seemingly found a pattern.
Limit - Outs
3 - 1
4 - 2
5 - 6
6 - 11
7 - 22
8 - 34
9 - 56
10 - 78
11 - 114
12 - 150
13 - 203
14 - 255
15 - 331
16 - 402
98 - 37656
99 - 37967
100 - 38182
Example: if limit is 5 the number of outs is 6
Single 1 : Single 1 : Double 1 = 4
Single 1 : Double 1 = 3
Single 2 : Double 1 = 4
Double 1 : Double 1 = 4
Double 1 = 2
Double 2 = 4
via JREF Forum http://forums.randi.org/showthread.php?t=263462&goto=newpost
Aucun commentaire:
Enregistrer un commentaire