I have a problem related to the significance of experimental results, but I will frame it this way:
Suppose I have two binary strings of length A+B. The first contains exactly A 0s and B 1s. The second can be any pattern. Assuming all strings are equiprobable, what is the probability that my two strings match in at least x% of the positions?