0
$\begingroup$

Consider all points $(m,n)$ where $m$ and $n$ are natural numbers, $m\leq10$, and $n\leq5$. What is the average distances from each point to the origin $(0,0)$?

I know how to find the distance $d$ between the points $(x_1,y_1)$ and $(x_2,y_2)$; $d=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$.

In this case, the first point is $(m,n)$ and the second point is the origin, therefore the distance, $d=\sqrt{m^2+n^2}$.

It is annoying to find all distances, summing them, and dividing them by the number of distances, is not it annoying?

What if the given conditions, $m\leq10$ and $n\leq5$, were changed to $m\leq49$ and $n\leq36$?!

$\endgroup$
2
  • $\begingroup$ I don't think there's a quick way, It's easy with a computer program. For very large $m$ and $n$ you could get an approximation using calculus. $\endgroup$ Dec 5, 2018 at 16:04
  • $\begingroup$ Even with small values of $m$ and $n$, it is annoying. Say $m\leq5$, and $n\leq2$. You will calculate $10$ distances. As you said it is easy by programming, but without that, can not we? :( $\endgroup$ Dec 5, 2018 at 16:08

1 Answer 1

-1
$\begingroup$

There is a quick solution for a related problem, even though it's not quite what you are asking. If you are willing to compute squares of distances of all points, then you get $$ \begin{split} f(m,n) &= \sum_{i=1}^m \sum_{k=1}^n \left(i^2 + k^2\right) \\ &= \sum_{i=1}^m \sum_{k=1}^n i^2 + \sum_{i=1}^m \sum_{k=1}^n k^2 \\ &= n \sum_{i=1}^m i^2 + m \sum_{k=1}^n k^2 \\ &= n \frac{m(m+1)(2m+1)}{6} + m \frac{n(n+1)(2n+1)}{6} \\ &= \frac{mn}{6} \left[(m+1)(2m+1) + (n+1)(2n+1)\right] \end{split} $$

As expected, $f(m,n)$ is symmetric in $m,n$, in other words, $f(m,n) = f(n,m)$...

$\endgroup$
6
  • $\begingroup$ This is not related. However, it is new for me, I like it. But should not it be $f(m-1,n-1)$ since $m$ and $n$ are natural numbers (non-zero positive integers)? $\endgroup$ Dec 5, 2018 at 16:17
  • $\begingroup$ @Hussain-Alqatari do you mean you want to include $0$? It is easy to change the above to accommodate for that if you like $\endgroup$
    – gt6989b
    Dec 5, 2018 at 16:37
  • $\begingroup$ What you have posted (including $0$). My problem (excluding $0$ because they are natural numbers). So, should it be $f(m-1,n-1)$? $\endgroup$ Dec 5, 2018 at 16:41
  • $\begingroup$ @Hussain-Alqatari I don't understand. My post does not include zero, since both sums start with min index $1$, so the points $(1,1),(1,2),(2,1)$ are included but $(0,x),(x,0)$ are not included $\endgroup$
    – gt6989b
    Dec 5, 2018 at 16:45
  • $\begingroup$ Yes, you are right. What about my original problem? No way? :( $\endgroup$ Dec 5, 2018 at 16:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .