Home

### OPEN SESAME

Singaporeans are known to be extra hardworking – do you know that in 2016, we clocked one of the longest working hours in the world?

Not surprisingly, Singaporean Alan goes back to work on a Saturday and gets stuck outside his office because he has forgotten his new 4-digit keycode. He remembers the 4 digits, which are all different, but not their sequence. What are the chances of him getting in on his first try?

### Solution

To find out the chances of him getting in, we need to know how many different sequences the numbers can come in – in other words, how many different permutations of the code there are.

Definition of Permutation:
A permutation is a possible way in which a set of objects can be arranged.

### Permutation

The number of permutations of n distinct objects is given by n!

For example, the number of permutations of 5 distinct objects is 5!, where

5! = 5 x 4 x 3 x 2 x 1

(that is, multiply all positive whole numbers less than or equal to 5).

In this case, because Alan remembers the 4 digits, we only need to find out how many different permutations of these 4 digits there are. Hence, n = 4.

So the number of permutations
 4! = 4 x 3 x 2 x 1 = 24

There are 24 possible permutations to the keycode.

So the chances of Alan unlocking the door on his first try is
124 ≈ 0.04

That’s only a 4% chance of succeeding on his first try.