This is a machine learning question. Given this series of categorical data, what program will derive the underlying algorithm and predict what comes next in the series?
Here is the series:
B, BA, BB, BAA, BAB, BBA, BBB, BAAA, BAAB, BABA, ...
Anyone with knowledge of computer science may quickly realize that this series is simply counting in binary with "A" substituted for "0" and "B" substituted for "1". This is true, but...
the program that predicts what comes next must do so only by manipulating the symbols given in the series. It must not use hard-coded knowledge of binary counting.
I realize many patter recognition algorithms are available but I haven't seen how any can solve this deceptively hard problem.
Based on the votes that this problem is insolvable, I've done some refactoring and posed the question another way, with more constraints, here: What program will derive the underlying algorithm in these question-answer pairs (updated)?