5 countries president and prime minister went for the summit. If all 5 prime minister shakes hand to a president at random, in how many ways they can shake hand if none of the same country PM shakes hand to that country president.
44
Since none of the same country PM shakes hand to that country president none of the same country PM shakes hand to that country president
So, number of de arrangements
Dn=n!∑k=0n(−1)kk!
=5!(1−11!+12!−13!+14!−15!)
=44