A Programming Approach to Minimizing and Maximizing Spatial Autocorrelation Statistics