![]() | Bovada is the only Internet casino endorsed by the Wizard. Here are my reasons why and my promise of support. |
Code Breaking
| February 9th, 2012 at 2:50:40 PM permalink | |
| madbomber Member since: Feb 9, 2012 Threads: 1 Posts: 3 | Mr. Wizard, I am working on a promotion that would assign each participant their own 7 or 9 digit code (all numeric). Participants can come in once per day (24 hour period) to try and break their code. Once they have entered their code, the system will tell them how many digits they have correct. It won't tell them which digits are correct, just how many. My question for you is, statistically, how many days will it take for a person to break a 7 or 9 digit code playing once per day? I realize that there is always the possibility that someone actually puts their correct code in on day one, but barring that, what would be the average expected time to crack the code? |
| February 9th, 2012 at 2:56:16 PM permalink | |
| MathExtremist Member since: Aug 31, 2010 Threads: 46 Posts: 2521 | It's a strategy game, so you'd need to be looking at optimal strategy in order to answer the question. The average player isn't going to use optimal strategy -- far from it. Optimal strategy looks like this: Guess #1: 0000000 Answer: 1 (just as an example) now you know one of the digits is zero and the rest aren't. Guess #2: 0000001 Answer is either 0, 1, or 2. If it's 0, the zero is in the last spot. If it's 1, the zero is not in the last spot and neither is 1. If it's 2, 1 goes in the last spot and zero goes in one of the first six. It's a big transition matrix, but it can be worked it out. "In my own case, when it seemed to me after a long illness that death was close at hand, I found no little solace in playing constantly at dice."
-- Girolamo Cardano, 1563 |
| February 9th, 2012 at 2:58:05 PM permalink | |
| madbomber Member since: Feb 9, 2012 Threads: 1 Posts: 3 | MathExtremis, Yes, it is a big transition matrix that can be worked out, but on average, how many moves will it take? |
| February 9th, 2012 at 3:12:30 PM permalink | |
| AZDuffman Member since: Nov 2, 2009 Threads: 153 Posts: 2912 |
Looks as though it should take a maximum of 80, probably less. "The Roman Empire wasn't planned, but neither did it 'just happen.'" |
| February 9th, 2012 at 3:53:19 PM permalink | |
| Wizard Administrator Member since: Oct 14, 2009 Threads: 313 Posts: 6784 | This would be a big, yet fun, assignment. Definitely beyond the point I would do for free. This brings back bad memories. Once I had a client ask me to do a casino game version of Master Mind. I did, and then got stiffed. It's not whether you win or lose; it's whether or not you had a good bet. |
| February 9th, 2012 at 4:00:42 PM permalink | |
| Ayecarumba Member since: Nov 17, 2009 Threads: 113 Posts: 2047 |
At the risk of triggering a flashback, how did the wagering work in the "Mastermind" game? At first blush, I don't see how you take this game of skill and make it a gamble. |
| February 9th, 2012 at 4:11:25 PM permalink | |
| madbomber Member since: Feb 9, 2012 Threads: 1 Posts: 3 | What would you charge to figure this out - a 5, 6, 7, 8 & 9 digit code, average time to break. |
![]() | Bovada is the only Internet casino endorsed by the Wizard. Here are my reasons why and my promise of support. |
