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 TouchToneTommy 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
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.

 
kwbMitel said:
Karluk, I do not believe you've proven SidYuca to be wrong as yet.
Very well. If either you or SidYuca is willing to be the guesser against me as clue generator using the rules posted in SidYuca's original post in this thread and can achieve a 25% success rate over, say, 20 trials, I will quietly bow out of this thread and let you random number guys figure out the exact probabilities. I warn you, however, that I plan to use the clue generating strategy outlined in my post dated 22 Nov 11 13:42
 
@Karluk. I would like to know the results, mathematically speaking, of a non-biased game. Yes the game can be broken if the puzzler is limited to divisibility by nine, you've proven that. You can pick numbers quite easily that will not work with divisibility by nine. That being said, the puzzler is not limited to his methods and can have equal access to the same candidate numbers as you do. How many 7 digit numbers have you found that can be achieved in at least 4 different ways where the missing number is always different? If your answer is not at least 20, then I would be cautious about your most recent bet. If it is 20 or more, then the puzzler would know that and not take your bet.

You've said that the odds are 67%. This number is based on a non-biased game where the solution method is divisibility by nine. This is what I am contesting. They are not 67% and I've told you why they would not be 67%.

**********************************************
What's most important is that you realise ... There is no spoon.
 
karluk,

1. You can generate the clues any way you want except that you may not circle a zero.

2. What you CAN NOT do is cherry pick the 7 digit numbers as you like. You MUST select them at RANDOM as the problem states from 2-9.

If you are up both of the above, I am up for the bet.

Consider opening, at random, a large dictonary and taking the right most digit of the page number on alternating pages and 'do over' 1's and 0's when selected.

Also see CajunCenturion's post directly above for a different perspective.

If we say that 36 meets the conditions of the problem (less the length aspect) You would have us believe that there is only only one way to generate it, namely 2^2 * 3^2 . You would be correct if the question is, "What is the prime factorization of 36?" and it would appear only once in your list numbers divisible by 9
However the user could generate many more 36's i.e.

4*9
2*2*9
4*3*3
2*2*3*3
6*6
2*3*6
2*3*2*3
2*3*2*3

This would add considerably to the number of potential mod9=0 numbers.

Thanks for the perspective CajunCenturion. Was my code ok?


 
Sid, I'm ok with him cherry picking as long as he's ok with us doing the same.

If he provides 20 numbers. All we need to do is figure out how many ways they can be achieved and what candidate number may be missing.

I don't think there are 20 numbers that can have 6 numbers in common with at least 4 other candidates where the missing number is different in each case.

Don't take the bet unless numbers are provided. If he wants an unbiased game, he must accept our rules as well.

**********************************************
What's most important is that you realise ... There is no spoon.
 
kwbMitel said:
I would like to know the results, mathematically speaking, of a non-biased game.
The result, mathematically speaking, of a "non-biased" game is the result that obtains when both players are free to use any strategy, allowed by the rules of the game, that they perceive to be to their advantage. Hence, the result of a "non-biased" game is that the clue generator will win five out of six times, on average. If you don't believe this, you are free to accept my challenge and try to prove me wrong.
 
SidYuca said:
2. What you CAN NOT do is cherry pick the 7 digit numbers as you like. You MUST select them at RANDOM as the problem states
The problem states no such thing. The problem states that it is the choice of the person generating the clue which single digit numbers to multiply together to produce a seven digit number. You are imposing this random requirement after-the-fact in order to try to salvage a 90% success rate, which I have proven is unattainable. As a matter of fact, it was I who first used the word "random" in this thread, not you.
 
@Karluk - What stategies are you employing for the solver in your "non biased" game?

Are you still staying within the limit of a seven digit number?

Would you be able to save me hours of work by posting a .csv file of the 882 numbers? I can generate them but my efficiency and skill in coding is somewhat lacking. Not nonexistant, but poor.

Not sure if you missed my other question that I will rephrase in a better way now.

How many 7 digit numbers have you found where at least 4 of them share 6 common numbers but the missing number is different for each? You need at least 20 of these (80 minimum of your candidate 882). In your "non-biased" game I choose not to be limited by only using the divisibility by nine method. Solving method is actually completely unrestricted.

**********************************************
What's most important is that you realise ... There is no spoon.
 
Oh, and also at Karluk. Bias is created when any number is chosen by any means whereby its occurance exceeds probability. I definitely would contest your assertion that your method is unbiased. This question however might be better suited for the STC forum. I cannot say for certain that my understanding of bias is accurate either.

If you have an unbiased coin for example but by either skill or slight of hand you can exceed probabilty to gain an advantage then I would consider the game unbiased although the coin is not. Your method appears to use such a method (skill).

**********************************************
What's most important is that you realise ... There is no spoon.
 
kwbMitel said:
What stategies are you employing for the solver in your "non biased" game?
If either of you accepts the challenge, it would be up to you which strategies to employ. I, as clue generator, really don't care. Just to be clear, however, the guesser can use any strategy he wants. He certainly isn't restricted to guessing multiples of nine, for example. Because of the way I would be producing the clues, I can advise you to figure out the possible missing digits and select randomly among them. But it's your choice.

kwbMitel said:
Are you still staying within the limit of a seven digit number?
In my opinion, SidYuca's original post clearly allowed numbers greater than seven digits. But I know that IPGuru, for one, disagrees with this interpretation. So, for the purposes of the challenge, I am willing to restrict myself to seven digits.

kwbMitel said:
Would you be able to save me hours of work by posting a .csv file of the 882 numbers?
I don't object to doing so. I just have to figure out how to do it. In a lot of ways, I'm computer illiterate, in spite of the fact that's how I earn a living.

kwbMitel said:
How many 7 digit numbers have you found where at least 4 of them share 6 common numbers but the missing number is different for each?
It depends on how you do the counting. I suppose I could post the clue "0,0,0,0,2,5" six times with a different source number each time. That's within the rules, but I can see how you might feel taken advantage of, if I do so. If we add the requirement that all 20 clues need to be different, then in order to stay within the confines of seven digit source number, I would have to use five clues that have six possible missing digits, five more clues that have five possible missing digits, and the final ten clues that have four possible missing digits. (All this is subject to verification. I just performed the search just now.) So getting 25% right in 20 trials is a little less challenging than one might think.
 
I must be becoming feeble-minded in my old age! I completely overlooked the clue

"0,0,0,0,0,0"

which has all nine possible missing digits. This clue can arise from the following source numbers:

1,000,000
2,000,000
3,000,000
4,000,000
5,000,000
6,000,000
7,000,000
8,000,000
9,000,000

So, even confining oneself to seven digit numbers, it's possible to generate a clue which the guesser can't guess with more than a one out of nine chance of being right. It would be interesting to know just how common such clues really are among larger numbers. For each length n, there will always be this set of nine numbers constructed by appending (n-1) zeros to the unit digits. Are there any others?
 
kwbMitel said:
Bias is created when any number is chosen by any means whereby its occurance exceeds probability.
If that's your definition of bias, then multiplying randomly selected single digits is just as biased as my strategy of multiplying together numbers that I know will produce a hard-to-guess clue. In both cases, the clues are generated out of proportion to the one out of 882 odds that would happen with an unbiased selection method. The only difference is that SidYuca is using a biased method that favors the guesser, and I am using a biased method that favors the clue generator.
 
Based upon your last response, yes 25% appears achievable but only thru luck. The probability is 16.66% for the first 5, 20% for the next 5 and 25% for the last 10. Combined probability of 21.667%

Actually, posting 0,0,0,0,2,5 might have been to my advantage unless your honesty is without reproach. (assumed BTW).

I agree that the original post allowed more than 7 digits. As many as you like in fact. {(until said product is 7 digits (or more in length)} Not sure how else to interpret that.

For random numbers, more digits = more likelyhood of correct answer. I'm not sure how it might impact your method.

**********************************************
What's most important is that you realise ... There is no spoon.
 
At Karluk re:bias - I do not agree that each of the 882 have an equal probabilty in much the same way that rolling 2 dice does not equal a 1 in 11 chance of rolling a 7. You are still taking possibilities and designating a probability. This is not how it works.

I like your 0,0,0,0,0,0 solution. Wish I had thought of it. Seems obvious in retrospect.

**********************************************
What's most important is that you realise ... There is no spoon.
 
I declare karluk the winner. He is the most adroit at reading. So as the problem is stated he wins. He CAN turn the words as written but not intended (my error) into one of game theory. As such he uses that to beat the intended game. I wish I had written the word random in the original AND 7 digits to turn it into a stix problem. I still seek a mathematical proof to the intended problem and encourage karluk to attack it with equal enthusiasm.

By way re. in the divisibilty methods where one employs alternating sums and differences with groups of three the reasoning behind the approach is very interesting and much like how you programmers convert binary to octal. By using groups of 3 you are converting from base b to base b^3. In base 10 divisibility you are treating the number under test to a base 1000. One does that for 7,11,and 13 because each of these numbers n in 1000modn = n-1

Explaining the case for 7, because 1000mod 7 = 6 = -1 The numbers groups may be akternately added and subtracted. It is for this reason that when testing for divisibility it is often facilitates testing in a different base. if a*b = c in one base then both will be factors in any base.





 
Yes I agree completely that Karluk has definitely beaten the game as described. The rest that I am discussing are fine points over definitions of bias and probability that really have nothing to do with the original problem.

To use another analogy. Karluk is counting cards to increase his odds at blackjack. Within the rules but he'll be banned from the casino.

**********************************************
What's most important is that you realise ... There is no spoon.
 
==> Was my code ok?
There was only one glaring error. When generating the random digits, you used the formula:
a = int(([red]9[/red] * Rnd) + 2
and it should have been
a = int((8 * Rnd) + 2)
so you were actually generating values 2 through 10 rather than digits 2 through 9.

The general formula is: Value = Int(((High - Low + 1) * Rnd) + Low)

------------

==> I still seek a mathematical proof to the intended problem
Do you mean that you want the math on how to calculate the the 93.75% probability of a seven digit numbers, arrived at by successively multiplying randomly selected single digits 2 through 9, being 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
 
@ CajunCenturion re: 93%.

My methods agree that the probability is in this range but I am lost on how to calculate it. What is throwing me off is the variable amount of digits required to generate a 7 digit number. Additionally, as Karluk has identified, once a 7 digit number has been obtained, there are sometimes additional 7 digit numbers that are obtainable.



**********************************************
What's most important is that you realise ... There is no spoon.
 
I wouldn't worry about the turns instead I would consider a Mean value of the selection (namely 5) selecting from 1-9 2-9 if you must)and consider the average number of turns. 5^8 or 9 is close enough. So select 8 (you can do 9 etc later and do some 'averaging'.

In an earlier post I suggested that doubling the sample space (2 groups of 1-9)would not distort things. I would then look at the numbers that did not contain a factor of 3:
1,1,2,2,4,4,5,5,7,7,and,8,8 and put 1 of these in each 12, hollow Black balls ('B' for Bad balls)

Now I am left with good balls (balls that have factors of 3) Realizzing some are 'gooder' than others.

I propose to put each of 2 nines in 2 Green (for good) Balls.

So now I have 14 balls.

because I don't want to deal with Half good 3's and 6's the same way as the other balls, I'd have to pick these twice and I can't keep track (or don't know how) I suggest putting two 3's in A SINGLE GREEN ball instead of 2 balls. Putting in a single dilutes their probability of being picked as an individual but gets me a 9. I'd do the same with the two 6's. Don't ask me about the needif a 3-6 Ball? So I add 2 Green balls to my 12B and 2 G (each with a 9)

Now the problem comes down to:

From a sample space of 16 balls (12W + 4G) what are the chances of making 8 single picks, with replacement, and not get at least 1 Green Ball?

If you don't like the inclusion of the 1's make it 10W + 4G



 
SidYuca said:
...I propose to put each of 2 nines in 2 Green (for good) Balls...
I'm afraid that your strategy of trying to compensate for the different powers of three in 3 and 6 vs. 9 by adjusting the number of green balls in your model is not a valid way to calculate the probabilities. It leads to a rather big discrepancy between the odds calculated by your model and the actual odds of not getting a multiple of nine when repeatedly multiplying together randomly selected single digit numbers.

Fortunately, it doesn't appear to be particularly difficult to calculate the odd directly, without resorting to your black ball/green ball model. According to my calculations, the odds of not getting a multiple of nine when multiplying together n numbers randomly selected from {2,3,4,5,6,7,8,9} are given by the formula

(5/8)^(n-1) * (2*n+5)/8

In particular, for the case n=8 that you are considering, the odds are

(5/8)^7 * 21/8 = 9.78% (approximately)

By way of comparison, the odds predicted by your model of getting eight straight black balls when choosing from a mixture of 10 black balls and four green balls are

(10/14)^8 = 6.78% (approximately)

So, if my calculations are correct, your model is off by exactly 3% from the true odds, when the numbers are rounded to two decimal places.

I think kwbMitel is right in predicting that the large variability in the number of single digit multipliers needed to produce a seven digit product will make it impossible to calculate the odds without resorting to a lengthy enumeration of cases that will need to be carried out by computer. Just calculating the odds for each n and then performing some sort of average is bound to be too inaccurate to improve on the Monte Carlo-style simulations that several people in this thread have already performed. Their results strongly suggest that the odds of getting a seven digit number that's divisible by nine are within a percent or so of 94%
 
@Karluk, I am having more than a little difficulty regenerating your list of 7 digit candidates. Mainly because I am focused on a different goal which is how many ways can those numbers be generated. Is there any way that you can provide your complete list via .txt or .csv file including the relative quantity of factors as you provided in an abbreviated fashion before? I simply do not have the tools or skill (or time) to figure this out on my own obviously.

**********************************************
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