Show the following properties of Hamming weight

In summary: This looks like it is true, since for each bit in x that is 1, the corresponding bit in x + y must also be 1 (and possibly other bits in y are also contributing to the 1 in x + y).c) If w(y) is even, then w(x*y) is even as well (since it is equal to the number of 1s in the same positions in x and y). So, if we subtract 2w(x*y) from w(x) + w(y), we are left with an even number of 1s in the result, regardless of whether w(x) is even or odd. So, w(x+y) is even iff w(x) is
  • #1
lenti
5
0
hi,

I have to show the following properties of the Hamming weight for binary words x and y of equal lenght:

a)w(x+y)=w(x)+w(y)-2w(x*y)

b)w(x+y)>=w(x)-w(y)

c) For w(y) even, w(x+y) is even iff w(x) is even

d) For w(y) odd, w(x+y) is odd iff w(x) is even

can anybody help me,

thanks

lenti
 
Last edited:
Physics news on Phys.org
  • #2
You probably won't get much help if you don't at least provide us the formula for Hamming weight.
 
  • #3
Well the Hamming weight of a length-N word x denoted w(x) is defined as the number of components (symbols) of x that are nonzero.

Well there is no special formula about the hamming weight it can be formulated as w(x)= [tex]\sum[/tex]I{x[tex]\neq[/tex]0}

where I{x[tex]\neq[/tex]0}, the indicator of event {x[tex]\neq[/tex]0}, is 1 if x[tex]\neq[/tex]0 and 0 if x=0

thanks
 
Last edited:
  • #4
a) I'm not sure what x*y means, but I suspect it is the dot product of the two words treated as vectors. If so, w(x*y) gives a measure of how many bits in x are 1 at the same place they are in y. If each bit in x is different from the corresponding bit in y, w(x*y) = 0. Is this correct?

For example, if
x = 1011
y = 0111

then x*y = 0011.

Also, x + y seems to be a new word of the same length as x (and as y), where a given bit is 1 in x + y if the corresponding bit in x or in y (or in both) is set.

For example, if
x = 1011
y = 0111
then x + y = 1111.

If I'm on the right track here, it seems that the formula should be w(x + y) = w(x) + w(y) - w(x*y), without the factor of 2 that you showed. Of course, I might not be on the right track, since I'm not sure what w(x*y) means.
 

1. What is "Hamming weight"?

Hamming weight, also known as the "population count", is a mathematical term used to describe the number of non-zero bits in a binary string. In simpler terms, it is the total number of 1s in a binary sequence.

2. How is Hamming weight calculated?

The Hamming weight of a binary string can be calculated by counting the number of 1s in the string. This can be done manually or using computer algorithms.

3. What are the applications of Hamming weight?

Hamming weight is commonly used in coding theory and error correction algorithms. It is also used in various other fields such as cryptography, data compression, and machine learning.

4. Can Hamming weight be used to detect errors in data?

Yes, Hamming weight can be used to detect errors in data. By comparing the calculated Hamming weight of a received binary string with the expected Hamming weight, errors in the data can be detected.

5. Are there any limitations to using Hamming weight?

One limitation of using Hamming weight is that it can only detect errors, but not correct them. Additionally, it may not be suitable for all types of data as it is designed for binary strings.

Similar threads

  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
Replies
11
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
513
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
460
  • Calculus and Beyond Homework Help
Replies
20
Views
452
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
Back
Top