-3

Question: if w exist in T*, prove that (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

Also Note: * means concatenation so (abc * def) = abcdef

Nightmare
  • 85
  • 9

1 Answers1

0

In general case, try using group theory (you even have a hint: "Also Note: * means concatenation so (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:

  (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

  (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.

Dmitry Bychenko
  • 180,369
  • 20
  • 160
  • 215