6

If a single-bit error correction is attempted, the ordering presented in the example guarantees that the syndrome vector (the result of the multiplication of the checking matrix and the received data), if interpreted as an integer, will indicate the position of the error. Otherwise, a lookup table would have to be used.


4

Grid graphs are finite node-induced graphs of the infinite planar grid (whose vertices are integral points, and two vertices are linked when their Euclidean distance is 1). A. Itai, C. H. Papadimitriou, and J. L. Szwarcfiter proved that the Hamiltonian path problem on grid graphs is NP-complete. To reduce that to your problem, suppose the grid graph has $m$ ...


3

You say in the comments that we might have $c \approx 15$ or so. There should be very efficient algorithms in this case, using locality sensitive hashing. For example, here is a simple LSH. Randomly choose a set of about 10,000 indices (out of the 1,000,000). Hash each vector by computing some standard hash of the 10,000 bits in those positions (ignoring ...


3

The Hamming codes are optimal in the sense that among all codes with the same block length and minimal distance, they contain the most number of codewords. We know this because Hamming codes are perfect codes: their number of codewords matches the Hamming bound, which is an upper bound on the number of codewords in a code with given block length and minimal ...


3

Guidelines for the future: start with reviewing the definitions. According to Wolfram, a perfect code (with distance $d=2e+1$) is one such that "for every possible word $w_0$ of length $n$ with letters in $A$, there is a unique code word $w$ in $C$ in which at most $e$ letters of $w$ differ from the corresponding letters of $w_0$." OK, but this is cheating....


2

When we say that a Hamming code detects (up to) 2 errors and can correct 1, we mean just that: There is an error-detection algorithm that returns NO if there are no errors and returns YES if there are one or two errors. There is absolutely no guarantee when there are more errors. There is an error-correction algorithm that gets a possibly corrupted word and ...


2

Yes, such a Gray code sequence can be constructed for all $n$, even when $n$ is not a power of two. I'll describe how, below. I will say that $a_0,\dots,a_{n-1}$ is a Gray code sequence for $0,1,\dots,n-1$ if each $a_i$ is in the range $0..n-1$, and if each $a_i$ differs from $a_{i-1}$ in a single bit position. Note that this generalizes the usual notion ...


2

You are correct. Here's what's going on. There are two subtly different questions here. The Stack Overflow question is asking: "given a set of bitvectors that form a Hamming code, how do I find the minimum distance?". In contrast, it sounds like you might be asking "given an arbitrary set of bitvectors, how do I find the minimum distance?". Those aren't ...


2

Consider the case where $k=1$. In other words, we're allowing a single error. We take our base automaton and apply this "error-allowing transformation" to it. The transformed automaton generally works as follows: The state $(q, 0)$ means "the underlying automaton is in state $q$, and we haven't made an error yet". The state $(q, 1)$ means "the underlying ...


2

The original problem is, I believe, the following. When using Hamming code with EVEN parity for 7-bit ASCII characters, the following symbol is retrieved: 01100110101. Assuming a 1-bit error, what was the original stored symbol? Write down your answer as a 7-bit binary, with no spaces. OP's statement, "..., which contains an ASCII value: 01100110101"...


2

The author of the list that you mention has written a thorough report on the problem of selecting a CRC polynomial, which probably contains the answers to all your questions. See page C-19: Important to select CRC polynomial based on: Data Word length Desired HD Desired CRC size Safety-critical applications commonly select HD=6 at max ...


1

There are many equivalent Hamming codes depending on the ordering of parity and data bits. Assuming that: You are using the specific bit ordering described here: https://en.wikipedia.org/wiki/Hamming_code#General_algorithm By "even parity" you mean that the parity bits are computed as the sum (modulo 2) of the corresponding groups of bits By "odd parity" ...


1

Let's see. With parity, each block is 1001 bits long vs 1010 bit for Hamming code. So if the error rate is 0, then you economize 9 bits. OTOH, if each second block fails, the in 50% of cases you will have to transmit a second block, in 25% of cases third block and so on. On average you have to send 2 blocks. Now, let's go deeper. If the error rate is r, ...


1

You can never detect the positions of errors with certainty. You can make the assumption that there is at most a single bit error. Under that assumption, if your code is not a valid code, you can find all different data where the hamming code differs from your code in only one bit position; if there is exactly one such data then you know where the error is ...


1

Question 1: Suppose $k$ is fixed. Then, if any group of repeated $k$ bits is flipped, the error is not detected, so we need $k \ge m + 1$. On the other hand, if $k = m + 1$, then any combination of $m$ errors will be detected because at least $k$ bits must be flipped (i.e, the whole group of $k$ repetitions) in order to arrive at a valid code word. Question ...


1

A 010101 D 000111 There are two bits different (namely the bold ones). So the hamming distance is 2.


1

In a linear code, the minimum distance is the same as the minimum weight of a non-zero codeword. It's a nice exercise to prove this, and reduces the computation time quadratically. Computing the minimum distance of a code given the generator matrix (or the parity check matrix) is NP-hard, that is, given a generator matrix (or a parity check matrix) and an ...


1

A (binary) code $C$ is a collection of binary strings of some length $n$, known as codewords. The minimal distance of $C$ is the minimum Hamming distance between (different) codewords. Hamming codes have minimum distance 3, which means that (1) every two codewords differ in at least 3 places, (2) there exist two codewords which differ in exactly 3 places. ...


1

The comment by @gnasher is right. Moreover, if the code was $k$ error correcting with $m$ data bits, each of the $2^m$ legal messages would require $$ 1+n+\binom{n}{2}+\cdot+\binom{n}{k}=\sum_{j=0}^k \binom{n}{j} $$ bit patterns dedicated to it, where $\binom{n}{j}$ is the number of words at Hamming distance $j$ from a given word.


1

You should do arithmetic modulo 2. Modulo 2, $-1$ is the same as $+1$.


1

They clearly say that the example is only given as an example. If you believe you need 5 parity bits - use 5 bits. They use 4 bits in their example for no good reason. True, they still wish you to mark it clearly. I guess the reason is (a) to make sure you know that the parity comes in powers of 2, and (b) to ease their grading. note you should not use ...


1

Your terminology is a bit off. Hamming distance is a metric on words given by the number of different symbols. The minimal distance of a code is the minimal (Hamming) distance between two different codewords, and enjoys the properties you listed.


1

The topic you want is Unequal Error Protection (UEP) codes. There are a number of constructions in this area and a google scholar search yields quite a few hits. Intuitively, imagine partitioning your code into disjoint point clouds, where cloud centres are chosen by the more important bits, thus intra-centre distance is high, hence those bits are more ...


Only top voted, non community-wiki answers of a minimum length are eligible