# computing generator of $S_n=\alpha+\sum_{k=1}^n X_k$

Let $$\alpha\in\mathbb N$$ and let $$X_n,n\in\mathbb N$$ be iid random variables with $$P(X_1=1)=P(X_1=-1)=1/2.$$ Let $$S_0=\alpha$$ and $$S_n=\alpha+\sum_{k=1}^n X_k$$ for $$n>0$$.

i) Show that $$S_n$$ is a Markov process.
ii) Compute the generator of $$S_n$$.
iii) Use the Martingale problem to show that $$\frac{1}{3}S_n^3-\sum_{l=0}^n S_l$$ is a Martingale.
iv) Let $$K\in\mathbb N$$. Define the following hitting times:
$$\tau_0=\inf\{n>0:S_n=0\},\qquad\tau_k=\inf\{n>0:S_n=k\}.$$ Set $$\tau=\tau_0\wedge\tau_k$$ and show that $$E[\sum_{l=0}^\tau S_l]=\frac{1}{3}(K^2-\alpha^2)\alpha+\alpha$$.

i) is rather obvious, although I am still having trouble how to formally write it down. Do I just write $$S_{n+1}=S_n+X_{n+1}$$? Then clearly $$P(S_{n+1}=x|S_i=x_i,i\leq n)=P(S_{n+1}=x|S_n=x_n)=P(S_n+X_{i+1}=x|S_n=x_n).$$ For ii) I am already confused. I always have trouble with this stochastic notation. The generator is defined as $$L\equiv P-1$$ in the script, where $$P$$ is the transition kernel. How do I write down the transition kernel explicitly?

For iii), the Martingale problem states that, given a bounded measurable function $$f$$, the process $$M_t=f(S_t)-f(S_0)=\sum_{i=0}^{t-1}Lf(S_s)$$ is a Martingale.

I do not see how that helps me (I suppose bounded in the sense of bounded in $$L^\infty$$).

For iv) I thought the following might work \begin{align} E\left[\sum_{l=0}^\tau S_l\right] &=\sum_{l=0}^\infty E[S_l 1_{\tau\geq l}|\tau]P[\tau\geq l], \end{align} and we have $$E[S_n]=\alpha+\sum_{k=1}^n E[X_k]=\alpha.$$ Now I'm unsure how to calculate $$P[\tau\geq l]$$ and put it together...