Project: Portfolio Selection · Score Generating Functions

Lesson 5

Nikolai Chukhin · Alexander S. Kulikov

Looking at the polynomial usually helps to find its value. For example, split the stocks into two groups. Since a portfolio is a choice in the first group made independently of a choice in the second, \[F(x,y)=F_{\text{left}}(x,y)\cdot F_{\text{right}}(x,y).\] Expanding each half on its own and then combining the two is far cheaper than expanding the whole product directly: two sums of about \(2^{n/2}\) terms instead of one sum of \(2^{n}\). This is exactly the meet-in-the-middle idea, and we will use it later to handle budgets that are far too large for any table.