-1

Is it possible to approximate ${}^n C _k$ by polynomial? I want only to know the order (e.g. $O(n^3)$), so accuracy doesn't matter much.

If $n \gg r$, we have $$ {}^n C _r = O(n^r). $$

But how about general case?

Cheese Cake
  • 1,143
ynn
  • 314
  • If $r$ is a constant, ${n\choose r}$ is a polynomial in $n$, of degree $r$. In the general case, it depends. Well, you may write ${n\choose r}=O(2^n)$, but it's not very useful. – Jean-Claude Arbaut Nov 22 '22 at 09:26
  • $\binom{n}{1}=n$; $\binom{n}{2}=\frac{n(n-1)}{2}$; $\binom{n}{3}=\frac{n(n-1)(n-2)}{3!}$; etc... do you want more than that ? – Jean Marie Nov 22 '22 at 09:32
  • Even in the case $n \gg r$, what you write is wrong: if $r=\sqrt{n}$, you can't bound by a polynomial. – Jean-Claude Arbaut Nov 22 '22 at 09:33
  • @JeanMarie For example, I sometimes want to know the order of ${}_{735} C _{214}$ without starting Python and typing comb(735, 214) to estimate complexity in competitive programming. – ynn Nov 22 '22 at 09:56
  • @Jean-ClaudeArbaut Approximation I want doesn't necessarily be very accurate. For example, ${}_{1000} C _3 = 1.7 \times 10^8 \simeq O(1000^3)$. This level of accuracy is enough. – ynn Nov 22 '22 at 10:00
  • Careful with $O$. What you write is nonsense, a constant is always $O(1)$. And you can't write either $\simeq O(n^3)$, either it's $O(n^3)$ or it's not. Big-$O$ has a precise definition: $f(x)=O(g(x))$ when $x\to x_0$ is there are constant $M$ and $m$ such that $|f(x)|<M,|g(x)|$ for all $x>m$. Don't try to play around with this notation. – Jean-Claude Arbaut Nov 22 '22 at 10:22
  • @Jean-ClaudeArbaut Thank you for pointing out it and sorry for my poor use of notation. Is it possible to quickly know the order of, for example, ${}_{735} C _{214}$ in mental arithmetic? Currently I always use Python, but it sometimes seems cumbersome to start Python only to calculate the value. – ynn Nov 22 '22 at 10:41
  • 1
    Not really. You can't rewrite $n\choose k$ with factorials and use Stirling's formula, but you still need a calculator to find an approximation. Maybe an expert in mental arithmetic has tricks, but the only thing I can't tell you right away is it's less than $2^{735}$ (because $\sum_{k=0}^n{n\choose k}=2^n$). You might use the fact that the binomial distribution has a bell shape to find a coarse approximation. – Jean-Claude Arbaut Nov 22 '22 at 10:56
  • Typo: yu can rewrite, of course. – Jean-Claude Arbaut Nov 22 '22 at 13:10
  • 1
    Just use Stirling's Approximation to as many orders as you need. The most naive version (see here) gives an approximation of $\frac{n^k}{k!}$, and more terms of Stirling will improve that. – Brevan Ellefsen Nov 22 '22 at 13:13

2 Answers2

1

The simplest approximation comes, as usual, for Stirling apparoxiamtion.

Considering $k=a \,n$ $$\binom{n}{k}=\binom{n}{a n}=\frac{\Gamma (n+1)}{\Gamma ((1-a) n+1)\, \Gamma (a n+1)}$$ Taking logarithms, using three times Stirling approximation and finishing with Taylor series $$\log \left (\binom{n}{a n}\right)=-\big[a\log(a)+(1-a)\log(1-a)\big]\,n-\log \left( \sqrt{2\pi a(1-a) n}\right)-$$ $$\sum_{k=0}^\infty\frac {P_k(a)}{c_k\,\big[a(1-a)n \big]^{2k+1}}$$ The $c_k$ form sequence $A046969$ in $OEIS$ and the very first polynomials are $$\left( \begin{array}{cc} k & P_k(a) \\ 0 & a^2-a+1 \\ 1 & -a^6+3 a^5-3 a^4+a^3-3 a^2+3 a-1 \\ 2 & a^{10}-5 a^9+10 a^8-10 a^7+5 a^6-a^5+5 a^4-10 a^3+10 a^2-5 a+1 \\ \end{array} \right)$$

For the case of comb(735, 214) you used in comments, neglecting the summation gives for its logarithm $439.9103$ while its exact value is $439.9098$. The first term of the summation is $-0.0004$.

1

This approximation is good for quick estimates:

$$ \left(\frac{n}{r}\right)^r \le \binom{n}{r} \le \left(\frac{e\cdot n}{r}\right)^r$$

(see e.g. this question for proof). If $r > \tfrac{n}{2}$, then use the identity $\binom{n}{r} = \binom{n}{n-r}$ first to get tighter bounds.

Using the example from your comment,

$$ 3^{214} < \left(\frac{735}{214}\right)^{214} \le \binom{735}{214} \le \left(\frac{2.72\times 735}{214}\right)^{214} < 10^{214}$$

so we can roughly estimate the value to be in the $10^{100}$ to $10^{200}$ range. (The actual value is about $1.123\times 10^{191}$.)