Wesley R. Elsberry
Posts: 4957 Joined: May 2002

"weasel" math
Given:
Base set size K (number of possible characters at each position)
Target string length L
Mutation rate (per site) u
Population size N
here are some basic probabilities to go with a "weasel" run.
Per base:
P_{incorrect to correct} = 1 / K
P_{correct to incorrect} = (K  1) / K
Blind search:
P_{try is all correct} = K^{L}
P_{a try in the population is all correct} = N * K^{L}
Expected number of correct bases when all bases are changed = L / K
Expected number of correct bases when a genome is produced via copy with mutation = u * L / K
In "weasel" run:
Expected number of correct bases given a partially matching string: Given C as number of correct matching bases
expected correct bases after mutation = C + (u * (L  C) / K)  (u * C * (K  1) / K)
There's a few more items to derive to pull in the population parameter, but I need to go now.
Edit: Equations for P_{try is all correct} and dependencies per PT comment by Mike Elzinga.
Edited by Wesley R. Elsberry on Mar. 19 2009,19:40
 "You can't teach an old dogma new tricks."  Dorothy Parker
