Knowledge and lotteries