FUNCTION
Binomial_Coefficient
Returns the binomial coefficient using the factorial function.
Interface
#include <codecogs/maths/combinatorics/arithmetic/binomial_coefficient.h>
using namespace Maths::Combinatorics::Arithmetic;
The binomial coefficient $\left ( \begin{array}{c}n\\k \end{array} \right )$ is the number of ways to pick k unordered outcomes from n possibilities. This is also known as combination number, $_{n}C_k$. It is defined as:
$$_nC_k \equiv \left ( \begin{array}{c}n\\k \end{array} \right ) \equiv \frac{n!}{k!(n-k)!}$$
(1)
Parameters
n
number of possibilities
k
number of outcomes
Returns
the binomial coefficient C(n, k), i.e. n! / (k!(n-k)!)
Interactive Calculator
n
k
Result
Computing…
Set a range above first to export a graph.
This function's source code is only visible to registered users — documentation and the calculator above are free to use either way. Sign in to see it.