More Examples.
•Write recursive definition for the followings.
1. L = { x, xx, xxx, xxxx, ---- }
1.Rule 1: x is in L.
2.Rule 2: If w is any word in L, the xw is also in L.
2. L = { x
odd
} = { x, xxx, xxxxx, xxxxxxx, ---- }
1.Rule 1: x is in L.
2.Rule 2: If w is any word in L, the xxw is also in L.
3. L = {Λ, x, xx, xxx, xxxx, ---- }
1.Rule 1: Λ and x are in L.
2.Rule 2: If w is any word in L, the xw is also in L.
4.L = {1, 2, 3, 4, 5, ---- }
1.Rule 1: 1, 2, 3, 4, 5, 6, 7, 8, 9 are in L.
2.Rule 2: If w is any word in L, the w0, w1, w2, w3, w4, w5, w6, w7,
w8, w9 are also in L.
5.Definition for Kleene Closure.
1.If S is a language, then all words of S are in S*.
2.Λ is in S*.
3.If x and y are in S*, then so is their concatenation xy.