For the first time in 30 years, computer scientists have found a better way to allocate objects evenly between two groups.

One does not need a doctorate in mathematics to split 12 eager trivia buffs into two competitive teams. But consider that each person arrives with unique strengths and liabilities: One may be a geography obsessive with no ear for music, another could be a naturalist who doesn’t own a television, and another could be a cinephile who never reads. Balancing traits between two camps becomes a lot harder.

So, how evenly can you assemble the teams so that they have matching firepower in every category, from Greek mythology to college basketball?

You can always make the teams surprisingly even, according to researchers studying combinatorial discrepancy theory.

Discrepancy theory is a branch of mathematics concerned with allocating resources as evenly as possible. If one trivia team gets all the history knowledge, leaving none for the other, that’s a big discrepancy.