title: redundant encoding?
body: <p>This is more of a computer science / information theory question than a straightforward programming one, so if anyone knows of a better site to post this, please let me know. </p>
  
  <p>Let's say I have an N-bit piece of data that will be sent redundantly in M messages, where at least M-1 of those messages will be received successfully. I am interested in different ways of encoding the N-bit piece of data in fewer bits per message. (this is similar to <a href="http://en.wikipedia.org/wiki/RAID" rel="noreferrer">RAID</a> but at a much smaller level, where N = 8 or 16 or 32)</p>
  
  <p>Example: suppose N = 16 and M = 4. Then I could use the following algorithm:</p>
  
  <pre><code>1st and 3rd message: send "0" + bits 0-7
  2nd and 4th message: send "1" + bits 8-15
  </code></pre>
  
  <p>If I can guarantee that 3 messages of the 4 will get through, then at least one message from each group will get through. Thus I can make this work with 9 bits or less, there's probably a way to do this with fewer total bits but I'm not sure how.</p>
  
  <p>Are there some simple encoding/decoding algorithms to do this kind of thing? <em>Does this problem have a name?</em> (if I know what it's called, I can google it!)</p>
  
  <p><strong>note:</strong> in my particular case, the messages either arrive correctly or do not arrive at all (no messages arrive with errors).</p>
  
  <p>(edit: moved 2nd part to a separate question)</p>