def factorial(n)
i = 1
while (n > 0)
i *= n
n -= 1
end
i
def combination(n, k)
factorial(n) / (factorial(k) * factorial(n-k))
def lattice_paths(size)
combination(2*size, size)