1

I'm trying to solve a problem where I have more unknowns than equations. The question is "how many ways are there to achieve 28 points in basketball with 17 throws, given that each throw can yield one point, two points or three points".

I found a few solutions by just manually trying stuff out but I figured I could maybe represent this with some equations. I have formed this into some equations like this (using $t$ for 3-point, $d$ for 2-point and $s$ for 1-point throws):

  • $3t + 2d + 1s = 28$
  • $t + d + s = 17$

But there is of course more than one solution for this (so far I found $[t = 0, d = 11, s = 6]$, $[t = 1, d = 9, s = 7]$, $[t = 2, d = 7, s = 8]$, $[t = 3, d = 5, s = 9]$) and the equations really don't seem to help a lot when you have more unknowns than equations. So I wonder what would be an efficient way to approach this without having to try out all combinations. Also how can I be sure I found all solutions and did not miss one? I'm not so much interested in the actual solution but rather in finding the way to get there.

Thank you very much for your help!

2 Answers2

1

You can use Gaussian elimination and arrive at

$$\left( \begin{array}{cccc} 1 & 0 & -1 & -6 \\ 0 & 1 & 2 & 23 \\ \end{array} \right)$$

This means you have a free variable "s" that can be anything.

We have $$t = -6 + s \\ d = 23 -2s$$

Now you just need to select values that meet your criteria.

We need to $t \ge 0$ which makes $s \ge 6$ and $d \ge 0$, so $s \le 11$.

This means you have six values because $6 \le s \le 11$.

Moo
  • 11,311
  • He is working over integral values. – Doug Jan 10 '24 at 18:40
  • @Doug: I think the addition shows how arrive at the result. – Moo Jan 10 '24 at 18:54
  • 1
    yes... This is better than a trial and error approach. – Doug Jan 10 '24 at 18:57
  • 1
    I didn't know what gaussian elimination is but I just looked it up in the Wikipedia, so I already learned something new. The piece I was missing was to use the remaining equations to come up with some inequality for $s$ which solves both the problem of trial and error and also of knowing whether I have all solutions. This has been very illuminating, thank you very much! – Jan Thomä Jan 10 '24 at 19:08
  • You are very welcome and I liked both answers. – Moo Jan 10 '24 at 19:20
1

Because you are working over the nonnegative whole numbers, you will have a finite number of solutions.

Start with $s = 0$ and see if you can solve the system for $t$ and $d$ (if a solution exists, there will only be one; and check that both $t,d \geq 0$).

Repeat for $s = 1,2...$ What is the largest value of $s$ you need to test?

I can see six solutions graphically.

Doug
  • 2,436
  • I can see how this would work, thank you! Would I need to use $s$ or could I also do this with any of the other variables? – Jan Thomä Jan 10 '24 at 18:57
  • 2
    I chose $s$ bc I thought is was easiest to work with. But please make sure you understand the other answer, because it avoids trial and error. – Doug Jan 10 '24 at 18:58
  • Ah, I didn't reload and didn't see it. Thank you. – Jan Thomä Jan 10 '24 at 19:00