I recently started studying expected value and linearity of expectations. After studying some material I came across this problem: https://atcoder.jp/contests/dp/tasks/dp_j
Now, thinking in terms of linearity of expectation, my thought:
E(number of operations to eat N dishes) = E(number of operation to eat a1 dish) + E(number of operation to eat a2 dish) + ...
Then, E(number of operation to eat a1 dish) = a1 * E(number of operation to eat 1 dish)
Then, E(number of operation to eat 1 dish) = 1/n * 1 + (1 — 1/n)*(1/n) * 2 + ... = n
What's wrong with this interpretation? At what step am I misusing the linearity of expectation?