Theory of the Firm: Resource Allocation in a Market Economy