Using a sparse array for the problem matrix. Added NMinimize as a method.