Optimal Allocation of Public Goods: A Solution to the 'Free Rider Problem'