Suppose I take a random walk on a 2 dimensional square lattice, but this lattice plane has a finite size, e.g. Dx*Dy. I can not cross the boundary, my step length is the lattice cell size, I either go straight or make turns with right angle. Is there any work on this type of random walk? If the total walking distance is fixed, e.g. 2N, in this confined region, how may ways are there that at the 2Nth step I am at the starting position? Or equivalently, how many configurations of loops of length 2N are there in this confined square lattice? How about if this loop is a self avoiding loop? Anybody knows related work on this? Since my major is physics, I am not sure if some mathematicians have done this. Thanks in advance.