Generalized many-channel conductance formula with application to small rings.