I'm reading this paper An Efficient PTAS for Stochastic Load Balancing with Poisson Jobs. Which is solving a makespan minimizing job-shop problem for Poisson job sizes. Basically, schedule the minimum work for random job sizes whose job size distributions are Poissonian. The authors give an equation that I hadn't seen before:
$$\mathbb{E} \left[ \text{max}(X,Y) \right] = \sum_{x=0}^\infty \Pr\{X=x\} \left\{ x + \sum_{y=x+1}^\infty \Pr\{Y \geq y\} \right\}, $$ where $X$ and $Y$ are both random (independent) variables on support $\{0,1,\dots\}$.
I can think of one general approach (conditional expectations) that seems reasonable to derive this but I'm not able to get the result.
Can someone derive this result?
Note: I'll accept any derivation, the approach need not use conditional expectations. I only mention because it seems like this is a conditional expectation identity.