2
$\begingroup$

there is a table which grows as

1,1
1,1,2
1,1,3,3
1,1,4,4,6
1,1,5,5,10,10
1,1,6,6,15,15,20
.....and so on

If i want to find an specific element of the table like if i want to find 4th element of 6th row then the answer will be 6 but if i want to find the nth element of mth row for any n>=1,m>=1 then how to do it?

$\endgroup$
  • $\begingroup$ Hi! Do you know this? $\endgroup$ – MattAllegro Feb 22 '15 at 17:37
1
$\begingroup$

The $n$-th row contains the binomial coefficients $\binom{n}{0}$, ..., $\binom{n}{n}$, sorted by size. The $k$th element of the $n$th row is therefore given by $$\binom{n}{\lfloor \frac{k-1}{2} \rfloor}.$$

$\endgroup$
  • $\begingroup$ Small correction: With $k$ from $0$ to $n$, this will work if you use the floor function as $\displaystyle\binom{n}{\big\lfloor \frac{k}{2} \big\rfloor}$. Alternatively, it works with the ceiling function as $\displaystyle\binom{n}{\big\lceil \frac{k-1}{2} \big\rceil}$. $\endgroup$ – J. W. Perry Feb 22 '15 at 18:30
  • $\begingroup$ And I do mean to say, you have miswritten your formula. $\endgroup$ – J. W. Perry Feb 23 '15 at 0:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.