madbomber
madbomber
  • Threads: 1
  • Posts: 3
Joined: Feb 9, 2012
February 9th, 2012 at 2:50:40 PM permalink
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?
MathExtremist
MathExtremist
  • Threads: 88
  • Posts: 6526
Joined: Aug 31, 2010
February 9th, 2012 at 2:56:16 PM permalink
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
madbomber
madbomber
  • Threads: 1
  • Posts: 3
Joined: Feb 9, 2012
February 9th, 2012 at 2:58:05 PM permalink
MathExtremis,

Yes, it is a big transition matrix that can be worked out, but on average, how many moves will it take?
AZDuffman
AZDuffman
  • Threads: 240
  • Posts: 13997
Joined: Nov 2, 2009
February 9th, 2012 at 3:12:30 PM permalink
Quote: madbomber

MathExtremis,

Yes, it is a big transition matrix that can be worked out, but on average, how many moves will it take?



Looks as though it should take a maximum of 80, probably less.
All animals are equal, but some are more equal than others
Wizard
Administrator
Wizard
  • Threads: 1494
  • Posts: 26542
Joined: Oct 14, 2009
February 9th, 2012 at 3:53:19 PM permalink
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.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Ayecarumba
Ayecarumba
  • Threads: 236
  • Posts: 6763
Joined: Nov 17, 2009
February 9th, 2012 at 4:00:42 PM permalink
Quote: Wizard

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.




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.
Simplicity is the ultimate sophistication - Leonardo da Vinci
madbomber
madbomber
  • Threads: 1
  • Posts: 3
Joined: Feb 9, 2012
February 9th, 2012 at 4:11:25 PM permalink
What would you charge to figure this out - a 5, 6, 7, 8 & 9 digit code, average time to break.
  • Jump to: