CSMC 2018 Part B Problem 3
Source:
November 24, 2018
CSMCCSMC 2018
Problem Statement
A string of length is a sequence of characters from a specified set. For example, is a string of length 5 with characters from the set . A substring of a given string is a string of characters that occur consecutively and in order in the given string. For example, the string is a substring of but is not a substring of .
[*]List all strings of length 4 with characters from the set in which both the strings and occur as substrings. (For example, the string should appear in your list.)
[*]Determine the number of strings of length 7 with characters from the set in which occures as a substring.
[*]Let be the number of strings of length with characters from the set such that [*] occurs as a substring, and[*]if either or occurs as a substring then there is an occurrence of the substring to its left.
(for example, when , the strings and and satisfy the requirements, but the strings and and do not). Prove that is a multiple of .