# Math Help - help!

1. ## help!

Q1-Total number of squares of any size(side being natural nos.) in a rectangle of $$m\times n(m Q2-In how many ways can 15 boys and 3 girls can sit in a row such that between the girls at most two boys sit? all the persons are distinguishable and their order must be considred. 2. Hello, Navesh! These problems raise even more questions . . . Q1) Total number of squares of any size (side being natural nos.) . . . in an $m \times n$ rectangle . . . $m < n,\;m,n \in N$ Are we allowed to use the Greatest Integer Function? . . $[x]$ = the greatest integer less than or equal to $x.$ Basically, it is a "round down" function. Then we count the number of squares of various sizes . . . $1\times1:\;\;m\cdot n$ $2\times2:\;\;\left[\frac{m}{2}\right]\cdot\left[\frac{n}{2}\right]$ $3\times3:\;\;\left[\frac{m}{3}\right]\cdot\left[\frac{n}{3}\right]$ $4\times4:\;\;\left[\frac{m}{4}\right]\cdot\left[\frac{n}{4}\right]$ . . $\vdots$ . . . . . . . $\vdots$ $m\times m:\;\;1\cdot\left[\frac{n}{m}\right]$ Then add these numbers. Q2) In how many ways can 15 boys and 3 girls can sit in a row . . . such that between the girls at most two sit? (a) If the 18 children are distinguishable (they have different names), . . then their order must be considered. (b)If the 15 boys and 3 girls are indistinguishable (arrange 15 blue marbles . . and 3 red marbles in a row), the problem is still quite difficult. 3. Originally Posted by Navesh Q1-Total number of squares of any size(side being natural nos.) in a rectangle of $\[m\times n(m Q2-In how many ways can 15 boys and 3 girls can sit in a row such that between the girls at most two boys sit? all the persons are distinguishable and their order must be considred. The answer given in my textbook is $\[\sum (m-r)(n-r), r=0,1,2,\ldots ,m-1$$.Why is it so? I think you are missing some of the squares.

4. Hello, Navesh!

The answer given in my textbook is: $\[\sum^{m-1}_{r=0} (m-r)(n-r)$.

Of course, it is! . . . I looked at it from the worst direction . . . *blush*
I've solved this type of problem before, but totally forgot the approach.

We have an $m \times n$ "chessboard" with $m$ rows and $n$ columns.

How many $1\!\times\!1$ squares are there? .Let's call them $\text{one-squares}.$
. . Place a $\text{one-square}$ in the upper-left corner.
. . There are $m$of them in the first row, and there are $n$ such rows.
Hence, there are: $(m)(n)\text{ one-squares.}$

How many $\text{two-squares}$ are there?
. . Place a $\text{two-square}$ in the upper-left corner.
. . There are $n-1$ of them in the first row, and there are $m-1$ such rows.
Hence, there are: $(m-1)(n-1)\text{ two-squares.}$

How many $\text{three-squares}$ are there?
. . Place a $\text{three-square}$ in the upper-left corner.
. . There are $n-2$ of them in the first row, and there are $m-2$ such rows.
Hence, there: $(m-2)(n-2)\text{ three-squares.}$
. . . $\vdots$
How many $\text{m-squares}$ are there?
. . Place an $\text{m-square}$ in the upper-left corner.
. . There are $n-m+1$ of them in the first row, and there is $1$ such row.
Hence, there are: $1(n-m+1)\;\text{m-squares.}$

Therefore, the total number of squares is:
. . $m\cdot n + (m-1)(n-1) + (m-2)(m-2) +$ $\hdots + 1(n-m+1)$

which can be written: . $\sum^{m-1}_{r=0}(m - r)(n - r)$

5. Originally Posted by Soroban
Hello, Navesh!

Of course, it is! . . . I looked at it from the worst direction . . . *blush*
I've solved this type of problem before, but totally forgot the approach.

We have an $m \times n$ "chessboard" with $m$ rows and $n$ columns.

How many $1\!\times\!1$ squares are there? .Let's call them $\text{one-squares}.$
. . Place a $\text{one-square}$ in the upper-left corner.
. . There are $m$of them in the first row, and there are $n$ such rows.
Hence, there are: $(m)(n)\text{ one-squares.}$

How many $\text{two-squares}$ are there?
. . Place a $\text{two-square}$ in the upper-left corner.
. . There are $n-1$ of them in the first row, and there are $m-1$ such rows.
Hence, there are: $(m-1)(n-1)\text{ two-squares.}$

How many $\text{three-squares}$ are there?
. . Place a $\text{three-square}$ in the upper-left corner.
. . There are $n-2$ of them in the first row, and there are $m-2$ such rows.
Hence, there: $(m-2)(n-2)\text{ three-squares.}$
. . . $\vdots$
How many $\text{m-squares}$ are there?
. . Place an $\text{m-square}$ in the upper-left corner.
. . There are $n-m+1$ of them in the first row, and there is $1$ such row.
Hence, there are: $1(n-m+1)\;\text{m-squares.}$

Therefore, the total number of squares is:
. . $m\cdot n + (m-1)(n-1) + (m-2)(m-2) +$ $\hdots + 1(n-m+1)$

which can be written: . $\sum^{m-1}_{r=0}(m - r)(n - r)$
Thanks for help