Allocative efficiency is a state of the economy in which production represents consumer preferences; in particular, every good or service is produced up to the point where the last unit provides a marginal benefit to consumers equal to the marginal cost of producing. In contract theory, allocative efficiency is achieved in a contract in which the skill demanded by the offering party and the skill of the agreeing party are the same. Although there are different standards of evaluation for the concept of allocative efficiency, the basic principle asserts that in any economic system, choices in resource allocation produce both "winners" and "losers" relative to the choice being evaluated. The principles of rational choice, individual maximization, utilitarianism and market theory further suppose that the outcomes for winners and losers can be identified, compared and measured. Under these basic premises, the goal of attaining allocative efficiency can be defined according to some principle where some allocations are subjectively better than others. For example, an economist might say that a change in policy is an allocative improvement as long as those who benefit from the change gain more than the losers lose. An allocatively efficient economy produces an "optimal mix" of commodities. A firm is allocatively efficient when its price is equal to its marginal costs in a perfect market. The demand curve coincides with the marginal utility curve, which measures the benefit of the additional unit, while the supply curve coincides with the marginal cost curve, which measures the cost of the additional unit. In a perfect market, there are no externalities, implying that the demand curve is also equal to the social benefit of the additional unit, while the supply curve measures the social cost of the additional unit. Therefore, the market equilibrium, where demand meets supply, is also where the marginal social benefit equals the marginal social costs. At this point, net social benefit is maximized, meaning this is the allocatively efficient outcome. When a market fails to allocate resources efficiently, there is said to be market failure. Market failure may occur because of imperfect knowledge, differentiated goods, concentratedmarket power, or externalities. In the single-price model, at the point of allocative efficiency price is equal to marginal cost. At this point the social surplus is maximized with no deadweight loss. Allocative efficiency is the main tool of welfare analysis to measure the impact of markets and public policy upon society and subgroups being made better or worse off. It is possible to have Pareto efficiency without allocative efficiency: in such a situation, it is impossible to reallocate resources in such a way that someone gains and no one loses, yet it would be possible to reallocate in such a way that gainers gain more than losers lose. Also, for an extensive discussion of various types of allocative efficiency in production context and their estimations see Sickles and Zelenyuk.