Competitive markets and resource allocation