Mathematics of bookmaking