@DrewDad,
DrewDad wrote:
BBBBBBBBBBBBBBBBB
This follows the rule the an "A" is always followed by a "B".
This is to illustrate that one cannot reason backwards from "A" implies "B" and get "B" implies "A".
Doh!
I should have added the rest of what I'd intended to type ("or I am interpreting it wrong") because in reality I read it wrong and I needed that additional caveat.
Ok, so now that I have got reading comprehension temporarily conquered:
1) I have no way to determine what letter preceeds a random B. It is either an A or it is not.
2) But based on the information available to me, the most likely letter is A. I'll explain the logic:
The baseline probability with no additional information is that it can be one of X possibilities (using the English alphabet this would be 1/26 for random non-English text). With the additional information about that correlation I know that there is a greater probability that it is an A than any other letter.
The reason is because you established that an A in this text is always preceded by a B. Now sure, your random text (I have to assume randomness for the missing information) may not even contain an A, and that might just be a maverick B hanging out there, but as long as that rule exists there is a greater probability that an A precedes the letter than any other letter.
This, again, refers to the calculatable probability. So if you run this simulation, generating a random set of letters following only that rule a million times A will be the most probable answer to the question.
I don't remember if you are a programming guy, or a networking guy but if you are a programming guy give it a try.