Questions tagged [hamming-code]
48 questions
6
votes
1 answer
How to pick Hamming distance
Wikipedia's article Cyclic redundancy check states that for the same n (bits) there are multiple CRCs possible with different polynomial. Then it lists this Best CRC Polynomials article that gives some variations with different polynomials. I am…
Greg
- 259
- 1
- 5
5
votes
3 answers
Rearranging strings so that the Hamming distance between them is 1
This is a question from CodeFights.com:
Given an array of equal-length strings, check if it is possible to rearrange the strings in such a way that after the rearrangement the strings at consecutive positions would differ by exactly one…
Ron Inbar
- 163
- 6
5
votes
1 answer
What is the reason behind a specific ordering of the rows in the generator matrix for Hamming codes?
What order the rows are in a Hamming generator matrix are irrelevant for the Hamming coding to work, given the check matrix is built accoridngly.
In order to limit cognitive overload, it could have been decided that the "official" way of doing it…
vsz
- 239
- 1
- 8
4
votes
1 answer
How can I correct this Hamming code?
I'm trying to decode the following Hamming sequence (using EVEN parity and knowing there is a 1-bit error), which contains an ASCII value: 01100110101
I've tried to check for the correctness of each parity bit:
p1 p2 d3 p4 d5 d6 d7 p8 d9 d10…
user92527
4
votes
1 answer
Minimum hamming distance of multiple binary words
Our task is to compute the minimum hamming distance for the following 16-bit words:
0000000000000000
0011001100110011
0101010101010101
0000111111110000
0011111111000000
1100110000000000
1111111111111111
This minimum distance is defined as the…
Keiwan
- 487
- 1
- 5
- 12
3
votes
1 answer
Binary code and Hamming distance
I'm learning about CRC and Hamming distance and I have three questions.
Lets say we have binary code described by ($+$ refers to sum modulo $2$):
\begin{alignat*}{1}
a_1 &+ a_2 &+ a_3 &+ a_4 &+ a_5 &= 0\\
a_6 &+ a_7 &+ a_8 &+ a_9 &+ a_{10} &=…
Krzysiek
- 31
- 1
3
votes
1 answer
Computing Hamming Distance Between Binary Vectors
Consider the following problem:
Input: We are given a set $S$ of $n$ binary vectors. A binary vector is of the form $(b_0, b_1, ... b_n)$, where $b_i \in \{0, 1\}$. Therefore, there are $n$ vectors of size $n$.
Output: For each vector in $S$, we…
rusty_lurker
- 43
- 4
3
votes
2 answers
Hamming code -- identical parity bits for different errors
(7,4) Hamming Code (HC) detects all 2-bit errors and corrects all 1-bit errors.
However, there can be 2-, 3- or 4-bit errors that come with the same parity bits as that of 1-bit errors.
Eg.: Let the data be $1011$. So - the parity bits are…
Roam
- 137
- 2
- 5
3
votes
2 answers
How to recognise the number of errors that can be detected and corrected of a large set of codewords (k) each having a specified number of bits (n)?
I am struggling to find how can I know the number of errors that can be corrected and detected using (n=10) bit code with a (k=550) codewords.
As far as I know, to calculate the number of errors to be corrected and/or detected someone must know the…
Powerful blaster
- 55
- 5
2
votes
1 answer
Lower limit on the number of check bits needed to correct single errors
I was going through Andrew S. Tannenbaum's computer networks book, and on page 206 of it, he has derived the number of check bits needed to correct single bit errors. The derivation goes as follows:
For m data bits, there are 2^m legal messages.…
Aditya Grover
- 21
- 1
2
votes
1 answer
Polynomial generator required to detect single bit error in Cyclic Redundancy Check codes
I was reading about CRC coding from two books:
Data Communication and Networking by Forouzan Page 294
Computer Network by Tanenbaum Page 188
They use following notations:
$d(x)$: dataword to be sent (as a polynomial)
$c(x)$: codeword sent (as a…
Mahesha999
- 1,773
- 7
- 30
- 45
2
votes
1 answer
coding theory- perfect codes
I'm new to stackoverflow so please bear with me. A tutorial question I got given was as follows:
You are given that $C \subseteq D \subseteq F^n_q$ where $|C| < |D|$ and $C$ is a perfect code. Show that $d(C) > 2d(D)$.
I have been using the fact…
shex95
- 21
- 2
2
votes
1 answer
Hamming error correction with non-uniform error correction capability
If I understood correctly, Hamming codes assume the uniform correction among all the bits. This means all the bits have the same weight in terms of correction.
Are there any error correcting codes out there that assume non-uniform error correction…
AmirC
- 131
- 3
2
votes
1 answer
What is the difference between Hamming Distance and Manhattan Distance for non-binary data?
What is the difference between Hamming Distance and Manhattan Distance for non-binary data (specifically I am comparing points in $\mathbb{R}^2$)? I understand Manhattan sums the absolute difference in the and x and y directions but doesnt hammming…
John D
- 123
- 4
2
votes
1 answer
Calculate number of error-correcting code check bits
To design a code with $m$ data bits and $r$ check bits which allow all single-bit errors to be corrected, the formula
$$(n + 1) 2^m \leq 2^n$$
with $n = m + r$ and $(m + r + 1) \leq 2^r$ is used.
Why is $+ 1$ used here, doesn't $n$ contain already…
Road
- 41
- 4