Waste less time on Facebook — follow Brilliant.
×

Calvinball!

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.

Note by Calvin Lin
3 years, 8 months ago

No vote yet
28 votes

Comments

Sort by:

Top Newest

I used the Pick's Theorem, which states that in a Cartesian plane: \(P(A) = i + \frac{b}{2} -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 \(\frac{13}{5}\). Notice that every \(x\)-coordinate which is a multiple of \(5\) lies on the best-fit line. Hence, there are \(\frac{240}{5}=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 \(\frac{1}{2} \cdot base \cdot height = \frac{1}{2}\cdot 624\cdot 240 = 74880\)

Fitting the values of \(b=912\) and \(P(A) = 74880\) into Pick's theorem, we will get: \[74880 = i + \frac{912}{2} -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 \(\frac{13}{5}\), 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 = \boxed{75385}\).

P.S. Sigh... This is very tedious I think... Anyone has ideas to shorten this method? Happy Melodies · 3 years, 8 months ago

Log in to reply

@Happy Melodies 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 \times 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. Calvin Lin Staff · 3 years, 8 months ago

Log in to reply

@Happy Melodies This is the most elegant approach submitted till now! :) Sreejato Bhattacharya · 3 years, 8 months ago

Log in to reply

@Sreejato Bhattacharya Thank you! Happy Melodies · 3 years, 8 months ago

Log in to reply

@Happy Melodies Very innovative solution! Kudos to you. Daniel Liu · 3 years, 8 months ago

Log in to reply

@Daniel Liu Thank you! Oh, I have got the idea from Score! Happy Melodies · 3 years, 8 months ago

Log in to reply

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. Calvin Lin Staff · 3 years, 8 months ago

Log in to reply

@Calvin Lin Done :D Jatin Yadav · 3 years, 8 months ago

Log in to reply

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 \leq 3121\). Rearranging this gives \[b \leq \frac{3121-13c}{5} \] The number of solutions of \(b\) for a fixed \(c\), thus, is \(\left \lfloor \dfrac{3121-13c}{5} \right \rfloor + 1 \). We need to sum this up from \(c=0\) to \(c= \left \lfloor \dfrac{3121}{13} \right \rfloor = 240 \), which gives our desired answer: \[\sum \limits_{c=0}^{240} \left ( \left \lfloor \frac{3121-13c}{5} \right \rfloor + 1 \right ) = \boxed{75385}\] Sreejato Bhattacharya · 3 years, 8 months ago

Log in to reply

@Sreejato Bhattacharya Hey,you have stolen my solution! just kidding,mine is the same. :D Kishan K · 3 years, 8 months ago

Log in to reply

Does order matter? Sreejato Bhattacharya · 3 years, 8 months ago

Log in to reply

@Sreejato Bhattacharya Nope, just added that in. Calvin Lin Staff · 3 years, 8 months ago

Log in to reply

@Sreejato Bhattacharya In your status X could be any number from 0 to 999. Tan Li Xuan · 3 years, 8 months ago

Log in to reply

@Tan Li Xuan Did you really expect me to give a hint to a live challenge? Sreejato Bhattacharya · 3 years, 8 months ago

Log in to reply

However, in calvinball, the rules can be changed .....on the spot... Daniel Wang · 3 years, 8 months ago

Log in to reply

@Daniel Wang But only by Calvin and Hobbes, and you are neither. Calvin Lin Staff · 3 years, 8 months ago

Log in to reply

@Calvin Lin Rosalyn made a rule change throwing the water balloon at Calvin William Wang · 3 years, 8 months ago

Log in to reply

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 \(\lfloor \frac{3121 - 13a}{5} \rfloor\)

Also , no. of ways for a given \(a\) is \(\bigg\lfloor \frac{3121 - 13a}{5} \bigg\rfloor + 1\), and \(a\) varies from \(0\) to \(240\)

Hence, total required number of ways = \(\displaystyle \sum_{a=0}^{240} \Big(\bigg \lfloor \frac{3121 - 13a}{5} \bigg \rfloor + 1\Big)\)

= \(\fbox{75385}\) Jatin Yadav · 3 years, 8 months ago

Log in to reply

@Jatin Yadav Hi Jatin!

Can you please explain the following?

Also , no. of ways for a given \(a\) is \(\bigg\lfloor \frac{3121 - 13a}{5} \bigg\rfloor + 1\), and \(a\) varies from \(0\) to \(240\)

Thanks! Pranav Arora · 3 years, 8 months ago

Log in to reply

@Pranav Arora 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\(\bigg\lfloor \frac{3121-13a}{5} \bigg \rfloor\), and hence b can be \(0,1,2, \dots \bigg\lfloor \frac{3121-13a}{5} \bigg \rfloor\), and hence a total of \(\bigg\lfloor \frac{3121-13a}{5} \bigg \rfloor\ + 1\) values of \(b\) are possibe. Jatin Yadav · 3 years, 8 months ago

Log in to reply

@Jatin Yadav Thanks Jatin! I think I understand it now. :) Pranav Arora · 3 years, 8 months ago

Log in to reply

@Jatin Yadav You have made a couple of misprints at the end. The maximum value of \(b\) for a fixed \(a\) is \(\left \lfloor \dfrac{3121-13a}{5} \right \rfloor \), not \(\left \lfloor \dfrac{3121-5a}{5} \right \rfloor \) (that was a typo, I guess :) ). Sreejato Bhattacharya · 3 years, 8 months ago

Log in to reply

@Sreejato Bhattacharya Yes,indeed, it was, edited. Thanks. Jatin Yadav · 3 years, 8 months ago

Log in to reply

It's simple... Its not very lengthy and tedious.So can we all share our solutions? Kishan K · 3 years, 8 months ago

Log in to reply

@Kishan K Maybe... Not sure if everyone has seen this discussion though... they may want to solve the question too... Happy Melodies · 3 years, 8 months ago

Log in to reply

Not sure if I did correctly... applied the method I have learnt from Score!... Took around 6.5mins... Happy Melodies · 3 years, 8 months ago

Log in to reply

I have the feeling that I shouldn't have listed them all out... 2 hours, though. Hehe... Finn Hulse · 3 years, 8 months ago

Log in to reply

@Finn Hulse Ohhhh... I just re-did it. Actually very simple! (kind of). It's a pretty awesome problem. Finn Hulse · 3 years, 8 months ago

Log in to reply

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? Jamie Coombes · 3 years, 8 months ago

Log in to reply

@Jamie Coombes 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 \(\sum_{k=1}^{48}5 \times (624-k)\) for the rectangles, and \(37 \times 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. Jamie Coombes · 3 years, 8 months ago

Log in to reply

@Jamie Coombes 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). Calvin Lin Staff · 3 years, 8 months ago

Log in to reply

4 minutes.but my ans is not within the range [0,999] :/ Adeeb Zaman · 3 years, 8 months ago

Log in to reply

@Adeeb Zaman The correct answer is not in that range. Ahaan Rungta · 3 years, 8 months ago

Log in to reply

@Ahaan Rungta Yup :) Adeeb Zaman · 3 years, 8 months ago

Log in to reply

@Adeeb Zaman Can you explain how you did the calculations in 4 minutes? Calvin Lin Staff · 3 years, 8 months ago

Log in to reply

@Calvin Lin 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 :) Adeeb Zaman · 3 years, 8 months ago

Log in to reply

@Adeeb Zaman I also got not on that range so.. how next? Hafizh Ahsan Permana · 3 years, 8 months ago

Log in to reply

@Hafizh Ahsan Permana As mentioned by Ahaan R., the answer is not restricted to the range. It can be any number. Happy Melodies · 3 years, 8 months ago

Log in to reply

Took 13 minutes. Bhargav Das · 3 years, 8 months ago

Log in to reply

it took me 10 minutes, but it was simple Ayush Chowdhury · 3 years, 8 months ago

Log in to reply

About 7-8 min. Nitin Jain · 3 years, 8 months ago

Log in to reply

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. Kishlaya Jaiswal · 3 years, 8 months ago

Log in to reply

Around 11 minutes. Shendy Marcello Yuniar · 3 years, 8 months ago

Log in to reply

@Shendy Marcello Yuniar ...and I got it wrong. Shendy Marcello Yuniar · 3 years, 8 months ago

Log in to reply

About 6 minutes, but I had to use a calculator at the end. Sean Elliott · 3 years, 8 months ago

Log in to reply

Around 4 minutes.I'm not sure I got the right answer though. Tan Li Xuan · 3 years, 8 months ago

Log in to reply

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. Daniel Liu · 3 years, 8 months ago

Log in to reply

@Daniel Liu The point is to figure it out mathematically, not to use a computer program. Ahaan Rungta · 3 years, 8 months ago

Log in to reply

Comment deleted Dec 10, 2013

Log in to reply

@Sai Arvind Isnt it against the terms and conditions? U shouldn't disscuss about any of the current week problems :X Adeeb Zaman · 3 years, 8 months ago

Log in to reply

@Sai Arvind Hey, this is a question from this week's set of Brilliant problem. I think you ought to try this yourself first! Happy Melodies · 3 years, 8 months ago

Log in to reply

×

Problem Loading...

Note Loading...

Set Loading...