This lecture covers the concept of partition functions in spin systems and Markov Random Fields (MRFs), focusing on the Ising model and Potts model. It explains how to compute partition functions using examples and discusses the importance of partition functions in various contexts. The lecture also delves into the challenges of computing partition functions, such as computational complexity and phase transitions. Different algorithmic paradigms like Markov chain Monte Carlo, correlation decay, and complex analysis are explored to overcome these challenges. The presentation concludes with the Lee-Yang Theorem, which discusses the behavior of complex zeros of partition functions and its implications for computational phase transitions.