The problem of the 100 prisoners:

The numbers of 100 prisoners are randomly
distributed in 100 drawers (one number per drawer).

Every prisoner is allowed to open 50 drawers
If he finds his own number, he will be pardoned.


The strategy:

1.  

We assume that also the drawers are numbered, 1 to 100.

2.  

The prisoner with number x opens first the drawer number x.

3.  

If he finds inside the number y, then he opens the drawer number y,

 

    and so on.


The assignment   p: (number of prisoner) → (number of drawer)
    is a permutation.
The numbers of the drawers opened by a prisoner is a cycle of p.
If the cycle length is at most 50, then the prisoners finds his own number.

The probability for a random permutation of n = 100,
    that all cycles have length at most 50, is ≈ 31 %.
Thus: the probability that all prisoners are pardoned, is ≈ 31 %.