Proportional selection and sampling algorithms