How to exchange this double sum?

43 Views Asked by At

I have a sequence of sets $D_i$, and currently the sum is $$\sum_{i=1}^n \sum_{d\in D_i} 1 $$

How would I exchange the sum so that we run through $i$ first?