-1
$\begingroup$

I want to know if there is a function for example that gives the same result for a set of noncontiguous reals. I want to have these results

$f(10)=25, f(25)=25, f(34)=25, f(85)=25, f(14)=25, f(13)=25$ for example.

In fact I have:

  • A number between $1$ and $536870912$

  • Several sets of noncontiguous numbers

  • A black box which must do a transformation to the sets

  • Each transformation must be unique and gives a number between $1$ and $255$ I want to know which thing (function or anything else) that I can have in the black box that does this transformation?

$\{4, 212, 10, 35000 \} \Rightarrow f(x) \Rightarrow 250$
$\{584, 12, 140, 5\} \Rightarrow f(x) \Rightarrow 15.$

I mean passing a given set by $f(x)$ gives always the same result for the passed set or I can imagine that for each element of a set I can have $f(4)=250, f(212)=250, f(10)=250, f(35000)=250.$

Thank you

  • 0
    For your example, that would be the constant function $f(x)=25$... If you want to get different results, see my answer.2012-04-30
  • 3
    This is extremely unclear - while Dennis' function satisfies the first requirements you have give, I can't figure out what would satisfy the rest of them. For example, how is this number between $1$ and $536870912$ supposed to fit into it? What do you mean by doing a "transformation to the sets", and so on.2012-04-30

2 Answers 2