Here is a nice puzzle.
You want to open a door, which is password protected. The password is a 4-digit numeric string. You don’t know the password. But, you are free to enter as many digits as you wish. No matter how lengthy the numeric string that you enter, if the actual password exists anywhere in the string, the door opens. For example, if the password is 1234 and you enter 12345, or 42351234, or 3423123465, the door opens! I guess, now the conditions are clear. With this set of rules, with a dump attempt, you can enter all possible 4- digit numbers (starting from 0000 to 9999) and get it open. But, the puzzle here is to obtain a string of minimum possible length, which encompasses all the possible 4-digit numeric strings.
- As you can see, the first 4-digit string needs 4 numbers. After that you find a new 4-digit string by just adding one more number at the end of it. So, in order to traverse between all the 10000 possible passwords, without repetitions, the minimum length of the string (that you are going to discover) will be 3+10*4
- Of course, that means you have to find a string of 10003 digits. But, you don’t need to write down the whole string. Once you crack the puzzle, just write down the algorithm to generate the string.
You can send your answers to me at gopoo.1981 @ gmail.com or you can post in the comment.
PS: Even I haven’t solved this puzzle completely, but I am close to it (at the cost of sleepless night yesterday). If everything goes fine, I will post a descriptive answer sometime in the next week.