Hello, kashan123999!
A notorious postman delivered 4 letters to four houses in such a way that no house got the correct letter.
In how many ways could he have delivered the letter?
The simplest way is to simply list the outcomes.
Let the letters be
There are 9 derangements of the four letters:
. .