Bagels - the digit gussing game.

I was thinking of putting this in GQ but it’s probably better here.
For the last 10 years, there’s been a game on my website which is a version of a 25 year old computer game called Bagels. Anyway, I call mine “Digitally Correct” and you can choose to guess from 1 to 10 digits. There will never be any repeated digits so if you were to choose 10 digits, it would have all the digits with no repetition. Yes, believe it or not, there’s a point to this.
For increased “user-friendliness”, I recently rewrote the program and I started thinking about the 10 digit option. I used to think the only way to win at the 10 digit option would be if you were lucky enough to guess the only winning number out of the 10 factorial possibilities. (where 10 factorial = 3,628,800 - actually it would be less than that because the computer number never begins with zero).

So, a strategy then occurred to me that if you could find a 10 digit number that has none of the digits in the order of the computer number, it would be a clue. For example, if you typed in “1234567890” and it had no matching digits then you’d know the computer number didn’t begin with 1, the second digit can’t be 2, and so on. Then, finding additional numbers, would narrow down the search even further.

For those of you that might still be awake, I wondered how many numbers could be found that had all digits in the wrong place from the computer number. This reminded me of the “drunken sailor” problem in which a group of sailors go on liberty, get drunk and return to their ship choosing their cots completely at random. What are the odds that every sailor will be in the wrong cot? The answer is that as the number of sailors gets larger the probability approaches 1/e or about 36.79%. So, that means that if you have to guess a 10 digit computer number, you could find about 1,300,000 (10 factorial times .3679) numbers that have no matching digits with the computer number order.

Anyway, I was thinking of adding some of this information to my web page and I wondered if anyone here at the SDMB knew about any strategies for this.

Thanks. Oh, and this is my first posting in The Game Room. :slight_smile:

Afraid I can’t be too much help, but in case you didn’t already know, what you’re describing is derangement. Complete and utter derangement.

Derangement - That’s precisely what I’m talking about. I never knew it had a specific term attached to it so thanks for that information.

Now, I wonder if there is anything about derangements that would lead to a strategy for guessing a 10 digit number.

Also a scaled up version of Mastermind. Used to love playing that.

Wikipedia of original board game.

Just tried it and took 37 steps – got 8 digits correct by guess #30, but took me a while to figure out which two needed to be exchanged with each other! Just for the record, the sequence selected for me was 5192408637.

Congratulations !!!
Since the game already had a choice for guessing 10 digits, I think I’ll add some information about guessing 10 digits, derangements, etc.
And thanks for playing the game.