If L
is a language defined by :
L = { awa | w ∈ {a, b}* }
,
is aa
a string of the language L
? (notice that w
is being null string here)
If L
is a language defined by :
L = { awa | w ∈ {a, b}* }
,
is aa
a string of the language L
? (notice that w
is being null string here)
According to you definition it seems L consists only of two words aba
and aaa
.
EDIT: after you have edited the question I can say yes "aa" is a word of this language
w ∈ {a, b}*
means zero or more chars of this alphabet and thus w may have zero chars and be empty.
Your Problem can be restated as this.
L= a(a|b)*a
Which translates into intuition as "Strings that begin with and end with 'a'". So naturally, 'aa' is a valid string.
I hope this answers your question.