By the year 2075, spelling has deteriorated such that the dictionary now defines the spelling of the word “RELIEF” to be any combination (with repetition allowed) of the letters F, L, R, I and E subject to these constraints:
- The number of letters must not exceed 6;
- The word must contain at least one L;
- The word must begin with a string of at least one R’s and end with a string of at least one F’s, and there are no other R’s and F’s;
Questions:
- How many spellings are possible? (Hint: You can consider the pattern of R/F’s and the letters in between separately, because the choices for them are independent.)
- What is the fifth spelling before RELIEF, in dictionary order?