Combinatorics Split 5 Funds

Ways to Split Money into Funds is a medium quant interview question on Combinatorics.

Difficulty Medium Topic Combinatorics

This question considers an investor splitting a fixed total amount of capital across several distinct funds, with allocations restricted to discrete units. The scenario is a clean abstraction of how many different portfolio weightings are possible when you work in fixed-size blocks rather than continuous percentages. It is a classic discrete allocation setup that appears in quant interviews when probing comfort with basic combinatorics in a financial context, such as structuring simple toy portfolios or reasoning about state spaces for simulations.

To handle it, a candidate must recognize that the dollars are indistinguishable units and the funds are labeled buckets, so the task is to count solutions to a constrained sum of non-negative integers. The core technique is the stars and bars method and the ability to map the financial wording into that canonical combinatorial form. Interviewers look for a systematic translation from narrative to equation, correct use of the general formula, and clarity about what assumptions (like allowing zero allocation to a fund) are built into the counting model.

What it tests

Whenever you are asked to count the number of ways to distribute indistinguishable objects (like dollars, balls, or units) into distinguishable bins (such as funds, boxes, or categories), the underlying structure is a partitioning problem. The key is that the objects are identical and the bins are labeled, so the arrangement within bins doesn't matter, but which bin gets which count does. The stars and bars principle captures this: arranging all the objects in a line, then inserting dividers to split them into groups, models every possible allocation. The formula $\binom{n+k-1}{k-1}$ arises because you are choosing where to place the $k-1$ dividers among $n+k-1$ total slots (objects plus dividers), and this always counts the number of non-negative integer solutions to $x_1 + x_2 + \dots + x_k = n$. This pattern holds because each unique placement of dividers corresponds to a unique allocation, and every allocation can be represented this way, ensuring a one-to-one correspondence.

Practise this question with written feedback, or hear it in a spoken mock interview.

Get started free