MathCastle
Counting & ProbabilityChallengeExpected Value, Linearity & Advanced Probability

Expected Value, Linearity & Advanced Probability · Challenge problem

A permutation of {1,…,7}\{1,\dots,7\} is chosen uniformly at random. Find the expected number of unordered pairs {i,j}\{i,j\} that lie in the same cycle.

The answer is a fraction mn\tfrac{m}{n} in lowest terms; find m+nm + n.