A
A
Anatoly602015-03-17 00:34:09
Mathematics
Anatoly60, 2015-03-17 00:34:09

How to mathematically determine the unique number for any two in64?

Is it possible to get a number using bit operations that is guaranteed to be unique for any two arbitrary numbers (int64)? In this case, this number must also be int64.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
bobrovskyserg, 2015-03-17
@bobrovskyserg

Well, how can I tell you, Dunno ...
Why the hell are we spending money on 2 arbitrary int64 numbers, when they could be crammed into one int64.
So think...
1 bit contains 1 bit of information.
2*64bit contains 2*64 bits of information.
Oh, Shannon, to whom have you left us!

M
Mercury13, 2015-03-17
@Mercury13

You can't, simple combinatorics.
One number - 264 options, two numbers - 2128 options.
The Dirichlet principle says that in one of the cells there will not even be two rabbits, but at least ceil(2 128 / 2 64 ) = 2 64 rabbits - that is, for some answer there will be at least 2 64 pairs of arguments that give it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question