TITLE: Does any error correction code still work in such situation?
QUESTION [7 upvotes]: I'm looking for a kind of error correction code or solution that can correct my codeword in this case:
My message holds k bits, and 2*k bits codeword (rate is 1/2) is produced by the generator matrix, e.g. k=5, so it yields 10 bits codeword 1001100111. If the codeword is erased for some reason and it becomes 1xx1x00xx1 (similar to the codeword transmitted through Binary Erasure Channel, and x is unknown, either '0' or '1'), can I still correct all the "x bits" in such situation as bit error rate is 1/2?
I have read about some error correction code, such as block code, convolutional code and LDPC and got the following questions:

All these ECC have pratical application in communication, so do they still work when BER is close to 1/2 (I think BER is impossible so high)? 
Are there any feasible solution to my case? In fact, my message is 30 bits and I can introduce another 30 bits redundancy as parity bits. Can I still correct my codeword even if half bits are corrupted?

Any guides or suggestions are appreciated!

REPLY [3 votes]: As others have explained, you cannot do this with absolute certainty, because then you will bang your head against the wall of Hamming distance. However, `rateless' codes can do this with a very high probability with effective rate an epsilon over 1/2, and longer blocks of data. In other words, Snowball's comment is a good one.
In some sense the philosophy (that to some extent was a paradigm shift for ECC designers) is that the approach based on optimizing the Hamming distance is that of playing the game against an intelligent, evil adversary, who erases (or toggles) precisely those bits that will give you trouble. In natural communication, the actual opponent is the more benign random noise occurring in nature.
Look up fountain codes and (for an improvement) Raptor Codes for definitions and papers with probabilistic analysis (if you can stomach the gloating of a person, who insists calling bitwise XOR as a transform named after himself).