Shuffle a objects of type A together with b of type B into a random order.
Return the expected number of adjacent pairs whose two items share a type.
Linearity of expectation does all the work: there are adjacent positions, and each one holds a matching pair with the same probability.
Input
a = 5
b = 5
Output
4.0