Permutation and Combination Calculator

Permutation and Combination Calculator

Enter values for n (total items) and r (selected items) to calculate permutations and combinations.

Steps for Calculation

  1. Input Values:
    • Total items (n): Enter the total number of items (e.g., 5).
    • Selected items (r): Enter the number of items to select (e.g., 3).
  2. Calculate:
    • Click the Calculate button to compute the permutation and combination.
  3. View Result:
    • The permutation (nPr) and combination (nCr) will be displayed below the button.

Detailed Description

  • Permutation (nPr):
    • A permutation is the number of ways to arrange r items from a set of n items where the order matters.
    • Formula: nPr=n!(n−r)!nPr=(nr)!n!​.
    • Example: For n=5n=5 and r=3r=3, the permutation is 5!(5−3)!=1202=60(5−3)!5!​=2120​=60.
  • Combination (nCr):
    • A combination is the number of ways to choose r items from a set of n items where the order does not matter.
    • Formula: nCr=n!r!⋅(n−r)!nCr=r!⋅(nr)!n!​.
    • Example: For n=5n=5 and r=3r=3, the combination is 5!3!⋅(5−3)!=1206⋅2=103!⋅(5−3)!5!​=6⋅2120​=10.
  • Factorial:
    • The factorial of a number nn (denoted as n!n!) is the product of all positive integers less than or equal to nn.
    • Example: 5!=5×4×3×2×1=1205!=5×4×3×2×1=120.

Example Calculation

For n=5n=5 and r=3r=3:

  • Permutation (nPr): 5!(5−3)!=1202=60(5−3)!5!​=2120​=60.
  • Combination (nCr): 5!3!⋅(5−3)!=1206⋅2=103!⋅(5−3)!5!​=6⋅2120​=10.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *