Nobody gets their own hat, that means there's no singleton cycle. so that means that, that getting, getting your own hat means if you're in position four it's the, fourth item. so, and that's a singleton cycle. so the question is what's the probability that, that a permutation is a derangement or how many derangements are there? now just as an amusing aside this problem has been posed in the centuries since in many different ways. that's the classical opera way. so some people say, well, a professor returns exams to students and by passing them out at random. 