MathDB
Dog dictionary

Source: Rioplatense Olympiad L3 2019

December 10, 2019
combinatorics

Problem Statement

In the dog dictionary the words are any sequence of letters AA and UU for example AAAA, UAUUAU and AUAUAUAU. For each word, your "profundity" will be the quantity of subwords we can obtain by the removal of some letters. For each positive integer nn, determine the largest "profundity" of word, in dog dictionary, can have with nn letters. Note: The word AAUUAAAUUA has "profundity" 1414 because your subwords are A,U,AU,AA,UU,UA,AUU,UUA,AAU,AUA,AAA,AAUU,AAUA,AUUAA, U, AU, AA, UU, UA, AUU, UUA, AAU, AUA, AAA, AAUU, AAUA, AUUA.