Quantitative theory of adsorptive separation for the electronic sorting of single-walled carbon nanotubes