Consider two discrete uniform random variables $S_1$ and $S_2$ picked from $\{0,1,2,\ldots,s_{max}\}$, where $s_{max}$ is a maximum integer value. Consider also the random variable $G = |S_1 - S_2|$. Find $P(G \geq g)$.
Since $S_1$ and $S_2$ are discrete uniform rv, I've consider to find a solution based on a "grid" approach. Such grid corresponds to all integer pairs conforming a $s_{max} \times s_{max}$ square in a $S_1S_2$--plane. It is noted that the points satisfying $G \geq g$ are those located in an upper left triangle and lower right triangle (since $|S_1-S_2| \geq g$). Therefore \begin{equation}\label{Grade_var} P(G \geq g) = \left\{ \begin{array}{ll} 0 & \mbox{if $g>s_{max}$}\\ \frac{(s_{max}-g+1)(s_{max}-g+2)}{(s_{max}+1)^2} & \mbox{if $ 0 < g \le s_{max}$}\\ 1 & \mbox{if $g = 0$}\\ \end{array} \right. \end{equation}
This equation seems to be working...but I believe something is missing or wrong---any help will be appreciated.
A lattice right triangle with sides $(0 \ldots h)\times (0 \ldots h)$ has an integer area of $\binom{h+2}{2}$.
Since you have two, their area will be double, but when $h$ reaches the maximum (say $H$) the two triangles touches along the diagonal, which is then doubly counted and shall be subtracted.
Note that, algebraically, that is due to the fact of taking the absolute value of the difference: when it is null, the symmetry collapses into a single value for the two terms.
Thus $$ \eqalign{ & A(h)= 2 \binom{h+2}{2} - \left[ {h = H} \right]\left( {h + 1} \right) = \cr & = \left( {h + 2 - \left[ {h = H} \right]} \right)\left( {h + 1} \right) \cr} $$ where $[P]$ denotes the Iverson bracket $$ \left[ P \right] = \left\{ {\begin{array}{*{20}c} 1 & {P = TRUE} \\ 0 & {P = FALSE} \\ \end{array} } \right. $$
So you have $A(0)=2$ and $A(H)=(H+1)^2$, as it shall be.
Then change the parameters according to your notation.