# How can we show that the Hamming distance

1. Nov 10, 2008

### lenti

Hi,

can anybody help me to show that the Hamming disatance d(x,y) is invarian to a shift of both x and y i.e d(x+z, y+z)=d(x,y)

Thanks a lot

Lenti

Last edited: Nov 10, 2008
2. Nov 10, 2008

### Staff: Mentor

Please include the formula for Hamming distance.

3. Nov 10, 2008

### lenti

The Hamming distance of two length-N words x, y, denoted as d(x,y), is defined as the number of components (symbols9 of x and y tha are different.

we can writte as;

d(x,y)=$$\sum$$I{x$$\neq$$y}

thanks a lot

4. Nov 10, 2008

### Staff: Mentor

Your summation doesn't make much sense to me. What does I in this summation mean?
$$\sum I \{x \neq y\}$$

Also, it would help to give an example. For example, is d("eat", "eats") = 1?

5. Nov 10, 2008

### lenti

as an example;

consider two binary words x=(1010110) and y=(1001010)

the hamming distance between the binary words is d(x,y)=3

because they change in 3 bits.

6. Nov 10, 2008