What are the total number of ways in which $i$, $j$ can be chosen subject to constrain $1\leq i \leq j \leq n$?

50 Views Asked by At

What are the total number of ways in which $i$,$j$ can be chosen subject to constrain $1\leq i \leq j \leq n$ ? All are integers. My progress is: I believe that out of the $n$ entries, there are $n \choose 2$ ways to choose $i,j$. But, the given answer is ${n \choose 2} + n$. Some explanation would be helpful.

2

There are 2 best solutions below

1
On BEST ANSWER

We want to find the number of ways we can choose integers $i, j$ such that $1 \leq i \leq j \leq n$. There are two possibilities:

  1. $i < j$: The number of such selections is the number of two element subsets $\{1, 2, 3, \ldots, n\}$ since the smaller number we select must be $i$ and the larger one must be $j$. The number of such subsets is $$\binom{n}{2}$$

  2. $i = j$: The number of such selections is the number of ways we can select one element from the set $\{1, 2, 3, \ldots, n\}$ since the selected number must equal both $i$ and $j$. The number of ways we can do this is $n$.

Since these cases are mutually exclusive and exhaustive, the number of ways we can choose integers $i, j$ such that $1 \leq i \leq j \leq n$ is $$\binom{n}{2} + n$$

8
On

For $j$ a number in $\{1,\ldots,n\}$ you have $j$ choices of $i$ since $i\in\{1,\ldots,j\}$ so the total number of choices is

$$\sum_{j=1}^n j =\frac{n(n+1)}{2}$$