# I'm a celeb get me outta here: optimal strategy to open locks

Suppose there are two 4 digit locks and a given and finite set $$A$$ of 4 digit tuples. Two elements of $$A$$ open the locks. What shall I do? Stick to the number or stick to the lock?

I. Choose the first element of $$A$$ and try the locks, then choose the second element of $$A$$ and try the locks and so forth until both are open.

II. Choose the first lock and try the elements of $$A$$ until open and then try the remaining elements of $$A$$ for the second lock.

Edit: The two 4 digit tuples that open the respective locks are distinct. One cannot try to open the locks simultaneously. A strategy is called optimal if it minimizes the attempts to open both locks.

• What have you done so far? – saulspatz Jan 19 at 0:40
• Provide two distinct strategies. I wouldn' t know how to prove that one is optimal. I suppose that it also depends on the cardinality of $A$. Just saw the show and was wondering how to approach the problem. – clueless Jan 19 at 0:57
• Please clarify "Two elements of A open the locks.". Are there precisely two distinct elements of $A$ that open the locks? Do they both open both locks, or one each? – Servaes Jan 19 at 1:10
• The two 4 digit tuples that open the locks are distinct and one tuple belongs to one lock each. – clueless Jan 19 at 1:18
• OK great. Next; what do you mean by optimal? – Servaes Jan 19 at 1:34