Tag Info

Hot answers tagged xor

13 votes
Accepted

• 4,697
6 votes
Accepted

Minimum XOR for queries

Using Trie Data Structure, you can solve this problem in $O(m + n)$ if we know that values are computer integers (e.g. all 32-bit or 64-bit values). Let say we know that all integers in $A$ are 32-...
• 474
6 votes
Accepted

Subset of numbers whose XOR has least Hamming weight

Your problem is known as calculating the minimal distance of a (binary) linear code, and is NP-hard, as shown by Vardi. It is even NP-hard to approximate within any constant factor, as shown by Dumer, ...
• 269k
5 votes
Accepted

Can I use "XORing" in my thesis?

Some useful guidelines for writing are: Who is my audience? Will my audience understand what I am writing? Will my usage of language be distracting or otherwise take attention away from the message I'...
• 140k
5 votes

• 369
1 vote

Find number X by asking Hamming distance between X and Y in binary representation

One reasonable heuristic would be to use a greedy algorithm, which at each step picks a query that is likely to reduce the space of possibilities as much as possible. Suppose you care about the ...
• 140k
1 vote

XOR two numbers

XOR does have meaning on how decimal numbers are stored especially if you are considering using signed decimal notation. I think of XOR because it is useful in calculations requiring the 2's ...

Only top scored, non community-wiki answers of a minimum length are eligible