Similar Items: Theory of Linear and Integer Pragramming