Mathematicians and scientists are coming up with quantitative measures and mathematical models to measure gerrymandering.