A higher resolution is required to access the IDE
- 2
Learning Opportunities
This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.
Statement
Goal
Consider strings of binary bitsIf 𝒙 = 𝒚 then 𝓕(𝒙) = 𝓕(𝒚). That is, the output is consistent.
If 𝒙 ⊕ 𝒚 = 𝒔, 𝓕(𝒙) = 𝓕(𝒚). Here, ⊕ is the exclusive-or operator.
Otherwise, 𝓕(𝒙) ≠ 𝓕(𝒚) is guaranteed.
In this variation of the problem, we map 𝓕 to characters, and we require that the secret string not be all
Query
Query
Query
Query
Query
At this point, the algorithm has encountered two different bit strings that produce the same result, namely
It is no accident that the queries above produced sequential results
In other words, 𝓕 is ostensibly based on a bit string 𝒔, but internally the exact structure of 𝓕 may only be partially decided. The oracle keeps the secret string undetermined except insofar as the information revealed about 𝓕 requires. In this way, a definitive value for 𝒔 is avoided and unexposed for as long as possible.
If, for instance, the first two random queries had been
Design an oracle to do exactly that. Given N random bit strings of length M, build a function 𝓕 mapping bit strings to letters
Output the secret string if it is found, otherwise the largest binary value of 𝒔 still possible after all queries are answered. Also output the resulting application of 𝓕 to each query.
Input
Line 1: An integer M for the length of each bit string, a space, and an integer N for the number of queries
Next N lines: A bit string query (consisting of M digits0 or 1 )
Next N lines: A bit string query (consisting of M digits
Output
Line 1: A bit string as the value or greatest possible value for 𝒔
Next N lines: A single characterA through Z corresponding to the result from 𝓕
Next N lines: A single character
Constraints
1 < M ≤ 8
N < 30
No characters beyondZ will be required.
N < 30
No characters beyond
Example
Input
3 5 011 001 110 100 101
Output
110 A B C D A
A higher resolution is required to access the IDE