MathDB
number of words consisting of 1998 A’s and 1998 B's

Source: Czech and Slovak Match 1997 P6

October 1, 2017
combinatorics

Problem Statement

In a certain language there are only two letters, AA and BB. The words of this language obey the following rules: (i) The only word of length 11 is AA; (ii) A sequence of letters X1X2...Xn+1X_1X_2...X_{n+1}, where Xi{A,B}X_i\in \{A,B\} for each ii, forms a word of length n+1n+1 if and only if it contains at least one letter AA and is not of the form WAWA for a word WW of length nn. Show that the number of words consisting of 1998A1998 A’s and 1998B1998 B’s and not beginning with AAAA equals (39951997)1\binom{3995}{1997}-1