{f←,(0,⍳⍵)∘.,⍳⍵ ⋄ d←÷/¨f ⋄ k←(⍸d≤1)∩{⊃⍵}⌸d ⋄ f[k][⍋d[k]]}3
0 1 1 3 1 2 2 3 1 1
f←,(0,⍳⍵)∘.,⍳⍵ ⍝ all combinations concatenated together as a simple vector (store this as f[raction])
0 1 0 2 0 3 1 1 1 2 1 3 2 1 2 2 2 3 3 1 3 2 3 3
d←÷/¨f ⍝ determine the actual value of the fraction for sorting (store this as d[ecimal])
0 0 0 1 0.5 0.3333333333 2 1 0.6666666667 3 1.5 1
k←(⍸d≤1)∩{⊃⍵}⌸d ⍝ find the first occurrence of each decimal value (simplest fraction) and see where these indices intersect the set of those decimals less than or equal to 1 (terminating value for the Fare…