Say we came up with a finite grammar (specifies a finite number of strings) given a set of input strings. How then do we generalize the grammar so that it works for larger input strings and also fills in the gaps of strings we didn't specify, correctly?
I have an idea. Say inputs that looked like:
'a'
'aa'
'aaaa'
'aaaaa'
Then a possible given grammar is $G \to a + a(a + a(a +a(a + a))))$. Then I think since $|s|$ the length of the input string $|s|$ follows some pattern, if we come up with a good guess for that then we can build our grammar based on it.
What would you guys do? I think also we need an output grammar that in addition represents interesting functions to try to generalize grammar from.