# Parity check matrix : erroneous parity check bit

#### thumb2

Joined Oct 4, 2015
122
Hi all,

I was looking at parity check matrices and I was wondering: suppose that the received matrix is

$$\begin{array}{cccc|cc} 1 & 0 & 1 & 0 & 0 & \\ 0 & 1 & 1 & 0 & 0 & \\ 1 & 0 & 1 & 1 & 1 & \\ \hline 0 & 1 & 1 & 0 & 0 & \leftarrow \\ \ & \ & \ & \ & \uparrow \end{array}$$

the parity check bit (marked with the arrows) does not coincides with the LRC and VRC bits.
I think in this situation the code cannot be corrected, but I am not completely sure.

Am I right ?

Regards,
thumb2

#### MrChips

Joined Oct 2, 2009
25,928
There is also a parity error in the fourth column.
Hence the last row should be 0 1 1 1 1.

Single bit parity check can detect a single bit error. It cannot detect errors in two bits.
Single bit parity check cannot correct a single bit error.

With both LRC and VRC, a single bit error can be corrected.
In your example given, there are two errors in the last row.
The fact that we can identify the errors seem to suggest that the errors can be corrected.

However, if there were two errors, for example in 1st row, 1 0 1 1 1, this matrix would pass error check.

The answer is you are correct, you cannot correct this error.

Last edited:

#### thumb2

Joined Oct 4, 2015
122
MrChips said:
There is also a parity error in the fourth column.
Yes. Initially the matrix was, as I wrote on my paper:

$$\begin{array}{cccc|c} 1 & 0 & 1 & 1 & 1 \\ 0 & 1 & 1 & 0 & 0 \\ 1 & 0 & 1 & 1 & 1 \\ \hline 0 & 1 & 1 & 0 & 0 \\ \end{array}$$

then, since I am interested in the situation where the single parity bit doesn't match, I changed to the matrix of the 1st message, supposing that is the data matrix received (which is obviously erroneous). The purpose of this change was just this question on AAC.

MrChips said:
Single bit parity check cannot correct a single bit error.
So I understand that the error cannot be corrected in any case if it doesn't match.

#### thumb2

Joined Oct 4, 2015
122
In your example given, there are two errors in the last row.
OK, but wait.

What if the bits of the LRC (or VRC but not both of them) plus the single parity bit are wrong ?
If we have received such a matrix, what can we say about it ?

It's true that the correct matrix should be:

$$\begin{array}{cccc|cc} 1 & 0 & 1 & 0 & 0 & \\ 0 & 1 & 1 & 0 & 0 & \\ 1 & 0 & 1 & 1 & 1 & \\ \hline 0 & 1 & 1 & 1 & 1 & \\ \end{array}$$

but if we have received the matrix as:

$$\begin{array}{cccc|cc} 1 & 0 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 0 \\ 1 & 0 & 1 & 1 & 1 \\ \hline 0 & 1 & 1 & 0 & 0 \\ \end{array}$$

in this case we have both LRC + signle parity bit mismatch. So the error could not be corrected.

EDIT
The answer is you are correct, you cannot correct this error.
Just saw your edit.

Thank you

#### MrChips

Joined Oct 2, 2009
25,928
The robustness of any parity scheme can be assessed by how many errors are detected and how many errors can be corrected.
With VRC alone, a single bit error can be detected but not corrected.
With both LRC and VRC working together, a single bit error can be detected and corrected.
Two-bit errors can be detected but not corrected.