What are the properties around Pi products

2.1k Views Asked by At

There are some well-known evaluations around summations like $\sum 1$ or $\sum i^2$ but what are these properties for products, specifically something like $\prod_{i=0}^{n-1} (n-i)$.

I basically have an algorithm with a terrible running time of $n \cdot (n-1) \cdot (n-2) \cdots (1)$ and I'd like to be able to express this in bigOh notation but I'm not sure what class it evaluates to. It is sort of $\mathcal{O}(n^n)$ but not really since each subsequent multiplication is $n-1$.

2

There are 2 best solutions below

1
On BEST ANSWER

The product you have is $\prod_{i=0}^{n-1} (n-i) = \prod_{i=1}^{n} i = n!$ ($n$ factorial). These are well-known and you can compute them once (or even look them up).

0
On

The well-known Stirling's formula says that $$n! \sim \sqrt{2\pi n} \left( \frac{n}{e} \right)^n$$ as $n\to\infty$.