Hello, everyone.

I'm having some doubts with the following problem:

Let X denote the execution time of a job rounded to the nearest second. The charges are based on a linear function Y = mX + n of the execution time for suitably chosen nonnegative integers m and n. Given the PGF (probability generating function) of X, find the PGF and pmf of Y.

I will write (shorty) what I have tried. If someone could confirm my solution or give me some hint I would appreciate that.

I started with

$\displaystyle G_Y(z) = \sum_{i=0}^{\infty} P(Y=i)z^i = \sum_{i=0}^{\infty} P(mX + n=i)z^i$

Hence we have that $\displaystyle X = \frac{i-n}{m} $. By the euclidian algorithm exist k and r<m such that $\displaystyle i-n = km + r $ and since the time is rounded to the nearest second I considered $\displaystyle \frac{i-n}{m} = k $ for $\displaystyle km - \left \lfloor \frac m2 \right \rfloor \leq i - n \leq km + \left\lfloor \frac m2 \right\rfloor - 1 $

With this I got $\displaystyle G_Y(z) = \sum_{k=0}^{\infty} \left [P(X=k) \sum_{i=km - \left \lfloor \frac m2 \right \rfloor + n}^{km + \left\lfloor \frac m2 \right\rfloor +n - 1} z^i \right ]$

And then using the sum of the geometric progression and rearranging the terms I got $\displaystyle G_Y(z) = z^n \frac{z^{\left\lfloor \frac m2 \right\rfloor} - z^{-\left\lfloor \frac m2 \right\rfloor}}{z-1}G_X(z^m) $

p.s. sorry for my English.