To begin with, let us generalize the path integral formulation to many chains. The generalization for the partition function calculation is very simple and all that has to be done is to take into account the interaction between all the chain segments: