Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Combinatorics | Section
Exploring Probability Theory

bookCombinatorics

Scorri per mostrare il menu

Combinatorics is the branch of mathematics focused on counting the number of ways things can be arranged or selected. Two fundamental concepts in combinatorics are permutations and combinations. Understanding when to use each is crucial for solving probability problems.

Permutations

A permutation refers to an arrangement of items where the order matters. The number of ways to arrange nn distinct objects in a sequence is given by the factorial of nn, written as n!n!.

If you want to arrange rr items out of nn available, the formula for the number of permutations is:

P(n,r)=n!(nr)!P(n, r) = \frac{n!}{(n-r)!}

Step-by-step example:
Suppose you have 5 different books and want to know in how many ways you can arrange 3 of them on a shelf.

  • Total items (nn): 5
  • Number to arrange (rr): 3
  • Calculation: P(5,3)=5!(53)!=1202=60P(5, 3) = \frac{5!}{(5-3)!} = \frac{120}{2} = 60

So, there are 60 possible arrangements.

Combinations

A combination is a selection of items where the order does not matter. The formula for the number of ways to choose rr items from nn is:

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

Step-by-step example:
Suppose you need to select 3 team members from a group of 5 candidates.

  • Total candidates (nn): 5
  • Number to select (rr): 3
  • Calculation: C(5,3)=5!3!×2!=1206×2=12012=10C(5, 3) = \frac{5!}{3! \times 2!} = \frac{120}{6 \times 2} = \frac{120}{12} = 10

So, there are 10 different ways to form the team.

12345678910111213
import math # Calculate permutations: number of ways to arrange r items out of n, order matters def permutations(n, r): return math.factorial(n) // math.factorial(n - r) # Calculate combinations: number of ways to choose r items from n, order does not matter def combinations(n, r): return math.factorial(n) // (math.factorial(r) * math.factorial(n - r)) # Example usage print("Permutations of 5 items taken 3 at a time:", permutations(5, 3)) print("Combinations of 5 items taken 3 at a time:", combinations(5, 3))
copy
question mark

Which formula should you use to determine how many ways you can assign gold, silver, and bronze medals to 10 runners in a race?

Seleziona la risposta corretta

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 3

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

Sezione 1. Capitolo 3
some-alt