Urban planners aim to eliminate slums—with a mathematical approach