CHAPTER 3 – THE PARTITION FUNCTION