I have a small problem. To give some context: i'm creating a gearbox using three reductions, each physically attached to the next. The ramification is that only one gear (and thus one 'ratio') from each reduction can be engaged at a time to yield an overall ratio from input to output. Each reduction set contains 3 gears, and there are 3 sets in total (yielding 27 possible combinations due to the physical structure described). I have 9 desired ratios. My problem lies in finding the ratio for each individual gear on each reduction rack as to yield each of the nine desired final ratios for some combination of a ratio on rack a, rack b, and rack c. I need a method of finding these values (finding three factors) that not only yield the 9 ratios for some combination, but, as i'm designing a gearbox, do this while 'switching' the gears the least. That is to say, switching members of the fewest sets (gears of the fewest racks). Icing on the cake would be to find these values while yielding the 18 other combinations relatively unique and not overlapping as to maximize expandability if I wanted to achieve different ratios (this is all individually actuated, so i can move from any gear to any other gear instantly). Thanks physics forums, Alex p.s. i'm just asking for a generic means of solving this problem; i've already arbitrated the values of each reduction using my minimum and maximum gear ratios and stepping the final ratio up at 1/9th the ratio range per gear.