Lets say you have 100 trillion unique locks and their corresponding 100 trillion unique keys. You scramble them up, and then place all the locks and all the keys in two separate boxes.
You want to find a compatible key/lock combination.
You can choose to try one of three search methods to find a compatible combination:
You randomly select one lock. Repeatedly, you randomly select a key, try it with the lock, and return the key to its box.
You randomly select one key. Repeatedly, you randomly select a lock, try it with the key, and return the lock to its box.
Repeatedly, you select a random lock and a random key, check if the key opens the lock, then return both to their corresponding box.
For all three search methods, you stop when you've found a successful key/lock combination.
Are all three options equally likely to take the same amount of time before finding a compatible lock and key? If not, why?
Is there a more efficient search method that can be used to find a valid combination? In other words, Can we make this process faster?
To Extend this question, consider two separate, mutually-exclusive alterations to the problem:
Of the 100 trillion locks and keys, lets now say that only 1000 of each are compatible with each other.
Of the 100 trillion locks and keys, lets now say each key is compatible with 1000 different locks, and each lock is compatible with 1000 different keys.
Will any search method work better than any other, to find a matching combination?
*Disclaimer: This is my very first post here.