Author: Andrew Dados
Date: 05:36:27 02/08/00
Go up one level in this thread
On February 08, 2000 at 08:05:40, Les Fernandez wrote: >Does anyone know given a string of "x" numbers (ie 237496) how large must a >string of random numbers be so that you can have a 95% chance of finding that >exact string within the larger string of numbers. If there is a way that I can >calculate it please provide info. Keep in mind although the above example >contains 6 numbers it is used only for an example so that I may understand the >concept. I am interested in being able to calculate how long the length of the >longer string needs to be for numbers up to about 60 in length if this is >possible. Thanks > >Les My naive approach: given x: length of your substring and y: length of string... (1-1/x^10) - probability that there is *no* match in one slot; (1-1/x^10)^n - probability of *no* match in n slots; 1-(1-1/x^10)^n - probability of at least one match in n slots...n slots means: y=n+x; so you need to solve equation: 1-(1-1/x^10)^(y-x)>=0.95 given I didn't have my coffee yet it's all correct with some 0.15% chance..:)
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.