I am having difficulty understanding the recursive definition of a language. The problem asked how to write this non recursively. But I want to understand just how a recursive definition of a language works.
Recursive definition of a subset of L of $\{a,b\}^*$.
Basis : $a\in L$
Recursive Definition : for any $x\in L$, $ax$ and $xb$ are in $L$.
Below is my attempt at explaining the recursive definition.
Starting with the basis $a$ saying that $ax$ is in it means that all strings formed such as $\{a,aa,aaa,...\}$ are present.
Defining all $xb$ represents $\{ab,abb,abbbb,...\}$
The answer I have so far is $\{a\}^*\{b\}^*$ but again it is understanding it that I am after.
Pretend you're a computer.
Step 0. You start with $\{ a \}$.
Apply the recursive definitions to each word you have so far. This gives you $aa$ and $ab$, so add them to your list.
Step 1. You now have $\{ a, aa, ab \}$.
Applying the recursion again to each word gives you $aa,ab,aaa,aab,aab,abb$. There's some duplication going on here, but that doesn't matter.
Step 2. You now have $\{ a, aa, ab, aaa, aab, abb \}$.
Do it again. This gives you $$aa,ab,aaa,aab,aab,abb,aaaa,aaab,aaab,aabb,aabb,abbb$$ so append these to your list, ignoring duplicates as before.
Step 3. You now have $\{ a,aa,ab,aaa,aab,abb,aaaa,aaab,aabb,abbb \}$.
Do you see a pattern emerging? Try and guess the general form of a word in this language and then prove by induction on the 'step' above (a.k.a. structural induction) that your guess is correct.