One way or the other two sets of identical types can come out ahead of the other by idea of Pareto equality. Pareto equality between two sets, or a group of sets, requires that atleast one element of each set is ranked higher than its corresponding element of the other set. Please see: http://en.wikipedia.org/wiki/Pareto_optimal for more information.
Build a function to take two cell-args, and return a boolean value true/false, to indicate their pareto equality.
Ex. >> ispareto( {1,'foo',40}, {0,'bar',30}) = true
>> ispareto( {2,-10,'z'},{0,-9,'t'}) = false
Cell-array can have only numbers and strings. Use natural comparison functions for numbers (a>b), while strings have 'a' > 'z' kind of comparison.
Next, generalize this function to work with varargs, and see if the entire set is pareto optimal.
Two or more arguments will always be supplied.
I don't really understand the mechanics of this. could you link to an article or something where I could read more about it?
I may have poorly written the problem statement; the general idea is to find optimal candidates for the problem
arg max F(x,y,z)
where many {x,y,z} pairs maximize F.
Please see http://en.wikipedia.org/wiki/Pareto_optimal. HTH.
Extract leading non-zero digit
967 Solvers
650 Solvers
340 Solvers
Find the "ordinary" or Euclidean distance between A and Z
119 Solvers
500 Solvers