Problem : Five students at a meeting remove their name tags and put them in a hat; the five students then each randomly choose one of the name tags from the bag. What is the probability that exactly one person gets their own name tag? Attempt: I assumed the first person gets his/her own nametag and let other people be B,C,D and E. The number of arrangements of the persons that none of them gets his/her own nametag =9 : CBED, CDEB, CEBD, DBEC, DEBC, DECB, EBCD, EDBC, EDCB. And I get the answer 9/(4!) = 3/8 Then I found a solution of it : The selection of random nametags amounts to a selection of a random permutation of the five students from the symmetric group S5. The condition will be met if and only if the selected permutation σ has exactly one cycle of length one (i.e. exactly one fixed point). The only distinct cycle types with exactly one fixed point are (1,4) and (1,2,2). There are (5!)/4=30 permutations of the first type and (5!)/(2^3)=15 permutations of the second. Thus, the desired probability is (30+15)/(5!) = 3/8 I don't understand the solution of it and I want to know about it. Can someone please explain the solution to me? Like what are those S5, σ, cycle types, fixed points, how it comes up with (5!)/4 and (5!)/(2^3)?