# Computing the partition function

Are there in any relatively efficient known algorithms to compute the partition function $$P(n)$$ for a given $$n$$? What's known about the complexity class of this problem as a function of $$n$$?

Perhaps I'm missing something trivial here, but other than listing some recurrent definitions of this function and some of their asymptotics, I don't see this precise information (complexity class, and known algorithms with their runtime/space complexity) in either of these articles:

• Ah +1 thanks @YuvalFilmus - I had originally checked the first link, and then read quickly through the second one but didn't get any search hits for the keywords 'algorithm', 'complexity', 'runtime' or 'class' in either of them. Reading the 2nd one all the way to the end would've helped :). So it's in $P$ (assuming e.g. input size = $n$) then? Apr 13, 2020 at 16:23