Update: Now that everyone has had time to work on this problem by themselves, let's open up the floodgates and post your solution as a reply (or edit) to your comment. Let's see how many different ways the creative brains at Brilliant can approach this problem.
The following problem is a slight variant of Score!. Keep your answers to yourself, and only post how long (in minutes) it took you to do this problem.
In Calvinball, a player can score points in 3 different ways: 1 point for hitting your opponent with the ball, 5 points for capturing the flag, and 13 points for hitting Susie with the ball.
If Hobbes scored 3121 points in a game, how many different ways can this be achieved?
The order of the points scored doesn't matter, just the ways in which it is scored.
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
Update: Now that everyone has had time to work on this problem by themselves, let's open up the floodgates and post your solution as a reply (or edit) to your comment. Let's see how many different ways the creative brains at Brilliant can approach this problem.
Log in to reply
Done :D
I used the Pick's Theorem, which states that in a Cartesian plane: P(A)=i+2b−1, where P(A) represents the area of the polygon, i represents the number of interior points in the polygon and b represents the number of boundary points.
First, notice that the 1 pointer is determined by the number of 5 and 13 pointers. Then, I let there be x 13-pointers and y 5-pointers Then, draw lines x=0 and y=0 to form a triangle. The maximum number of 13 pointers is 240, while the max. number of 5 pointers is 624, hence, the vertices of the triangle are (240,0) and (0,624). [ The triangle is formed by drawing a best-fit line connecting(240,0) and (0,624)]. See here that b+i equal to the number of (x,y) that satisfies our question. [plus some exceptions as we see later]
Here, we can easily derive the number of points lying on our best-fit line, which has a gradient of 513. Notice that every x-coordinate which is a multiple of 5 lies on the best-fit line. Hence, there are 5240=48 points lying on the best-fit line [not counting the point (0,624). Then, b=48+624+240=912.
Next, the area of the triangle is simply 21⋅base⋅height=21⋅624⋅240=74880
Fitting the values of b=912 and P(A)=74880 into Pick's theorem, we will get: 74880=i+2912−1 Here, it is clear that i=74425. So, b+i=75337. But we're not done yet!
As mentioned earlier, we still have to add some exceptions! Notice that NOT ALL of the points (x,y) is under the best-fit line! Some of them are above the line but still fulfills the conditions, and the Picks' Theorem fails to consider these points because they are not within the triangle.
Notice that the points with x-coordinates 2 more than the x-coordinates of the point on the best-fit line has gradient more than 513, which means they lie outside the triangle. For example, since (0,624) lies on the lie, (2,619) is above the line. (you can check it out) Since the cycle repeats itself in multiples of 5, this is true for all points lying on the best-fit line. Since there are 48 points (not including (240,0) as it is the maximum number of 13 pointers) on the best-fit line, there will be 48 points that lie above the best-fit line that satisfies the question.
Hence, answer is 75337+48=75385.
P.S. Sigh... This is very tedious I think... Anyone has ideas to shorten this method?
Log in to reply
Great!
This is the approach that I would have used. The main disturbance is that the shape isn't easily dealt with. The problem is much easier if the total number of points is 65n, in which case we are looking at the triangle with vertices (0,0),(5n,0),(0,13n). We could use this triangle, to account for the points from 0 to 48×65=3120, and separately deal with getting exactly 3121 points using the floor method presented in other solutions. (And yes, 3121 was specially chosen)
The point is that when you learn a good method (the bijection to lattice points and Pick's Theorem), you shouldn't forget the elementary methods that you initially used (slowly counting according to cases). At times, the best approaches uses a combination of both methods. This is similar to coding, where you use a sledgehammer for most of the cases, and then deal with the edge cases with other tools.
Very innovative solution! Kudos to you.
Log in to reply
Thank you! Oh, I have got the idea from Score!
This is the most elegant approach submitted till now! :)
Log in to reply
Thank you!
Here's my solution:
The number of ways to score 3121 is essentially the number of non-negative integral solutions to the Diophantine equation a+5b+13c=3121. We note that any valid choice of (b,c) determines a unique non-negative a, so we can simply afford to find the number of solutions to 5b+13c≤3121. Rearranging this gives b≤53121−13c The number of solutions of b for a fixed c, thus, is ⌊53121−13c⌋+1. We need to sum this up from c=0 to c=⌊133121⌋=240, which gives our desired answer: c=0∑240(⌊53121−13c⌋+1)=75385
Log in to reply
Hey,you have stolen my solution! just kidding,mine is the same. :D
Does order matter?
Log in to reply
Nope, just added that in.
In your status X could be any number from 0 to 999.
Log in to reply
Did you really expect me to give a hint to a live challenge?
About 40 mins, Without revealing too much, is there a faster way to perform discrete integration to find the number of points within an section of the cartesian plane?
Log in to reply
I'll post a more complete solution later but a rough outline runs as follows:
Same as Sreejato's up to 13x+5y<=3121 then I graphed this inequality in the xy plane. Finding the root, y intercept etc. (624.2,0) (0,240+1/13)
If this problem is continuous, then I'd integrate the area between the line 13x+5y=3121 and x=0, but since it's discrete, we find the number of points beneath the line.
I broke the area into smaller rectangles and triangles, each triangle is 13*5 and contains 37 points. The rectangles look like the right Riemann Sum, they have a length of (624-k) and width 5. There are 48 triangles atop 48 rectangles. We get something like ∑k=1485×(624−k) for the rectangles, and 37×48 for the triangles.
Total number of points = number of points in triangles + number of points in rectangles. I'll check the numbers properly later.
Log in to reply
To find the number of integer points, we use Pick's Theorem.
Sadly, there is no higher dimension analogue of Pick's Theorem (in it's simplicity).
I have the feeling that I shouldn't have listed them all out... 2 hours, though. Hehe...
Log in to reply
Ohhhh... I just re-did it. Actually very simple! (kind of). It's a pretty awesome problem.
Not sure if I did correctly... applied the method I have learnt from Score!... Took around 6.5mins...
It's simple... Its not very lengthy and tedious.So can we all share our solutions?
Log in to reply
Maybe... Not sure if everyone has seen this discussion though... they may want to solve the question too...
Well, i guess it could have been made much better if the possible points were 2,5 and 13, now, since most of people have seen this post , are we allowed to post our solutions.
_Edit - _ Here is how i did:
Say we have a number of 13- pointers, b number of 5- pointers and c number of q-pointers.
For a given a,
5b+c=3121−13a,
Every value of b gives one way, and b varies from 0 to ⌊53121−13a⌋
Also , no. of ways for a given a is ⌊53121−13a⌋+1, and a varies from 0 to 240
Hence, total required number of ways = a=0∑240(⌊53121−13a⌋+1)
= 75385
Log in to reply
Hi Jatin!
Can you please explain the following?
Thanks!
Log in to reply
Clearly, maximum value of a would be 240 when, b=0,c=1
Also, 5b+c=3121−13a, Hence, max. value of b will be obviously⌊53121−13a⌋, and hence b can be 0,1,2,…⌊53121−13a⌋, and hence a total of ⌊53121−13a⌋ +1 values of b are possibe.
Log in to reply
b for a fixed a is ⌊53121−13a⌋, not ⌊53121−5a⌋ (that was a typo, I guess :) ).
You have made a couple of misprints at the end. The maximum value ofLog in to reply
However, in calvinball, the rules can be changed .....on the spot...
Log in to reply
But only by Calvin and Hobbes, and you are neither.
Log in to reply
Rosalyn made a rule change throwing the water balloon at Calvin
Can I use a computer to calculate it? I found out how to find the answer, just can't calculate it by hand. :\
EDIT: oh yea, almost forgot. Took 4 minutes to find how to get the answer. Writing a computer program to find the actual numerical answer right now.
Log in to reply
The point is to figure it out mathematically, not to use a computer program.
Around 4 minutes.I'm not sure I got the right answer though.
About 6 minutes, but I had to use a calculator at the end.
Around 11 minutes.
Log in to reply
...and I got it wrong.
It took not more than 9-10 minutes. I'd developed the logic only in few seconds but manually computing the final value (which was a tedious task) took the whole time.
About 7-8 min.
it took me 10 minutes, but it was simple
Took 13 minutes.
4 minutes.but my ans is not within the range [0,999] :/
Log in to reply
The correct answer is not in that range.
Log in to reply
Yup :)
Can you explain how you did the calculations in 4 minutes?
Log in to reply
Sir, I first formed the diophantine equation x+5y+13z=3121. From the experience of the similar problem named 'score', I discarded x from the equation and all I had to calculate was the number of integer solutions of the inequality 5y+13z<=3121. I used a c program to find it. In case of 'score', computer program was not needed though. But seeing others solution, I feel that using computer programming was not an encouraging idea. I didnt have any idea about pick's theorem before and it was a very nice opportunity for me to learn the theorem :)
I also got not on that range so.. how next?
Log in to reply
As mentioned by Ahaan R., the answer is not restricted to the range. It can be any number.