0
$\begingroup$

I would like to know if you know by which number should I multiply a list of natural numbers so that it never overlaps with a list of another set of natural numbers at some point in the future. The issue is that we have two different datasets with IDs that are natural numbers and we cannot modify any of the IDs unless we multiply them by a specific number, and we don't want that at some point in time the ID of one dataset finds another similar ID in the other dataset in the future. My limited math knowledge tells me that when taken to the infinite, there will be a clash of IDs at some point just because naturally there's no way to avoid the IDs in one dataset to happen at some point in the other dataset. But maybe I'm wrong, could you please help me?

Thank you!

$\endgroup$
  • $\begingroup$ It is impossible to do this unless you have some idea as to how the elements of the infinite lists are generated $\endgroup$ – Jorge Fernández Hidalgo Mar 28 at 21:35
0
$\begingroup$

You can have two sets of numbers such that they never clash: For example, let both sets of numbers be $N_1 = N_2 = \{1, 3, 5, \dots \}$. Now, if you multiply $N_2$ by $2$, then the new set will be $\{2, 6, 10, \dots \}$ which cannot clash with the set $N_1$ (since $N_1$ only contains odd numbers, while $N_2$ contains even numbers.

Of course, this depends on the set of numbers $N_1$ and $N_2$ in question.

$\endgroup$
  • $\begingroup$ If you use prime numbers, this works over any multiplier $\endgroup$ – Don Thousand Mar 28 at 16:11
  • $\begingroup$ Thank you! although I think I didn't explain myself well. We need to dynamically merge two datasets, whose ID has the characteristics that I mentioned. Both sets of IDs start in 1, until infinity, and both of them grow by 1 to the next ID within their corresponding dataset. So, let's say that we multiply the first set of IDs by 2, maybe for some time we won't find, for example, the ID "2024" in the second dataset but we will find that ID at some point in the future in that second dataset, so we won't be able to uniquely identify the individual 2024 because another individual in dataset 2 exist $\endgroup$ – Ariadna Mar 28 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.