# Sampling 1-dim random walk $\{x_k\}_{k=0}^T$ which satisfies $x_0=x_T=0$

Let us consider a moving point $$x_k\in \mathbb{R}$$, motion of which follows a gaussian random walk: $$$$x_{k+1} = x_{k} + w_k,\;\;w_{k}\sim\mathcal{N}(0, \sigma).$$$$ What I want to do is alogirithmically sample sequences $$\{x_k\}_{k=0}^T$$ which satisfies $$x_0=x_T=0$$. Does anyone know how to do this?

Note: A naive way occured to my mind was sampling many randomwalk realizations starting from $$x_0=0$$ and pick up ones that satisfy the $$|x_T|<\varepsilon$$, where $$\varepsilon$$ is a small value and is a tuning parameter. But this is not what I am talking about.