**Example 2:**

A security system uses a five digit code using the numbers $0$ to $9$. If the digits can be repeated, write a rule to define the sample space and find number of elements in the sample space.

The sample space consists of five digit numbers as follows

$00000,\ 01234$ ..................

$10756,\ 11111$ ..................

The sample space can be defined as follows:

$S$ = $\{ xxxxx\ |\ x\ \epsilon\ \{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 \}$

As repetition of digits is allowed, each digit can be chosen in $10$ ways

Hence the number of elements in sample space = $10 \times 10 \times 10 \times 10 \times 10$ = $100,000$.