The mathematics of SELEX against complex targets