Unique representation of N integers randomly chosen out of a set of M (N<M) numbers

Is it possible to uniquely represent N integers randomly selected out of a larger set of M integers? For example, if M = {1,2,3,...,200} and N = 12, is it possible to map any 12 numbers randomly selected out of M into the set K = {1,2,3...,12}?

In other words, if I have 200 devices with IDs in the range of 1 to 200, and I randomly grab 12 devices out of the lot, is there an algorithm which will allow each device to INDEPENDENTLY change its ID to a UNIQUE number from the set {1,2,3,...,12}?

Note: INDEPENDENTLY means the devices don’t need to communicate with other devices or with some central processing unit in order to solve the problem, and UNIQUE means there are no clashes between the new IDs.

Intuitively it seems that there's no way to uniquely reduce 200 numbers into 12. However, on the other hand, knowing that there's a unique prime factorization for every integer, makes you wonder if there is a way to map the unique vector of primes (for each integer) into a unique number in the reduced set.

Thanks

Creating function to map set {1,2,...N} to randomly chosen set of N integers.

It's not necessary to specify an algebraic or analytic formula to define the function which maps the integers {1,2,3...N} onto the N integers chosen at random,

from a larger set of integers.

For example, recently I wrote an formula in Microsoft Excel that mapped one set of names into another set of names. I used the vlookup function in Excel to do this.

For example suppose you choose randomly, the numbers [123,2,49,6,11,22,199]

and want a function that uniquely assigns them to [1,2,3,4,5,6,7].

Then you simply name and define your function to do exactly that.

RF[1] = 123

RF[2] = 2

RF[3] = 49

RF[4] = 6

RF[5] = 11

RF[6] = 22

RF[7] = 199

Kermit Rose