Space Bits

Join Our Community of Science Lovers!

At certain times of the year, a message from Mars traveling at the speed of light can take 20 minutes to arrive at Earth. As if that weren't bad enough, space radiation may flip one or more bits, where flipping means turning a 1 into a 0 or vice versa. For this reason, you've been called in to help with the coding. Here is what you are told.

The spacecraft will send a bunch of messages, each consisting of 100 bits plus some extra bits as we discuss below. There is an infrequent burst of space noise that can cause one or more consecutive bits to flip. The consecutive sequence of flipped bits will have a length of at most 20. Moreover, those bursts will happen at most once in the time it takes to transmit 150 bits.

We'll work up to that noisiest case in stages. 


On supporting science journalism

If you're enjoying this article, consider supporting our award-winning journalism by subscribing. By purchasing a subscription you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today.


Warm-up:
Suppose the noise burst could flip at most one bit in the time it takes to transmit 150. How few bits could you add to the message to detect the presence of an error?

 

Solution:
Just one extra bit would do it. Count the number of 1s among the 100-bit message. Call that number N. Add an extra bit (the 101st) with a value 1 if N is even and make the extra bit 0 if N is odd. (This is called "odd parity" in the electronic trade.) When the message (along with the extra bit) arrives at earth, there has been an error if the number of 1s among the 101 bits is even. Otherwise there is no error.

 

Problems:
1. Next, let's assume that the noise burst will flip EXACTLY 20 consecutive bits or will flip no bits at all. How few extra bits would you then need to detect the presence of an error in the message?

Okay, if you’ve solved that, let's try for the full problem.

2. There can be zero or one noise burst in the time it takes to transmit 150 bits. If there is a noise burst, it will flip some consecutive sequence of at most 20 bits. How few extra bits would you then need to detect the presence of an error in the message? (Hint: I can do it with fewer than 115.)

Here is an open question. How many bits would be necessary to determine where such a noisy consecutive sequence of bit flips begins and ends in the setting of question 2? How would you do it?

It’s Time to Stand Up for Science

If you enjoyed this article, I’d like to ask for your support. Scientific American has served as an advocate for science and industry for 180 years, and right now may be the most critical moment in that two-century history.

I’ve been a Scientific American subscriber since I was 12 years old, and it helped shape the way I look at the world. SciAm always educates and delights me, and inspires a sense of awe for our vast, beautiful universe. I hope it does that for you, too.

If you subscribe to Scientific American, you help ensure that our coverage is centered on meaningful research and discovery; that we have the resources to report on the decisions that threaten labs across the U.S.; and that we support both budding and working scientists at a time when the value of science itself too often goes unrecognized.

In return, you get essential news, captivating podcasts, brilliant infographics, can't-miss newsletters, must-watch videos, challenging games, and the science world's best writing and reporting. You can even gift someone a subscription.

There has never been a more important time for us to stand up and show why science matters. I hope you’ll support us in that mission.

Thank you,

David M. Ewalt, Editor in Chief, Scientific American

Subscribe