Combination Calculator (nCr)

Visualization
Combination Calculation (nCr) n = ? (Total Items) r = ? (Items Chosen) C(n,r) = n! / (r! × (n-r)!) Step 1: Calculate n! = ? Step 2: Calculate r! = ? Step 3: Calculate (n-r)! = ? Result: ?

Understanding Combinations

What is a Combination?

A combination is a way of selecting items from a collection, where the order of selection does not matter. It answers the question: "How many ways can we choose a subset of items from a larger set, regardless of order?"

The Combination Formula

The formula for combinations is:

\[C(n,r) = \frac{n!}{r!(n-r)!}\]

Where:

  • n = total number of items to choose from
  • r = number of items being chosen
  • ! denotes factorial (e.g., 5! = 5 × 4 × 3 × 2 × 1)

Calculation Steps

To calculate a combination:

  1. Identify n and r
  2. Calculate n!
  3. Calculate r!
  4. Calculate (n-r)!
  5. Apply the formula: n! / (r! * (n-r)!)

Example Calculation

Let's calculate 5C3 (combination of 5 items taken 3 at a time)

\[C(5,3) = \frac{5!}{3!(5-3)!} = \frac{5!}{3!2!} = \frac{5 \times 4 \times 3!}{3! \times 2 \times 1} = \frac{20}{2} = 10\]

Visual Representation

Combination Calculation: C(5,3) n = 5 r = 3 n-r = 2 Step 1: n! = 5 × 4 × 3 × 2 × 1 = 120 Step 2: r! = 3 × 2 × 1 = 6 Step 3: (n-r)! = 2 × 1 = 2 Result: C(5,3) = 120 ÷ (6 × 2) = 10

This diagram illustrates the calculation of 5C3, showing how we choose 3 items from a set of 5, regardless of order.