You are correct in the statement that sets have distinct elements.
But the O.P did not say he was dealing with sets - he said "arrays".
Update:
Um - Ignore this post, since you updated yours ...
"A fanatic is one who redoubles his effort when he has forgotten his aim."—George Santayana
| [reply] |
Update: Hum, I guess he didn't use the word "set", but "difference" is an operation that produces a set.
I personally believe that a notion of difference can be given for the mathematical objects representing both ordered lists, i.e. functions from some finite set (0...n-1) into some other set, and unordered ones, i.e. classes of equivalence of those functions wrt composition with a permutation on the domain. Except that at least two reasonable definitions of such a difference spring to mind, abstractly, and I think that with no further specification one just has to pick the one that seems most reasonable for the actual problem. In the example the OP gave, both would do, so there's an ambiguity.
| [reply] [d/l] |