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.

 
First I'd like to see results before I invest time in figuring out how. I will provide 10 test numbers. if you can get better than 50% correct I'll dig in, otherwise no.

1 - 0, 0, 0, 3, 4, 9
2 - 0, 0, 1, 2, 2, 4, 6, 9
3 - 0, 0, 2, 6, 6, 6, 7, 8
4 - 0, 2, 4, 4, 5, 7, 8, 9
5 - 0, 2, 4, 6, 7, 7, 9
6 - 0, 0, 0, 2, 3, 4, 4, 6
7 - 0, 0, 2, 3, 3, 6
8 - 0, 0, 0, 2, 2, 5, 6, 9
9 - 0, 2, 6, 6, 7, 9, 9
10- 0, 0, 3, 3, 5, 6, 7


**********************************************
What's most important is that you realise ... There is no spoon.
 
Hmmmmmm? How'd I do
1.2
2.3
3.1
4.6
5.1
6.8
7.4
8.3
9.6
10.3
 
Infortunately, we both have to wait until I get home in about 6 hours. I didn't think to record the data on my work computer.

**********************************************
What's most important is that you realise ... There is no spoon.
 
Every single one of SidYuca's guesses causes the sum of his guess plus the rest of the digits provided by kwbMitel adding up to a multiple of nine. This, of course, is the well-known test for divisibility by nine. So, SidYuca is obviously hoping that, in the course of constructing his numbers, kwbMitel has multiplied by nine once, or by three twice. Perhaps this is 90% probable if the single digit numbers are selected randomly, but there is certainly no way to guarantee it. And it's certainly possible to construct numbers according to SidYuca's rules where his guess would be wrong 100% of the time.
 
Good observation karluk and saying "but there is certainly no way to guarantee it" takes the fun and math out of it. But it is better than 90%+ I'll wager that you would take the bet on the street. I was not hoping, counting on random. You must also factor in choice of a pair of 6's OR a 6 in combo with a 3. You can write a program to confirm that odds are 94%+. This may be higher than reality because folks may avoid multiplying by 9 more than the statistical 1/9th. On average it will take more than 8 products to get to a 7 digit number. Therefor looking at 8 rnd numbers without getting:
* a 9 OR
* two 3's OR
* two 6's OR
* a 6 with a 3
is really a long shot.
 
Actually Sid, without knowing your method I did throw in one of the numbers that was simply the same number multiplied by itself (not 3 or 9) I strategically picked a number I thought would not work by any method (Specifically 7). The 10th number is 7^8 or 40353607 so 3 is the wrong answer.

Statistically, using random numbers as I have for the others, I think you will be short of 90% in the long run.

Just for fun, I'll figure out what the odds really are now that the method is revealed.

**********************************************
What's most important is that you realise ... There is no spoon.
 
Wouldn't you know? When I got to the 10th answer I was so excited that I pushed a 3 instead of my intended '4'. ;>) But you did say that if I got more than 50% you'd figure it out. My last run of 30,000 tries yielded 94.25 percent multiples of 9.
 
Actual Answers:

1- 2 - Right
2- 3 - Right
3- 1 - Right
4- 6 - Right
5- 1 - Right
6- 2 - Wrong
7- 4 - Right
8- 3 - Right
9- 1 - Right
10-4 - Wrong

80% is statistically Significant.

For the other you got wrong I multiplied
6,2,7,7,5,2,8,5,8,4,7,5 = 263424000
The digit I picked was the first one (2)



**********************************************
What's most important is that you realise ... There is no spoon.
 
It seems to me that this problem is mathematically interesting, even beyond the possibility of winning a bar bet against someone who hasn't figured out the "evenly divisible by nine" guessing strategy. Suppose that you are making a wager against someone who IS aware of the strategy. Can you still predict the missing digit with greater than one chance in nine of being right? It seems to me that you can. I've done some work on this problem, limiting myself to guessing seven digit numbers. KwbMitel has two such numbers in his list. According to my calculations,

1 - 0, 0, 0, 3, 4, 9

could happen in only three different ways - from the numbers 2903040, 4390400 and 9830400. So in this case, the missing digit can only be 2, 4 or 8.

Similarly

7 - 0, 0, 2, 3, 3, 6

has only two possible sources - 3763200 and 4233600. So the missing digit has to be either 4 or 7.

In general, the fact that you know all but one digit of the unknown number and that its only prime factors are 2, 3, 5 and 7 place extremely narrow constraints on what the number can be. It might be computationally feasible to calculate the possible solutions, even for numbers that are much longer than seven digits.
 
karluk when say:
"In general, the fact that you know all but one digit of the unknown number and that its only prime factors are 2, 3, 5 and 7 place extremely narrow constraints on what the number can be."

It certainly is exremely limiting. You are saying "pick a multiple of 210 that is 7 digits long and give me 6 digits etc. Can the primes be present multiple times? Try 0,0,0,1,1,0
 
Wouldn't you know? When I got to the 10th answer I was so excited that I pushed a 3 instead of my intended '4'. ;>)

10- 0, 0, 3, 3, 5, 6, 7

3+3+5+6+7 = 24
Nearest multiple of 9 = 27
27-24 = 3
3 = your given answer

The method above works for all 10 of your answers. If as you say you "pushed a 3 instead of my intended '4'", then I need to ask why 4 would have been intended?

**********************************************
What's most important is that you realise ... There is no spoon.
 
@SydYuca

I have run your method thru my number cruncher and I have found a possibly flaw in your reasoning. I may actually take you up on your bet but I would like to define some variables

You win if you guess 9 or 10 out of 10
You lose if you guess less than 9 out of 10.

If you agree to the above, I would take your bet straight up.

**********************************************
What's most important is that you realise ... There is no spoon.
 
My last run of 30,000 tries yielded 94.25 percent multiples of 9.

If you are limiting yourself to 7 digit numbers then 94.25 percent is not achievable without stretching the odds considerably

I've run 50000 trials 20 times (1,000,000) total

The best trial yielded 90.242 percent
The worst was 89.686 percent
The average over all was 90.014

When I was using some numbers with greater than 7 digits (upwards of 10) then the numbers were averaging about 97%

**********************************************
What's most important is that you realise ... There is no spoon.
 
Re:my post 19 Nov 11 14:40

I've just spotted a flaw in my reasoning. I was actually using groups of 100 trials not 10.

In groups of 10 trials (100 times) you won a straight up bet 77 times and lost 23

However in groups of 100 trials (10 times) with the same data you only won 3 times and lost 7.

Ten trials is not significant to counter your claim. Further research proves that this data was anomalous.

100 more trials like above reveals a different picture[tt]
Won 0 times - Never
Won 1 time - Never
Won 2 Times - once
Won 3 Times - Twice (this matches earlier trial)
Won 4 Times - 11
Won 5 times - 23 (this equals a push you win 5 I win 5)
Won 6 times - 23
Won 7 times - 23
Won 8 Times - 12
Won 9 times - 5
Won 10times - 0[/tt]

Over all you win 63, I win 14 and the rest are ties.

Not going to take that bet after all.

**********************************************
What's most important is that you realise ... There is no spoon.
 
I am not going to fight about your random number generator or my random mumber generator. Nor will I fight over a couple of percentage points generated by 10 sets of ten tries. This is nothing more than a stix problem that is mathematically solveable and begging for a solution.

Perhaps you would post your code.

It usually takes about 8+ products to get to a 7 digit number. (thinking an average of 5.)

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.











 
Well, I do not make assumptions of this sort.

I generate 15 random numbers per try
The numbers are generated in integer values from 2 to 9 ( I don't bother with 1 or zero for obvious reasons)

In my 750,000 numbers generated per trial my deviation from expected distribution is never greater than +/- 1%

I multiply the numbers by 1 another until I achieve a 7 digit number.

I use the first digit as my "unknown" digit

The rest are used to regenerate the number.

Success rate averages 90% not 94%

No assumptions - pure data. No code

**********************************************
What's most important is that you realise ... There is no spoon.
 
I guess your code gives you 90%. That's what I said in my original post. You in your original post you said..

"First I'd like to see results before I invest time in figuring out how."

Did you FIGURE OUT HOW/why or did you make a simulation and that is the 'how' part of your investigation?

It appears that you have come from saying that I stretched "stretching the odds considerably" to not more than 50% and now up to my original 90%. Then let's not forget the upside down results of 10 sets of 100 vrs 100 sets of 10.
That was a real out of boundes.

I guess that 90% says that you are not taking the original 'bet' of random numbers straight up?

In any event, the proof remains open, while your code is closed and free from critique.

Someone on the list will come up with a proof.
 
Actually, SidYuca, nobody is going to be able to prove your contention that 90+ percent of seven digit numbers that have no prime factor greater than 7 are divisible by nine. It's simply not true. The actual percentage of numbers that meet these criteria is about 67.0%. To get your 90+ percent figure, you have to make unwarranted assumptions about how the numbers are selected.

The percentage does, however, increase for bigger numbers. It's about 70.4% for eight digit numbers and 73.2% for nine digit numbers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top