When physicist Andrés Gomberoff's second marriage ended, his life suddenly became much more complex. Arranging a day in which he and his girlfriend could spend time with all four of their children became nearly impossible. So, Gomberoff decided to use his knowledge of condensed-matter physics to find a solution. And, as Scientific American reports, what started out as a personal mathematical exercise eventually turned into a full-fledged physics modeling experiment, published last month in the European Physical Journal B.

A solution for a group of parents who each have exes with exes of their own

To discover a model that would allow Gomberoff and his girlfriend, each of whom have two kids, to see all their children on the same weekend every other week, the scientist enlisted the help of a few fellow researchers. Together, the group set out to discover an optimal child-sharing solution for a (complicated) group of parents who each have exes, and each of whom have exes of their own.

The results were underwhelming. The researchers were forced to conclude that the perfect child-custody theoretical model was unattainable. Despite simplifying the variables considerably (the model, for instance, did not include complications such as partners who shirk their responsibilities or parents who have to work on weekends), they were unable to find a solution that gave each parent what they wanted.

The model they developed was already in existence

Nevertheless, the scientists were able to come up with an algorithm that allows each parent to spend time with all of their own children within a single weekend. And, as it turns out, the model they developed was already in existence. "It was completely crazy that the system was equivalent to a magnetic spin-glass system," Gomberoff told Scientific American. "Spin-glass" is a material formed from a number of small magnets, each with their own spin. The model that the researchers employed was first designed to find the lowest-energy state of the spin-glass system.

Vittorio Loreto, a physicist at Sapienza University of Rome who did not participate in the study, told Scientific American that the project is mathematically clean and elegant. But what he found truly remarkable was that "it takes a social problem, that of the happiness of divorced people, and beautifully formalizes it in a way amenable for a scientific treatment." Of course, the question remains as to whether this sort of mathematical model can truly account for the sorts of social problems that humans encounter on a regular basis. After all, even Gomberoff admits to preferring the idea of sitting down with his exes and marking off a calendar to putting his children into an equation.