Hi, I have a simple question in calculus:

Given a set of different integers A, each integer in range from 1 to 5000. It may be assumed that the set size won't be more than 50 (ie: |A|<=50).

I need a one-to-one function f that takes set A and returns an integer. (f: {..} --> R)

So for any A!=B => f(A)!=f(B) (!= stand for not equal). Of course, since A is a set, the order of integers doesn't matter, so A={1,2,3} identical to B={3,1,2}.

I'm sure there are a lot of simple functions that do the job, and functions with only primitive operators such as +,-,*,/ will be preffered.

Thanks in advance.

Given a set of different integers A, each integer in range from 1 to 5000. It may be assumed that the set size won't be more than 50 (ie: |A|<=50).

I need a one-to-one function f that takes set A and returns an integer. (f: {..} --> R)

So for any A!=B => f(A)!=f(B) (!= stand for not equal). Of course, since A is a set, the order of integers doesn't matter, so A={1,2,3} identical to B={3,1,2}.

I'm sure there are a lot of simple functions that do the job, and functions with only primitive operators such as +,-,*,/ will be preffered.

Thanks in advance.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.