Explain hamming distance satisfies the triangle inequity

  • Thread starter Thread starter Askhwhelp
  • Start date Start date
  • Tags Tags
    Explain Triangle
Click For Summary
SUMMARY

The Hamming distance satisfies the triangle inequality, which states that for all codewords x, y, and u in a code c, the relationship d(x,y) ≤ d(x,u) + d(u,y) holds. This is proven by considering the number of letter changes required to transform x to u and u to y. An example with binary codewords x = 001111, y = 111111, and z = 011111 illustrates that equality holds when z is an intermediate step. The proof involves summing the absolute differences of corresponding letters in the codewords.

PREREQUISITES
  • Understanding of Hamming distance and its definition
  • Familiarity with binary codewords and their representations
  • Basic knowledge of summation notation and absolute values
  • Concept of triangle inequality in metric spaces
NEXT STEPS
  • Study the mathematical properties of Hamming distance in various alphabets
  • Explore proofs of the triangle inequality in different metric spaces
  • Learn about applications of Hamming distance in error detection and correction
  • Investigate the implications of Hamming distance in coding theory
USEFUL FOR

Mathematicians, computer scientists, and engineers interested in coding theory, error detection, and algorithm design will benefit from this discussion.

Askhwhelp
Messages
84
Reaction score
0
Hamming distance satisfies the triangle inequity that is for all x, y, u in c such that d(x,y) <= d(x,u) + d(u,y) where c is a code. Also when does the equality hold?

My approach is
Turning x to u by changing at most d(x,u) letters and turning u to y by changing at most d(u,y) letters. So turning x to t will change no more than d(x,u) + d(u,y) letters.


By looking at the following example, x = 001111, y = 111111, z = 011111. The equality holds when changing x to y, z is just a intermediate step, the equality holds.

Does this make sense?

If not, how should I approach this?
 
Last edited:
Physics news on Phys.org
Askhwhelp said:
Hamming distance satisfies the triangle inequity that is for all x, y, u in c such that d(x,y) <= d(x,u) + d(u,y) where c is a code. Also when does the equality hold?

My approach is
Turning x to u by changing at most d(x,u) letters and turning u to y by changing at most d(u,y) letters. So turning x to t will change no more than d(x,u) + d(u,y) letters.

By looking at the following example, x = 001111, y = 111111, z = 011111. The equality holds when changing x to y, z is just a intermediate step, the equality holds.
You have the right idea, but you might state it more precisely. If we define ##x_n##, ##y_n##, and ##u_n## to be the ##n##'th letter of ##x##, ##y##, and ##u##, respectively, and ##N## is the code length, then we have
$$d(x,y) = \sum_{n=1}^{N} |x_n - y_n|$$
and similarly for ##d(y,u)## and ##d(x,u)##. Proving the triangle inequality is therefore equivalent to proving that
$$\sum_{n=1}^{N} |x_n -y_n| \leq \sum_{n=1}^{N} |x_n - u_n| + \sum_{n=1}^{N} |u_n - y_n|$$
 
jbunniii said:
You have the right idea, but you might state it more precisely. If we define ##x_n##, ##y_n##, and ##u_n## to be the ##n##'th letter of ##x##, ##y##, and ##u##, respectively, and ##N## is the code length, then we have
$$d(x,y) = \sum_{n=1}^{N} |x_n - y_n|$$
and similarly for ##d(y,u)## and ##d(x,u)##. Proving the triangle inequality is therefore equivalent to proving that
$$\sum_{n=1}^{N} |x_n -y_n| \leq \sum_{n=1}^{N} |x_n - u_n| + \sum_{n=1}^{N} |u_n - y_n|$$
I like the approach, though this only works if we are considering binary alphabets. The hamming distance can be used on alphabets such as {1,2,3} in which case $$d(x,y) = \sum_{n=1}^{N} |x_n - y_n|$$, does not hold
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K