2
$\begingroup$

let's say I have some (n) random numbers 12, 13, and 18. I want to calculate some unique value from these three such that if I change their order 13, 12, 18 or 18, 12, 13..whatever order they are in, the algorithm allows me to reproduce the same unique value from them.

Also no other set of numbers should produce that unique value with the same function. how can this be done?

plz fix tags: I am not sure which ones will be appropriate for this question

clarification: the unique value has to be a number

  • 0
    You could let your "value" be the numbers in ascending order separated by commas. Or do you want the value to be strictly numerical?2012-01-31
  • 0
    strictly numercial would be best2012-01-31
  • 0
    Are you allowed to sort the list of numbers?2012-01-31
  • 2
    I will assume that your numbers are non-negative *integers*. The suggestion of Austin Mohr is very good, even if you want your value to be an integer. Put the numbers in non-descending order, and concatenate the ascii values of the digits, separated by the ascii value of the comma.2012-01-31

3 Answers 3