Artificial intelligent assistant

Permuation & combination on finding number of ways lid can be wrongly placed There are 5 bottles of sherry and each have their respective caps. If you are asked to put the correct cap to the correct bottle then how many ways are there so that not a single cap is on the correct bottle? My approach: first bottle has 4 ways (excluding the correct cap) second bottle has 3 ways (excluding the correct cap + already used cap) Thir bottle has 2 ways fourth bottle has 1 way fifth bottle has 1 way So totally 4*3*2 = 24 ways. But answer 44. Pls explain the approach

The second bottle might have four choices if the one used for the first was the one intended for the second bottle. You are looking at the number of derangements. For $n$ items it is the closest natural to $\frac {n!}e$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f155e2056a40c8e1165e940241115139