I couldn't figure out how to answer the following question: Suppose we want to transmit a string of 3 ASCII characters, and in order to be able to detect or correct the message, we append the sum of the chars at the end of the binary string. e.g.:
encode("abc") == `110000111000101100011100100110`
what is the distance of such code? what is the distance of the same code with an additional parity check bit at the end?
all I could figure out so far is that the code is in the form of (30,21,d) and if one bit flips, it's of course detectable, thus 'd' is at least 2, and we cannot correct errors. But when two bits flip (or more), I can't grasp it. It seems to me like the parity check version doesn't do a lot, and I'm not quite sure how can I make a case (if any) to maximize 'd'.
I understand the classic (7,4,3) examples, but this one had me all confused due to the number of possible strings. How should I approach it?