Problem 109

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
Post Reply
axelbrz
Posts: 51
Joined: Mon Sep 08, 2008 5:34 am

Problem 109

Post by axelbrz »

Hi, I don't understand the final question of the Problem 109 about darts:

"How many distinct ways can a player checkout with a score less than 100?"

What does it means with "less than 100"?

Do I have to sum the distinct ways to checkout with a score of N where 2 <= N <= 100?

Or just calculate the distinct ways to checkout with a score of 100?

Thanks!

Axel.
"think(O(n))+O(n) sometimes is better than think(O(1))+O(1)"

Image
User avatar
rayfil
Administrator
Posts: 1412
Joined: Sun Mar 26, 2006 5:30 am
Location: Quebec, Canada
Contact:

Re: Problem 109 - Darts

Post by rayfil »

Do I have to sum the distinct ways to checkout with a score of N where 2 <= N <= 100?
That is exactly what you are asked to do, with the exception that N < 100.
checkout with a score less than 100?
When you assume something, you risk being wrong half the time.
axelbrz
Posts: 51
Joined: Mon Sep 08, 2008 5:34 am

Re: Problem 109 - Darts

Post by axelbrz »

Thanks!
"think(O(n))+O(n) sometimes is better than think(O(1))+O(1)"

Image
User avatar
Oakenshield
Posts: 8
Joined: Sat Feb 16, 2008 10:11 pm
Location: Lyon, France
Contact:

Re: Problem 109 - Darts

Post by Oakenshield »

Hi everybody,

I wonder if there is (or not) currently a matter with problem 109 : I found easily the fact that there are 42336 distinct ways of checking out in total, as announced in the text... However, when I added a simple filter to my algorithm to find the number of distinct ways to checkout with a score less than 100, my answer was refused... Is this a bug, or am I wrong somewhere ?

Thanks for your advices !
User avatar
stijn263
Posts: 1505
Joined: Sat Sep 15, 2007 11:57 pm
Location: Netherlands

Re: Problem 109 - Darts

Post by stijn263 »

I think you are wrong somewhere..
Euler wrote:However, when so many people have hit the target and one marksman misses ten times on the run, he/she can hardly shoot his/her own foot and conclude that because the gun is working properly the fault must lie in the target.
User avatar
Oakenshield
Posts: 8
Joined: Sat Feb 16, 2008 10:11 pm
Location: Lyon, France
Contact:

Re: Problem 109 - Darts

Post by Oakenshield »

Yeah, my mistake, I just wanted to be sure that there wasn't any technical problem with the web site (this happened one time some months ago).

Thanks ! :)
zwuupeape
Posts: 189
Joined: Tue Jun 09, 2009 6:11 pm

Re: Problem 109

Post by zwuupeape »

I have a question. With a score of 3 you can checkout with S1 D1, with a score of 2 you can checkout with just D1, is it considered different ?
User avatar
stijn263
Posts: 1505
Joined: Sat Sep 15, 2007 11:57 pm
Location: Netherlands

Re: Problem 109

Post by stijn263 »

yes
mdean
Posts: 206
Joined: Tue Aug 02, 2011 2:05 am

Re: Problem 109

Post by mdean »

It probably doesn't pertain to this problem, but what happens if a player's last dart lands on a double and reduces their score to 1? Is that a win, but not a checkout?
Image
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 109

Post by TripleM »

No, the problem specifies that you need to end on 0 with a double to win; ending on 1 or lower without a double is considered bust.
mdean
Posts: 206
Joined: Tue Aug 02, 2011 2:05 am

Re: Problem 109

Post by mdean »

TripleM wrote:No, the problem specifies that you need to end on 0 with a double to win; ending on 1 or lower without a double is considered bust.
So it's a bust if it reduces your total to 1 or less and either:

1. The total is not equal to zero or
2. The last dart was not a double?
Image
User avatar
rayfil
Administrator
Posts: 1412
Joined: Sun Mar 26, 2006 5:30 am
Location: Quebec, Canada
Contact:

Re: Problem 109

Post by rayfil »

If you reduce to 0, the last dart MUST be a double for the sequence to count. That "last" dart can be the 1st, 2nd or 3rd one. For example, with a score of 50, you win if you throw a bullseye with your first dart. You don't have to throw the other two darts.
When you assume something, you risk being wrong half the time.
ttsupra1994
Posts: 1
Joined: Mon Jul 02, 2012 7:03 pm

Re: Problem 109

Post by ttsupra1994 »

I'm sorry, don't understand why three following checkouts are not considered for given example of 6:
D1,S1,S1,D1
S2,S1,S1,D1
S1,S1,S1,S1,D1

Thanks!
User avatar
jaap
Posts: 588
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 109

Post by jaap »

ttsupra1994 wrote:I'm sorry, don't understand why three following checkouts are not considered for given example of 6:
D1,S1,S1,D1
S2,S1,S1,D1
S1,S1,S1,S1,D1

Thanks!
Problem 109 wrote:In the game of darts a player throws three darts
mdean
Posts: 206
Joined: Tue Aug 02, 2011 2:05 am

Re: Problem 109

Post by mdean »

The first line reads
In the game of darts a player throws three darts at a target board which is split into twenty equal sized sections numbered one to twenty.
Image
sanilogc21
Posts: 1
Joined: Wed Aug 21, 2019 3:48 am

Re: Problem 109

Post by sanilogc21 »

Need a confirmation of my understanding

is D1 0 D3 same as D1 D3

My understanding is that because of the combination of the below two rules, the above is true:
Note that D1 D2 is considered different to D2 D1 as they finish on different doubles. However, the combination S1 T1 D1 is considered the same as T1 S1 D1.

In addition we shall not include misses in considering combinations; for example, D3 is the same as 0 D3 and 0 0 D3.
This messes up my calculation of distinct ways of checking out:
Single Dart throw: 21
Double Dart Throws: 62 x 21
Three Dart Throws: 62*61*0.5*21 + 21+20+16
If we consider the D1 0 D3 different from D1 D3, then I can account for the X 0 Y case and add 62 x 21 to make the total distinct ways to 42336 .
hamsterofdeath
Posts: 20
Joined: Fri Apr 27, 2018 7:17 pm

Re: Problem 109

Post by hamsterofdeath »

i wanted to solve this, but i got stuck at the problem description.
i need to know:
1. what do D1,D2,S1 etc mean
2. what are their scores, which ones even exist
3. i am supposed to calculate solutions for score < 100 but even 3x bullseye only gets you down to 151 points if you start at 301. huh?
4. "T20 T20 D25 (two treble 20s and double bull)." -> huh again. how does that lead to 301-170=131? 20+20+25=65, not 131
5. what is the meaning of the numbers around the circle

thx :)
DJohn
Posts: 90
Joined: Sat Oct 11, 2008 12:24 pm

Re: Problem 109

Post by DJohn »

hamsterofdeath wrote: Sun Mar 20, 2022 11:03 pm 1. what do D1,D2,S1 etc mean
Double 1, Double 2, Single 1. T4 would be Treble 4.
2. what are their scores, which ones even exist
Double 1 scores 2*1 = 2. Double 2 scores 2*2 = 4. Single 1 scores 1*1 = 1. Treble 4 would score 3*4 = 12. There are single, double, and treble versions of all of the numbers from 1 to 20, and also single and double versions of 25 (the bullseye).
3. i am supposed to calculate solutions for score < 100 but even 3x bullseye only gets you down to 151 points if you start at 301. huh?
The problem is imagining that you've already been playing for some time, and have already reached a score less than 100 (exactly how you reach this score doesn't matter, but you will have to consider all of the numbers less than 100 as starting points). It's asking how many ways you can reduce that to zero in a single round of up to three throws.
4. "T20 T20 D25 (two treble 20s and double bull)." -> huh again. how does that lead to 301-170=131? 20+20+25=65, not 131
T20 is treble 20, which scores 60. D25 is double bullseye, which scores 50. 60 + 60 + 50 is 170.
But the scores in darts go backwards. You start with 301 points, and subtract whatever numbers you hit. So if you start on 301 and hit T20 T20 D25, you're left with 301 - 170 = 131.
5. what is the meaning of the numbers around the circle
They're the base scores (before considering doubles and trebles) for each sector of the circle. For example, hitting the black areas above the 3 at the bottom of the board will score you 3 points. Hitting the red area directly next to the 3 will score 2*3 = 6. Hitting the red area between the two black area will score 3*3 = 9.
mdean
Posts: 206
Joined: Tue Aug 02, 2011 2:05 am

Re: Problem 109

Post by mdean »

hamsterofdeath wrote: Sun Mar 20, 2022 11:03 pm i wanted to solve this, but i got stuck at the problem description.
i need to know:
1. what do D1,D2,S1 etc mean
2. what are their scores, which ones even exist
3. i am supposed to calculate solutions for score < 100 but even 3x bullseye only gets you down to 151 points if you start at 301. huh?
4. "T20 T20 D25 (two treble 20s and double bull)." -> huh again. how does that lead to 301-170=131? 20+20+25=65, not 131
5. what is the meaning of the numbers around the circle

thx :)
1. double 1, double 2, single 1
2 and 3. I don't believe their scores are relevant. Assume they're low enough to win.
4. You're missing the point of "treble" and "double". 3x20+3x20+2x25=170
5. Those are the scores if the dart lands in that wedge. That score can be doubled or tripled if they land in the appropriate ring. If it lands in the middle ring of the topmost wedge, it scores 3x20, abbreviated T20 in this problem.
Image
Post Reply