Algorithms for general mathematical programming problems