A federal court's decision to strike down North Carolina's map of congressional districts has cast uncertainty over this year’s elections.

Federal judges ruled Tuesday that the boundaries drawn by Republican legislators constitute an illegal partisan gerrymander. The judges gave lawmakers about two weeks to come up with a new map.

The federal judges relied heavily on the findings of Duke University mathematics and statistics professor, Dr. Jonathan Mattingly. He used computer programming and an algorithm to create thousands of simulated congressional districting plans for North Carolina.

"What we wanted to do is give some range that reasonable maps would produce, and if they were outside the pale, if they were a statistical outlier, if they were outside what typically happened, well then maybe we should have to defend them, we should stop and say, why did that happen?" Mattingly told WFAE's Mark Rumsey in this interview.

Mattingly says his analysis found that between four and six Democrats would have been elected to North Carolina congressional seats in 2016 if district maps that were not partisan gerrymanders had been used.