证明以下正则表达式的每个等式。
一种。ab*a(a + bb*a)*b = a(b + aa*b)*aa*b。
湾 b + ab* + aa*b + aa*ab* = a*(b + ab*)。
问题一
证明 ab*a(a + bb*a)*b = a(b + aa*b)*aa*b。
Let’s take LHS , = ab*a(a + bb*a)*b Use property of (a+b)* = a*(ba*)* = ab*a (a* ((bb*a) a* )* a*b = ab* a (a*bb*a)* a*b {Associative property} = ab* (a (a*bb*a)*)a*b = ab*(aa*bb*)*aa*b = a (b*(aa*bb*)*)aa*b Use property a* (ba*)*= (a+b)* = a(b+aa*b)*aa*b = RHS Hence proved
问题二
证明 b + ab* + aa*b + aa*ab* = a*(b + ab*)。
Let’s take LHS, = b + ab* + aa*b + aa*ab* = (b+aa*b)+(ab*+aa*ab*) = (^+aa*)b+(^+aa*)ab* {using distributing property} = (a*)b+(a*)ab* from ^+aa*=a* = a*b+a*ab* = a*(b+ab*) {distributive property} = RHS Hence proved