Let the balls be R1, R2, G1, G2, B1, and B2.
First, test R1, G1 against R2, B1. There are two cases:www.ddhw.com
1. Balanced, each group consists of 1 heavy and 1 light ball. Then test G1 against G2. WLOG, if G1 > G2, then R1 < R2, B1 < B2.www.ddhw.com
2. WLOG, assume R1 + G1 > R2 + B1, therefore R1 > R2 and G1 >= B1. Then test B1, G1 against B2, R2. Three sub-cases:www.ddhw.com
a. B1 + G1 = B2 + R2. Then B1 < B2, G1 > G2.www.ddhw.com
b. B1 + G1 < B2 + R2. Then B1 < B2, G1 < G2.
c. B1 + G1 > B2 + R2. Then B1 > B2, G1 > G2.