The collapse of economies