Definition:Partition Function