A problem I'm trying to solve: given that you have two distinct strings composed of the lower case letters a through z, find a string between the two strings such that further in-between strings can always be found.
Further detail:
Given that 'a' comes before 'b' alphabetically, there are an infinite number of strings between 'a' and 'b', when sorted as a dictionary would: 'aa', 'aaa', 'aaaa', 'ab', 'aba', etc. However, there are not an infinite number of strings between all strings - nothing comes between 'a' and 'aa'. Further, between 'a' and 'aaa' there exists only one in-between string 'aa'.
What is an algorithm that can find a string X that comes alphabetically between 'a' and 'b' that also satisfies the condition that there are infinite number of strings between 'a' and X as well as X and 'b'?