0
$\begingroup$

I have a three-element list which contains inverses of a function u, like so:

CEs = {(u^(-1))[0.448165 u[10]+0.551835 u[30]],(u^(-1))[0.296264 u[10]+0.703736 u[30]],30}

I would now like to obtain the ranking of the elements of this list under the assumption that u is strictly increasing but struggle even to understand the output of

Ordering@Ordering@CEs

, which gives

{2, 3, 1}

without Mathematica knowing anything about u. Could someone explain to me how this ranking comes about and how I might be able to teach Mathematica that u is strictly increasing and to order elements under this assumption? In the current case the ordering should be

{1, 2, 3}
$\endgroup$
1
  • $\begingroup$ That explains the ordering Mathematica returns. Anyway I can teach it to sort assuming that u is strictly increasing? $\endgroup$ – RoyalTS Jul 30 '13 at 10:50
2
$\begingroup$

If $ u $ is strictly increasing, then so is $ u^{-1}. $ You don't really care about their values so a representative of strictly increasing functions will preserve the ordering. $ y=x $ is such a function so I am replacing your u, u^(-1) with Identity and the ordering is the desired:

CEs = {(u^(-1))[0.448165 u[10] + 0.551835 u[30]], (u^(-1))[
   0.296264 u[10] + 0.703736 u[30]], 30};
CEs /. Thread[{u, u^(-1)} -> Identity] // Ordering
(*{1,2,3}*)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.