Vizvári, Bela2016-02-082016-02-0819920233-1934http://hdl.handle.net/11693/26139In this paper we submit a unified discussion of some closely related results which were achieved independently in number theory and integer programming, and we partially generalize them. In the unified discussion we treat together two problems where the greedy method has different characters, in the first one it is an internal-point algorithm, in the second one it is an outer-point method. We call a knapsack problem “pleasant” if the greedy solution is optimal for every right-hand side. A sufficient and two finite necessary and sufficient conditions for the pleasantness of a problem are discussed. The sufficient condition can be checked very easily. The paper is finished with an error analysis of some nonpleasant problems. AMS 1980 Subject Classification: Primary: 90C 10.EnglishCombinatorial optimizationGreedy methodKnapsack problemsOn the optimality of the greedy solutions of the general knapsack problemsArticle10.1080/023319392088437521029-4945