Integer programming is an important optimization model of widespread use. However, integer programming problems are NP hard and often very time consuming. In this paper, by transforming them into 0-1 programming, the algorithm is more effective and can be realized in Matlab.