Suppose you want to open a safe with 10 switches. For each switch there're 3 settings, say, 1,2,3. There're 2 key switches. The safe is unlocked once you set the key pair correctly, but you can't distingush the key ones from the others. The question is, how many tries do you need to be sure to open the safe, and how should you choose the combinations (an althorithm)? (For example, if the safe has only 2 switches instead of 10, you need 3×3=93×3=9 tries) Will the number of tries grow less than linearly as the number of switches increases? Could there be a formula for a general problem of nn switches, mm settings and kk keys?



Answer :

N ≥ [tex]2^{n}[/tex] shows that our construction is optimal up to a multiplicative constant.

Suppose the number of switches is [tex]N=2^{n}[/tex]. Here is a construction using 6n+3 settings.

First, we take the three constant settings [tex]0^{N} , 1^{N},2^{N}[/tex]. Next, for any two different values a,b ∈ {0,1,2} and i ∈ {0,…,n−1}, we have the setting such that switch k gets value a or b depending on the value of the [tex]i^{th}[/tex] bit of k. Now suppose s, t are the two correct switches, and their correct settings are a, b.

If a= b then one of the constant settings unlocks the safe. Otherwise, suppose s and t differ on a bit i. Then either the setting (a, b, i) or the setting (b, a, i) unlocks the safe.

On the other hand, suppose {s1,…, sn} is a set of settings of N switches such that for all pairs i, j ∈ [N], there is a setting in which switch i is set to 0 and switch j is set to 1. Then N ≥ [tex]2^{n}[/tex]. This shows that our construction is optimal up to a multiplicative constant.

To know more about the multiplicative constant visit: brainly.com/question/11872107

#SPJ4

Other Questions