Chapter 2: Problem 29
Because an integer in \(\left[0,2^{n}-1\right]\) can be expressed as an \(n\)-bit binary number in a DHT, each key can be expressed as \(k=\left(k_{0}, k_{1}, \ldots, k_{\mathrm{n}-1}\right)\), and each peer identifier can be expressed \(p=\left(p_{0}, p_{1}, \ldots, p_{\mathrm{n}-1}\right)\). Let's now define the XOR distance between a key \(k\) and peer \(p\) as $$ \mathrm{d}(k, p)=\sum_{j=0}^{n-1}\left|k_{j}-p_{j}\right| 2^{j} $$ Describe how this metric can be used to assign (key, value) pairs to peers. (To learn about how to build an efficient DHT using this natural metric, see [Maymounkov 2002] in which the Kademlia DHT is described.)
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.