Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I can Predict your response with '90%' accuracy.

Status
Not open for further replies.

SidYuca

Technical User
Nov 13, 2008
79
0
0
MX
I Enjoyed this thread and thought that I'd contribute.

1. Multiply 2 single digits to form a product
2. Continue to multiply the resulting product by a single digit of your choice until said product is 7 digits (or more in length)
3. Circle one of the non-zero digits of the product (for me to guess) and post the remaining digits in any order.
4. I will post your circled digit..

Two questions: How? and give a mathematically valid reason for % accuracy.

 
IPGuru said:
there are actually less than 882 valid 7 digit numbers as some of these are only achievable from a 7 digit predecessor.
I make it 810 Valid numbers with 557 Divisible by 9 which gives 69% (after rounding)
IPGuru, I pointed out this error in your code yesterday, using the example 5^10, which can only be generated from the seven digit 5^9. As I said then
karluk said:
IPGuru's code will generate some, but not all, of the valid seven digit candidates.
You are mistaken to classify numbers like 5^10 as "invalid". Take a look at the rules of the game, which specifically state that multiplication can continue indefinitely. The mistake is in your program, which always exits when it reaches the first seven digit number. The logic in your program doesn't match the rules of the game.
 
I read the Q as implying stop when the result was greater than or equal to 7

indeed the emulation program might not produce all valid entries but if my assumption above is taken as correct then it is possible.

again in the real world a number generated by continually multiplying the same digit is possible but unlikely considering human nature so that would tend to skew the real world results away from the mathematical result.



Computers are like Air conditioners:-
Both stop working when you open Windows
 
ipguru said:
again in the real world a number generated by continually multiplying the same digit is possible but unlikely considering human nature

hmmm - In my first 10 examples I intentionally did exactly that.(7^9). I don't consider what I did to be against human nature.

**********************************************
What's most important is that you realise ... There is no spoon.
 
(1) Anyone who likes this thread will probably also enjoy investigating Benford's law concerning the probability of a first digit being a particular value (try Wikipedia for more info).

(2) IPGuru is completely right (but a spoilsport!). In real life people are very un-random about what they choose.
 
KWBmitel
I think the difference is you were probably trying to pick the difficultly & troublesome numbers (& I would probably try the same myself) but the truth about human nature is our brains are usually to lazy to try & pick easy options (just witness any Magician in action)

Computers are like Air conditioners:-
Both stop working when you open Windows
 
IPGuru said:
I read the Q as implying stop when the result was greater than or equal to 7
The rule states

2. Continue to multiply the resulting product by a single digit of your choice until said product is 7 digits (or more in length)
So numbers of eight or more digits are allowed. Since the construction process involved multiplying by single digit factors, there is no way to get to an eight digit number without first constructing a seven digit number, and then multiply at least one more time. So there is no requirement to stop immediately when reaching seven digits.
 
the rule states UNTILL your product is 7 or greater
to me the means stop once 7 or more digits has been reached.

if you can provide an 8 digit number that is not preceded by a 7 digit number using this process I will happily use it but I do not think it is mathematically possible.

the lowest 8 digit number is 100000000 & divided by nine that gives 1111111 - 7 digits

Perhaps Sid could clarify the intention there.

Computers are like Air conditioners:-
Both stop working when you open Windows
 
IF IPGuru is generating the numbers from primes the prime factorization MAY give some a distorted view of the random digits selected.

Looking at the number 1,048,576 asa good candidate generating it from primes i.e. (2^20) makes it appear to the casal observer as "What person is going to pick a 2 twenty times, that's almost too hard to believe" when actually it may have been generated by an easier to believe combination like 4,2,8,2,4,2,8,4,2,8,2, to get the same results.

In any event he MUST permit the last digit in the sequence to be replaced by ANY of the digits 2-9 to get 8 more vakid entries to be considered.
 
SidYuca has already allowed eight and nine digit candidates by responding to the ten problems posed by kwbMitel. Those problems consisted of a mixture of seven, eight and nine digit numbers. If he thought that kwbMitel was violating the construction rules, he could have spoke up then.

Not to mention that the only hope the guesser has of being right 90% of the time is to encourage the clue generator to construct numbers that are evenly divisible by nine. More multiplications means more chances to multiply by three or nine.
 
re. Perhaps Sid could clarify the intention there.


From my post above
If you generate the 7 digit number by only using prime facorization and eliminating what you call predecessors you are missing the boat.

if you say my 1,048,576 was generated by 2^20 i.e. 2^19 * 2^1 and because 2^19 is THE predecessor to 2^20 and therefore I will not consider any of he following generated by it (except the first in the list below) you are not following the intent of the problem At least to my point of view.)

2^19 * 2^1
2^19 * 3
2^19 * 4
2^19 * 5
2^19 * 6
2^19 * 7
2^19 * 8
2^19 * 9

Clearly 2^19 is about half a million and I would want all 9 considerd.

 
7 digits is just fine. I may have been recalling the problem incorrectly or some how stupidly thought that once a 'big' 6 digit number was achieved by the user his next product could 'overflow' to 8 digits and hence 'the 7 digits or more'. Lets'n not go overboard on this thing, it's intended as a parlor trick and no sane person is going to do a random 2 to the 20th w/o being drunk, get drunk while attempting or be a member of this list.;>)
The problem is worthly of a mathematical answer. I recant on the 'proof' of above because I should have allowed for repiticians. If I could do it with 8 pickes I could expand it to more picks and combine results.
 
SidYuca said:
So this means that if we seek 8 random numbers (1-9).I say that at least 1 of the following will happen 90%+ percent of the time and you say not:
* a 9 comes up OR
* two 3's come up OR
* two 6's come up OR
* a 3 AND a 6 will come up
I am sure someone on this list will come up with a proof.
First off, the problem really should be 8 random digits between two and nine inclusive since the one has no multiplicative effect.

As a stand-alone problem, the probability that you will have one of those options is 93.75%. However, in terms of this puzzle, that probability is irrelevant for two reasons. First, not all eight digit sequences will yield a product of at least seven digits long, and second, it does not take into account less than eight digit sequences which do yield a product of at least seven digits.

Using this algorithm
Code:
lInt_CalcCount = 0
lInt_DivNineCount = 0

FOR lInt_Exp2 = 0 TO 23
   lInt_TwoProd = 2 ^ lInt_Exp2
   FOR lInt_Exp3 = 0 TO 14
      lInt_ThreeProd = 3 ^ lInt_Exp3
      FOR lInt_Exp5 = 0 TO 10
         lInt_FiveProd = 5 ^ lInt_Exp5
         FOR lInt_Exp7 = 0 TO 8
            lInt_SevProd = 7 ^ lInt_Exp7
            lInt_FullProd = lInt_TwoProd * lInt_ThreeProd * lInt_FiveProd * lInt_SevProd
            IF (lInt_FullProd >= 1000000 AND lInt_FullProd <= 9999999)
               lInt_CalcCount = lInt_CalcCount + 1
               IF (MOD(lInt_FullProd, 9) = 0)
                  lInt_DivNineCount = lInt_DivNineCount + 1
               ENDIF
            ENDIF
         NEXT lInt_Exp7
      NEXT lInt_Exp5
   NEXT lInt_Exp3
NEXT lInt_Exp2

I can confirm that there are 882 values between 1000000 and 9999999 that can be calculated from single digit factors and of those, 591 are divisible by nine. That's 67.00%.

For products that are seven, eight, or nine digits long (max exponents are 29, 12, 18, and 10), there are 2780 products divisible by nine out of 3921 calculated products which yields 70.90%.

--------------
Good Luck
To get the most from your Tek-Tips experience, please read
FAQ181-2886
Wise men speak because they have something to say, fools because they have to say something. - Plato
 
If we are restricting this problem to only allow seven digit numbers, then I believe I have a definitive answer for the optimal strategy of the person who is generating the clue: There is no better strategy than randomly picking from the six source numbers

1250000
2250000
2450000
5250000
6250000
2058000

and then always presenting the clue "0,0,0,0,2,5". That will give the person guessing the missing digit only a one in six chance of being correct, far short of SidYuca's goal of achieving a 90% success rate.

There are other options that also give the guesser only a 1/6 chance of being right but, restricted to the range of seven digit numbers, there is no way for the person selecting the clue to get a bigger advantage than being right 5/6 of the time.
 
karluk,
You might have done too much work in not solving (i.e. not using rnd numbers) the original problem. Istead, you could have spied upon and taped people playing the game as intended. After a lengthy session you could delete those conversations where the guesser was correct. And be left with a greater cheat sheet. However, I do appreciate your dance even if to a different drummer. ;>)

 
I should add that, even though SidYuca turned out to be wrong about being able to achieve a 90% success rate as the guesser, I am actually quite impressed by this problem. It turns out that the clues being generated actually contain a significant amount of information about the missing digit. For the guesser to be able to know that he can always eliminate at least three out of nine digits before making his guess is an advantage that I would not have anticipated before analyzing the game. Thanks to SidYuca for presenting a truly interesting problem!
 
SidYuca said:
You might have done too much work in not solving (i.e. not using rnd numbers) the original problem.
No, actually I believe I was the only person contributing to this thread who actually worked on the "original problem". Nothing in the original problem mentions random numbers. That's a figment of your imagination based on how you hope the person generating the clues will behave. But mathematically (i.e. using game theory) the game has a "payoff" based on what happens when both players are playing their best, not when a guesser with perfect knowledge is pitted against some rube who doesn't know what he's doing.
 
CajunCenturion,
I most like all of your contributions. I count on you as being spot on...

re. your .."First off, the problem really should be 8 ... snip" is way off. The problem is what the problem is. If you are clever enough to be aware that the 1 will not further your efforts then don't use it. Many times the solver needs to filter meaningful data from the non. I know you will agree.

I think the rest of your comment (less the code) refered to my 'proof' in quotes, if that is correct you must have read that I was dealing with averages (very conservative ones at that.


I can't find anything wrong with your code that demonstrates the 67% (but I am not a pro coder...and old!) but for the life of me I can not find anything wrong with my vb6 code that demonstrates 90+%) If I can find your address I will pass it on to you as I don't know how to post it here...but you can if you like.

 
==> I know you will agree.
I don't agree that it's way off because if you include then one, then you make your 8 digit scenario even less relevant because you will now generate even fewer seven digit products with your eight chosen digits. Further, you asked for the probability of one of your four options would be chosen, but as you say, no reasonable person would choose one as one of the digits. By insisting that the one be included in the probability calculations, you're insisting the the odds be skewed to include what is obviously an unreasonable and likely never chosen digit. Finally, as it turns out, I don't think the effect is way off since including the choice of one in the probability calculations reduces the odds of one of those four possibilities by a mere two-tenths of one percent. It brings the odds down from 93.75% to 93.55%. Again, in either case, the odds are not relevant to the puzzle.

I'll be more than happy to look at your vb6 code. You can e-mail it to me at my tek-tips handle at Google's standard mail site.

--------------
Good Luck
To get the most from your Tek-Tips experience, please read
FAQ181-2886
Wise men speak because they have something to say, fools because they have to say something. - Plato
 
I'm going to reverse myself. The 93.75% number is correct. Here's why.

It is true that there are only 882 values between 1000000 and 9999999 that can be calculated from single digit factors (prime or otherwise), and of those, only 591 are divisible by nine. However, the determination of the 67% probability (591/882) is correct is based on the assumption that all 882 numbers will be calculated in a uniform distribution. That's an invalid assumption.

If you're calculating based solely on random selection of the four primes, then your prime factors will be distributed uniformly among the calculated numbers. In this scenario, for your first pick, you have a 1 in 4, or 25% chance of picking a factor of 3. In the end, you'll have the 67% probability of calculating a number divisible 9.

However, if you're picking randomly among the digits 2 through 9, then the prime factor distribution looks like this:
2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 7. In this scenario, you have a 3 in 8 chance, or 37.5% chance of picking a factor of 3. In the end, you'll have the 93% probability of calculating a number divisible by 9.

--------------
Good Luck
To get the most from your Tek-Tips experience, please read
FAQ181-2886
Wise men speak because they have something to say, fools because they have to say something. - Plato
 
Karluk, I do not believe you've proven SidYuca to be wrong as yet. You have been entirely too focused on 7 digit numbers which only meet the minimum standards of the puzzle.

You also haven't established the probabilities of each of the candidate numbers. If we look at this problem from the probability side, not all of your 882 candidate numbers have equal probabilty. Some can be achieved in multiple ways, some have only 1 way. Until you've established the probability of each possibility then you cannot state a percentage.

Think rolling 2 dice. Getting a 2 and getting a 7 do not have an equal probability. But they are both 1 of 11 possibilities. You are calculating 67% based on possibilities, not probability.

**********************************************
What's most important is that you realise ... There is no spoon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top