Domino Tiling: From Dynamic Programming to Finite Fields