SAP智力題 Data transfer

來源: 2010-02-04 15:13:55 [舊帖] [給我悄悄話] 本文已被閱讀:

Prerequisite knowledge: when transfer data through network, error may happen. Suppose we want to transfer 1001, and the error would happen on only one bit, we may add some parity-check code like this:
-----Co1-Co2-XOR
Ro1---1---0---1
Ro2---0---1---1
XOR---1---1
Then you transfer 10101111 instead of 1001, and the person who receives the data would be able to figure out the original data.

The puzzle is: you want to transfer 1000 bits data over the net work, and the error may happen on only one segment of the data, (e.g. from bit 11 to bit 233), and all the 1 in that segment will turn into 0, 0 will turn into 1. You may add some check code to the data, how many bits at least are enough for you to make a secure transfer?
----Designed by Hansen Chen in 2009( https://www.sdn.sap.com/irj/scn/forum?forumID=410 )