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.