InterviewSolution
 Saved Bookmarks
    				| 1. | 
                                    The spy sent Tintin four messages which consists of only the letters from A to D, that are encoded in the following way: A, B, C, D are equivalent to 00, 01, 10, 11 respectively. An operation ‡ is defined over the numbers 0 and 1 as All messages that Tintin receives are encoded as (Message)`‡`(Key) where Key is a fixed word that is used for encoding all the Messages. But, sadly, Tintin does not know the key. BDBDBD, AAAA, BDBBBB, DAACCC . You forgot the messages corresponding to these encodings but you do remember that all of these four messages had ADC as its substring. Few seconds later, Tintin receives another message that was encoded as BBDBD. Can you tell what the actual message could possibly be? Not clear? Want an example – let us have two messages AB and CD, and let the key be BC, then `(({:(" "AB),(+BC):})/(BD))/` `(({:(" "CD),(+BC):})/(DB))/` are the corresponding cypher texts.[Hint: if `("word"1)‡("word"2)=("word"3) " then " ("word"1)=("word"2)‡("word"3)]`A. ABACDB. ABADCC. ABABCD. ABBDC | 
                            
| 
                                   
Answer» From the hint, we realize that the 3 words are cyclic. Therefore,     `{:(M,,,K,,E),(,ul(K),ul(E),,ul(M),),(,E,,M,,K):}` Where, M: Message, K: Key, E: Encoding. Observe that, this function is unary in nature. Since, we only had the last 3 alphabets of the key, let us only focus on the last 3 alphabets of the messages and the encodings. Every message ended with ADC. Therefore, using the 3rd formula, DBD ADC DCB = the key. Now, using the key, the encoding’s BBDBD last 3 words DBD and the 2nd formula, DCB DBD ADC Hence, the message ends with ADC, which is Option B.  | 
                            |