In this paper, we study shelf space allocation optimization which is important to retail operations management. Our approach is to formulate a model that is applicable to operational realities and to seek solutions with realistic test data. This model is linked to the multi-dimensional knapsack problem. We first solve a simplified version of the problem to achieve maximum profit by transforming it into a network flow problem. Then, with simple adaptations we solve the general shelf space allocation problem with the help of the network flow model. The approach is simple and direct while experimental results improve on recent findings significantly and are very close to the optimal.