Sample from a grid

You are given a 100\times100 table of nonnegative unnormalised heights. Describe an exact algorithm for drawing 100 independent cells from the corresponding discrete approximation using one uniform random variable per draw. Explain how optional within-cell jitter changes the approximation but not the cell probabilities.

This exercise has no worked answer.