He would like to find the lexicographically smallest permutation. frac{a_{p_{i - 1}} + b_{p_{i - 1}}}{a_{p_{i - 1}} + b_{p_{i - 1}} + c_{p_{i - 1}}} leq frac{a_{p_i} + b_{p_i}}{a_{p_i} + b_{p_i} + c_{p_i}}.
Bobo has n tuples (a_1, b_1, c_1), (a_2, b_2, c_2), dots, (a_n, b_n, c_n) (a 1 ,b 1 ,c 1 ),(a 2 ,b 2 ,c 2 ),…,(a n ,b n ,c n ). He would like to find the lexicographically smallest permutation p_1, p_2, dots, p_n p 1 ,p 2 ,…,p n of 1, 2, dots, n 1,2,…,n such that for i in {2, 3, dots, n} i∈{2,3,…,n} it holds that frac{a_{p_{i - 1}} + b_{p_{i - 1}}}{a_{p_{i - 1}} + b_{p_{i - 1}} + c_{p_{i - 1}}} leq frac{a_{p_i} + b_{p_i}}{a_{p_i} + b_{p_i} + c_{p_i}}. a p i−1 +b p i−1 +c p i−1 a p i−1 +b p i−1 ≤ a p i +b p i +c p i a p i +b p i .