A group of young Irish mathematicians and physicists has developed a mathematical algorithm to optimise the redrawing of Dáil constituencies.
In a research paper, they draw on the celebrated quaternion formula created by 19th century Irish mathematician William Rowan Hamilton in their use of advanced geometry and spatial mathematics to analyse electoral boundaries.
Hamilton was a lecturer who in 1843 devised a formula that described rotation in terms of three-dimensional space. He solved the puzzle while walking along the Royal Canal in Dublin and famously carved the formula into the stone of Broom Bridge with a knife.
An algorithm developed by the six mathematicians (students or past students of Trinity College Dublin) generates multiple maps that can help make choices relating to population equality, preserving county boundaries, or continuity of area.
READ MORE
With backgrounds in theoretical physics, mathematics and computational modelling, they have spent the last three years studying Irish electoral redistricting.
In 2023, they took part in a hackathon on Irish political redistricting, where Electoral Commission chief executive Art O’Leary was a judge. The team then made a presentation later that year at the Political Studies Association of Ireland conference in Belfast.
The project has since evolved into a research project and a formal computational framework for analysing Irish constituency boundaries.
The researchers defined the key factors that determine a good constituency in Ireland: respecting county borders; getting the best population-to-seat ratio; continuity; and ensuring the constituency is compact and not strung out geographically.
For any imbalance, such as too much population variance, or a serious breach of a county boundary, penalties were imposed.

In physics a Hamiltonian is a function that tells the energy of a system. It tends to be optimised at low-energy states. The researchers applied that idea to maps, where poor maps have “high energy” and good maps have “low energy”.
Breaking the State into the smallest units for political maps (local electoral areas), the researchers devised an algorithm that has generated many thousands of alternative maps and works through them (sometimes deliberately allowing bad solutions at the start), making small changes as it goes along, and then identifying the ones with the lowest energy (ie with the best balance).
For example, running the model for Co Cork sees Cork South-West and Cork North-West jump from three-seaters to five seaters, Cork South-Central reduced to a four-seater and Cork North-Central and Cork East reduced to three seats.
Under this model, the five constituencies in the county have variations of population of less than 0.5 per cent as opposed to between 2.2 per cent and 5.6 per cent in the 2023 constituency redraw.
The trade-off is that the maps do not distinguish between city and county areas.
“There may not be one perfect map,” says one of the team, Matthew Fenlon. “A map that preserves county boundaries very well be worse on population balance. A map that is excellent on population balance may cut across counties more often. Instead of hiding those choices, we show them.”
Revising constituency boundaries in the past has taken many months, with some reports criticised for big breaches of county lines, or because of population imbalances.
The Electoral Commission’s 2023 report greatly improved the balance but there were some constituencies where there were county boundary breaches, or bigger population-to-seat variances.
The researchers say the algorithm will greatly improve the speed at which suggested constituencies’ configurations are generated. These solutions will give the best results for key considerations such as minimal county breaches, compact geographical shape, and low variances from the average population-to-politician figure.
It will allow them to ask why one map should be chosen over another, which values should be prioritised and will remove the past over-reliance on intuition and precedence.
The other researchers are Ruaidhrí Campion, Joshua Cooney Mercadal, Casey Farren-Colloty, Eliza Somerville and Michael A.J. Mitchell.
“Redistricting is not just about drawing lines on a map. It is about choosing between democratic objectives. A Hamiltonian gives us a way to encode those objectives, search the space of possibilities, and make the choices visible,” said Fenlon.














