[英]Proof of (w * w^R)^R = w*w^R
Question: if w exist in T*, prove that (w * w^R)^R = w * w^R问题:如果w存在于T*中,证明(w * w^R)^R = w * w^R
Hi, I am new to theories of algorithms, and I am having trouble understanding how to prove this, if someone can hint me towards the right direction that would be much appreciated.嗨,我是算法理论的新手,我无法理解如何证明这一点,如果有人能向我暗示正确的方向,我将不胜感激。
Note: R means the string is reversed, ex: (abc)^R = cba注意: R 表示字符串反转,例如:(abc)^R = cba
Also Note: * means concatenation so (abc * def) = abcdef另请注意: * 表示连接所以 (abc * def) = abcdef
In general case , try using group theory (you even have a hint : "Also Note: * means concatenation so (abc * def) = abcdef
"):在一般情况下,尝试使用群论(您甚至有一个提示:“另请注意:* 表示连接所以(abc * def) = abcdef
”):
a, b, c, ... - (characters) - group's elements (generators in fact)
a * b == ab - (concatenation) - group's operation
ε - (empty string) - group's 1
a..z**-1 == z..a - rule for the item reversing; a**-1 == a
So far, so good, string reversing is **-1
operation, for any ab...yz
item we have:到目前为止,很好,字符串反转是**-1
操作,对于我们有的任何ab...yz
项:
(ab...yz)((ab..yz)^R) == ab..yz * zy ..ba == ab..yzzy..ba
since zz == z * z == ε (z == z**-1)
we have
ab..yzzy..ba ==
ab..yy..ba ==
ab..ba ==
ε
Your theorem is quite easy then: change string reversing to **-1
and have那么你的定理很简单:将字符串反转更改为**-1
并有
(w * w**-1)**-1=(w**-1)**-1 * w**-1 == w * w**-1
For this particular case the group we've built may be an overkill, however, it can be very useful when'll be solving the similar problems.对于这种特殊情况,我们建立的组可能有点矫枉过正,但是,它在解决类似问题时非常有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.