The mathematics of space exploration