A word is a string of arbitrary length consisting of the letters

MATHEMATICS · Multi-part · AoPS · Mathematics · Follow the Rules · Follow the Rules

Problem

A word ww is a string of arbitrary length consisting of the letters a,b,ca, b, c. If ww and vv are words, then we write wvwv for their concatenation. For example, if w=abaw = aba and v=caav = caa then wv=abacaawv = abacaa. We create a set L\mathcal{L} of allowable words (we write w∈Lw \in \mathcal{L} to mean that ww is a word in our language) via just the following rules: - (a) a,b∈La, b \in \mathcal{L}; - (b) if w∈Lw \in \mathcal{L} then so is cwcw; - (c) if ww and vv are words such that wv∈Lwv \in \mathcal{L} and ww has length at least 1, then vwv∈Lvwv \in \mathcal{L}; - (d) if aw∈Law \in \mathcal{L} then wb∈Lwb \in \mathcal{L}. For example, a,cca,acca,ccaba, cca, acca, ccab are all in L\mathcal{L} by the rules. We call a word ww a palindrome if the word looks the same forwards or backwards, including single-letter words. So for example, a,aba,acbbcaa, aba, acbbca are all palindromes, but cb,abc,abbbaccb, abc, abbbac are not. (1) What is the number of palindromes in L\mathcal{L} that contain both aa and bb with length 10? (2) What are some observations you made about the words in L\mathcal{L}? (3) Can you prove your observations?

Related theory

Browse the problem library