Abstract
A major theme of economic theory is that optimality, at the level of the firm or the economy as a whole, can be reached by profit maximization using competitive prices. The conclusion requires the assumption that the production possibility set be convex and is not valid if production displays economies of scale based on significant indivisibilities. The paper provides a specific quantity test for detecting optimality in the presence of indivisibilities and suggests that it may be useful to view the large firm as an algorithm for solving programming problems in which some of the variables assume integral values.