Skip to content
User Avatar
#1058
Auto-translated
Uranium235
Well, I did have HOGs in one case, but I called them parity for two bits.
But the idea itself is interesting, to transmit a function instead of the message itself.

Added 1 hour 2 minutes ago
Function F is a HOG, it's also parity (0 - identical characters, 1 - different characters). The message itself is ABCD, the numbers are the bit numbers.
Bit 1: F(A, B)
Bit 2: F(C, D)
Bit 3: F(1, 2)
It shows the presence/absence of an error among the first three bits
Bit 4: F(A, D)
Bit 5: F(B, C)
Bit 6: A
Bit 7: C
If there is an error in the first three bits, we can successfully read the message. Let's assume there is no error there.
We can check for an error in bits 4 and 5:
We definitely know from bits 1 and 2 whether A and B are the same or different, and C and D are the same or different.
That is, 00, 01, 10 or 11.
If bits 1 and 2 have values 00 or 11, then bits 4 and 5 should also be either 00 or 11 (both combinations of identical values are acceptable).
For 01 and 10, the unknown values should also be 01 and 00 in the absence of an error.
If there is an error among bits 4 and 5, we still construct the message using bits 1, 2, 6, 7. Let's assume there is no error. The error is in A, in C, or there is no error at all.
If there is no error at all, then by substituting A and C into functions 1, 2 and 3, 4, we get the original message in both cases, and it will be the same. If it's different, then by inverting either A or C, we can determine F(A, C) with absolute certainty. I don't know why, but it seems that by solving a system of equations with this function and the functions from bits 1-2, 4-5, we can find out whether the error is in A or C. But it seems not, but I'm too lazy to think about it anymore. But I have improved the previous result. I can read the message in 5 cases of a corrupted bit and in the case of no error, and only in the case of corruption of two specific bits do I have 2 message options, and I know about it.
We can also try, but take the control (3rd bit) as F(2, 6).

This is the best so far, although I haven't read what Sesame wrote yet. Here, you can definitely detect that there was an error! But still, for example...
According to your algorithm, the combination 0000 is encoded as the message 0000000,
and the combination 1111 is encoded as the message 0000011.
But let's say we received the combination 0000010 :(
Yes, it's clear that one bit, or even more, has been corrupted - it's the sixth or seventh bit. But how do we know whether we transmitted 0000 and corrupted the sixth bit from 0 to 1, or 1111 and corrupted the seventh bit from 1 to 0???

Added 11 minutes ago
Sesame
yes, indeed. In my solution, in case of bit5 failure, there is an ambiguity. So it's not suitable.
okay, let's go back to transmitting the message and a "checksum".
Only in the checksum, we XOR not pairwise, as Uranium does, but the first bit with each of the following.

Message: i1 i2 i3 i4

We transmit
bit1: i1
bit2: i2
bit3: i3
bit4: i4
bit5: xor(bit1,bit2)
bit6: xor(bit1,bit3)
bit7: xor(bit1,bit4)

I'll check for all options later.

Added 2 hours 58 minutes ago
meh, there are still ambiguities.
This option is also not working.
It's also not bad. An error is detected. But, for example, if we received 0100000, it's not clear whether we transmitted 0000 or 0100, because 0000 corresponds to 0000000, and 0100 corresponds to 0100100, and here is the same situation as with Uranium235.
Всё не так плохо как Вы думаете. Всё намного хуже!