是一个*相同(一个*)*? [英] is a* the same as (a*)*?
问题描述
快速的问题,
如果 A
是一个普通的EX pression那么这是真的 A * =(A *)*
?
Quick question,
if a
is a regular expression then is it true that a* = (a*)*
?
是(A *)*
有效EX pression?如果是的话,任何人都可以解释为什么是一样的 A *
?我的要求在这里表示歉意,但我找不到通过谷歌任何东西。
Is (a*)*
a valid expression? If it is, then can anyone explain why is it the same as a*
? I apologize for asking here, but I couldn't find anything via Google.
推荐答案
是, A * =(A *)*
相同。两者产生相同的语言,它是字符串的数字A的包括空。
Yes, a*=(a*)*
are same. Both generate same language that is string any numbers a's including null.
L(A *)= {^,A,AA,AA ......} = L((A *)*)
是(A *)*
有效EX pression?
Is (a*)*
a valid expression?
是的,这当然pression叫做常规EX preSSION
(我看见你错过了标记)。任何正规语言(RL)可以重新通过普通防爆pression(RE)psented $ P $。再present RL一个按字母顺序排列的方式。
Yes, this expression is called
REGULAR-EXPRESSION
(I saw you missed the tag). Any Regular Language(RL) can be represented by Regular Expression(RE). A alphabetical way of represent RL.
为什么是一样的吗?
*
表示重复的时间(包括 0
次)任何数字。
*
means repetition any numbers of time (including0
times).
A *
表示0,1,2或任意数量的。
a*
means 0 a, 1 a, 2 a or any number of a.
(一个*)*表示重复对所有字符串 A *
为任何数目的时间(包括0次)来设置。
(a*)* means repetition for all string in a*
set for any number of time (including 0 times).
由于 L(A *)
用于所有的字符串由使用。它的晚饭设定每个组由一个的字符串。和 L((A *)*)
是一样的。
Because L(a*)
means all string consists using a. its supper-set of every set consists of strings of a's. and L((a*)*)
is same.
这篇关于是一个*相同(一个*)*?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!