-1

Set={a,b} and L7:"All words that begin with a a and end with a b" is given L7 可以定义为

a(a+b)*b

“+”是什么意思?而且,如何解决这个问题?

4

1 回答 1

2
a       # first letter is always 'a'
(a+b)*  # zero or more sequence of letters 'a' or 'b' [one letter at time]
b       # last letter is always 'b'

这里的+意思是or,因此,我们有以下结果:

ab
abb
abbb
aaab
abbbb
aaaab
abbbbb
aaaaab
.....
于 2013-10-26T16:25:23.813 回答