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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top