So, who is Stierlitz? He was a Soviet spy, who worked undercover as a senior German officer during WW2 in Hitllers’s Germany. There was a russian television series “Seventeen Moments of Spring”, aired before the collapse of the Berlin wall, which portrayed the deeds of Stierlitz. This was a popular movie in Bulgaria in those days behind the Iron Curtain, when films were rare. I remember watching some TV series as a child.
So, about the problem. A typical Russian one. The more techniques you know the worse. The first thing that occurred to me upon seeing it was the probabilistic approach. Unfortunately, I didn’t manage it that way. Let me first present the problem. I used the translation given in [1]
Problem (10.4, St. Petersburg 2021) Stierlitz wants to send an encryption to the Center, which is a string containing characters, each a “dot” or a “dash”. The instruction he received from the Center the day before about conspiracy reads:
i) when transmitting encryption over the radio, exactly characters should be replaced with their opposites;
ii) the location of the “wrong” characters is decided by the transmitting side and the Center is not informed of it.
Prove that Stierlitz can send encryptions, each time choosing some characters to flip, such that when the Center receives these ciphers, it may unambiguously restore the original code.
A possible probabilistic approach.
The problem can be reworded. Let be the space of all binary strings of length and consider the Hamming metric . That is, for any we denote as the number of bits in which and differ. Denote by the sphere with center and radius , that is, The problem claims that for any there exist ten points (strings) such that
It’s enough to show that there exist spheres that intersect at exactly one point. If this point is not but, say, we can “translate” the spheres by flipping the bits of their centers at the positions where differes from A standard setup is to choose randomly and independently ten points and investigate the expected number of points of their intersection. I did some calculations, and as it turns out this number is quite large.
Solution.
We substitute dot and dash by o and 1. Suppose the string Stielitz wants to transmit consists of zeroes If it is something else just flip appropriately some zeroes to ones and vice versa in the following lines. The first two strings Stierlitz transmits are
Note that this reveals to the Center the last two characters, in this particular case . Indeed, let and be the two strings obtained by the above ones by truncating the last two characters and be the Stierlitz’s original one without the last two bits . Thus, consist of characters and differ at each position. It means that one of them differs from in at least bits, hence the last two bits of the original string cannot differ from the corresponding bits of the first two encodings. The next two strings Stierlitz sends are
The Center already knows that the real last two characters are , hence the rest of the strings must differ from the original at exactly positions. The same argument as above yields the characters following the first ones coincide with the original. Thus, the Center knows the last symbols. Stierlitz proceeds the same way, every pair of encodings reveals the another characters. The ninth and tenth strings are
The Center already knows the last characters, hence the first symbols of these two strings differ at exactly bits from the original one. So, the Center reveals additional bits and knows the last ones, in our case all zeroes . Now, look at transmitted string #1. We see that it differs from the bits already known at positions. That is, no other differences can occur, hence the first bits of the original are exactly as in the string #1, in our case zeroes. The center knows the whole original string.
References.
[1] AoPS thread of this problem.